/* ===== ALMA — Widget de Preguntas Frecuentes (sin IA, 100% estático) ===== */

#alma-faq-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
}

#alma-faq-bubble {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--teal, #2c4f4e);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(28, 53, 52, .38);
  transition: transform .2s ease, box-shadow .2s ease;
  padding: 0;
}
#alma-faq-bubble:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(28, 53, 52, .48); }

.alma-faq-bubble-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--white, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: none;
}
.alma-faq-bubble-logo img { width: 145%; height: 145%; object-fit: cover; }

#alma-faq-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--yellow, #f3d31e);
  border: 2px solid #fff;
  animation: almaFaqPulse 2.2s infinite;
}

@keyframes almaFaqPulse {
  0% { box-shadow: 0 0 0 0 rgba(243, 211, 30, .65); }
  70% { box-shadow: 0 0 0 9px rgba(243, 211, 30, 0); }
  100% { box-shadow: 0 0 0 0 rgba(243, 211, 30, 0); }
}

.alma-faq-panel {
  position: fixed;
  right: 20px;
  bottom: 92px;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: min(72vh, 560px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(28, 53, 52, .28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.alma-faq-panel[hidden] { display: none; }
.alma-faq-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.alma-faq-header {
  background: var(--teal, #2c4f4e);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.02rem;
  flex-shrink: 0;
}
.alma-faq-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.alma-faq-header-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--white, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.alma-faq-header-logo img { width: 145%; height: 145%; object-fit: cover; }
.alma-faq-header-text { display: flex; flex-direction: column; line-height: 1.25; }
.alma-faq-header-text strong { font-size: 1rem; font-weight: 700; }
.alma-faq-header-text small { font-size: .72rem; font-weight: 400; opacity: .85; }
#alma-faq-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: .9;
}
#alma-faq-close:hover { opacity: 1; }

.alma-faq-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
}

.alma-faq-intro {
  font-size: .82rem;
  color: var(--gray, #5b6b6a);
  margin: 0 0 14px;
}

.alma-faq-cat {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal, #2c4f4e);
  opacity: .8;
  margin: 18px 0 8px;
}
.alma-faq-cat:first-of-type { margin-top: 0; }

.alma-faq-q {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--offwhite, #f7f9f8);
  border: 1px solid var(--border, #e2e8e7);
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 8px;
  font-size: .87rem;
  font-family: inherit;
  color: var(--ink, #1c2524);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.alma-faq-q:hover { background: #eef2f1; border-color: var(--teal-light, #3f6a68); }

.alma-faq-back {
  background: none;
  border: none;
  color: var(--teal, #2c4f4e);
  font-weight: 600;
  font-size: .87rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.alma-faq-back:hover { text-decoration: underline; }

.alma-faq-a-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--teal-dark, #1c3534);
  line-height: 1.4;
}
.alma-faq-a-text {
  margin: 0;
  font-size: .88rem;
  color: var(--gray, #5b6b6a);
  line-height: 1.65;
  white-space: pre-line;
}

.alma-faq-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border, #e2e8e7);
  flex-shrink: 0;
}
.alma-faq-cta {
  width: 100%;
  justify-content: center;
  text-align: center;
  font-size: .82rem;
  padding: 12px 14px;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  #alma-faq-widget { right: 16px; bottom: 16px; }
  .alma-faq-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 86px;
    max-height: 70vh;
  }
}
