/* ===== WAI Chat Widget V2 — Adapted for Wompi Website ===== */
/* All classes prefixed with wai- to avoid conflicts with site styles */

/* ── CSS Variables (scoped) ──────────────────────────────── */
.wai-chat-overlay,
.wai-chat-overlay *,
.wai-terms-modal,
.wai-terms-modal * {
  box-sizing: border-box;
}

:root {
  --wai-verde-menta: #B0F2AE;
  --wai-verde-selva: #00825A;
  --wai-verde-lima: #DFFF61;
  --wai-azul-cielo: #99D1FC;
  --wai-negro: #2C2A29;
  --wai-blanco: #FAFAFA;
  --wai-bg: #F3F9F3;
  --wai-surface: #FFFFFF;
  --wai-text: #1F2723;
  --wai-muted: #5F6F69;
  --wai-primary: var(--wai-verde-selva);
  --wai-accent: var(--wai-verde-menta);
  --wai-border: #D8E2DD;
  --wai-shadow: 0 4px 20px rgba(0, 0, 0, .12), 0 25px 55px -20px rgba(0, 0, 0, .25);
}

[hidden] {
  display: none !important;
}

/* ── Overlay ─────────────────────────────────────────────── */
.wai-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .28);
  backdrop-filter: saturate(160%) blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 9999;
  animation: wai-fadeIn .2s ease-out;
}

@keyframes wai-fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

/* ── Chat Window ─────────────────────────────────────────── */
.wai-chat-window {
  width: min(548px, calc(100% - 48px));
  max-height: 92vh;
  min-height: 668px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFDFD 55%, #F5F8F6 100%);
  border: 1px solid var(--wai-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--wai-shadow);
  overflow: hidden;
  animation: wai-pop .24s ease-out;
}

@keyframes wai-pop {
  from {
    transform: translateY(12px);
    opacity: 0
  }

  to {
    transform: none;
    opacity: 1
  }
}

.wai-chat-window.wai-dimmed {
  filter: brightness(.7);
  pointer-events: none
}

/* ── Header ──────────────────────────────────────────────── */
.wai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--wai-border)
}

.wai-chat-brand {
  display: flex;
  align-items: center;
  gap: 12px
}

.wai-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px
}

.wai-chat-logo {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #b0f2ae;
  overflow: hidden
}

.wai-chat-logo img {
  width: 70%;
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25))
}

.wai-chat-header h2 {
  font-family: "CIBFontSans Bold", sans-serif;
  font-size: 24px;
  line-height: 26px;
  letter-spacing: -0.45px;
  margin: 0
}

.wai-chat-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px
}

.wai-chat-vertical-label {
  font-size: 12px;
  color: var(--wai-primary);
  font-weight: 500;
  line-height: 1.2;
  display: none
}

.wai-chat-vertical-label.wai-visible {
  display: block;
  animation: wai-fadeIn .3s ease-out
}

.wai-chat-status {
  color: var(--wai-primary);
  font-size: 12px
}

.wai-chat-close {
  background: none;
  border: none;
  color: #5D6A65;
  font-size: 28px !important;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 8px;
  line-height: 1
}

.wai-chat-close:hover {
  color: var(--wai-text);
  background: #00825A15
}

/* ── Menu (three dots) ───────────────────────────────────── */
.wai-chat-menu-wrapper {
  position: relative
}

.wai-chat-menu-btn {
  background: none;
  border: none;
  color: #5D6A65;
  font-size: 28px !important;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 8px;
  line-height: 1;
  transition: color .15s, background .15s
}

.wai-chat-menu-btn:hover {
  color: var(--wai-text);
  background: #00825A15
}

.wai-chat-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #FFFFFF;
  border: 1px solid var(--wai-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  width: 216px;
  z-index: 100;
  overflow: hidden;
  animation: wai-menuFade .15s ease-out;
  padding: 16px
}

@keyframes wai-menuFade {
  from {
    opacity: 0;
    transform: translateY(-4px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.wai-chat-menu-item {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font-family: "CIBFontSans Regular", sans-serif;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.2px;
  color: var(--wai-text);
  cursor: pointer;
  transition: background .15s
}

.wai-chat-menu-item:hover {
  background: #F2F6F4
}

/* ── Vertical Bar ────────────────────────────────────────── */
.wai-vertical-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--wai-border);
  animation: wai-slideDown .25s ease-out;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease, opacity .3s ease, border-color .3s ease;
  max-height: 100px
}

.wai-vertical-bar.wai-hidden {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  border-color: transparent;
  pointer-events: none
}

@keyframes wai-slideDown {
  from {
    max-height: 0;
    opacity: 0
  }

  to {
    max-height: 100px;
    opacity: 1
  }
}

.wai-vertical-bar-text {
  font-size: .82rem;
  color: var(--wai-muted);
  white-space: nowrap;
  flex-shrink: 0
}

.wai-vertical-bar-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0
}

.wai-vertical-bar-btn {
  padding: 6px 14px;
  border: 1.5px solid #D6E2DD;
  background: #FFFFFF;
  border-radius: 20px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 500;
  color: var(--wai-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  transition: all .18s ease
}

.wai-vertical-bar-btn:hover {
  border-color: var(--wai-primary);
  background: #E8F7F0
}

.wai-vertical-bar-btn:active {
  transform: scale(.97)
}

/* ── Content Wrapper & Veil ──────────────────────────────── */
.wai-chat-content-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden
}

.wai-chat-content-veil {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .65);
  backdrop-filter: blur(2px);
  z-index: 50;
  pointer-events: all;
  transition: opacity .35s ease, visibility .35s ease
}

.wai-chat-content-veil.wai-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none
}

/* ── Loading Screen ──────────────────────────────────────── */
.wai-chat-loading-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wai-surface);
  z-index: 900;
  animation: wai-fadeIn .2s ease-out
}

.wai-chat-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 138px;
  height: 153px
}

.wai-chat-loading-text {
  margin: 0;
  font-size: .9rem;
  color: var(--wai-muted);
  font-weight: 500;
  letter-spacing: .01em
}

.wai-chat-loading-logo-wrapper {
  position: relative;
  width: 100px;
  height: 100px
}

.wai-chat-loading-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%
}

.wai-chat-loading-ring .wai-ring {
  fill: none;
  stroke: #B0F2AE;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 70 210;
  transform-origin: 50% 50%
}

.wai-chat-loading-ring .wai-ring-1 {
  animation: wai-ringRotate 1.4s linear infinite
}

.wai-chat-loading-ring .wai-ring-2 {
  animation: wai-ringRotate 1.4s linear infinite;
  animation-delay: -0.7s
}

@keyframes wai-ringRotate {
  0% {
    stroke-dashoffset: 0;
    transform: rotate(0deg)
  }

  100% {
    stroke-dashoffset: 0;
    transform: rotate(360deg)
  }
}

.wai-chat-loading-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  object-fit: contain
}

/* ── Chat Body & Welcome ─────────────────────────────────── */
.wai-chat-body {
  flex: 1;
  overflow: auto;
  padding: 20px 22px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #FFFFFF
}

.wai-welcome-section {
  padding: 8px 0 0
}

.wai-welcome-title {
  margin: 0;
  font-family: "CIBFontSans Bold", sans-serif;
  font-size: 24px;
  line-height: 26px;
  letter-spacing: -0.45px;
  color: var(--wai-primary)
}

.wai-welcome-subtitle {
  margin: 10px 0 0;
  font-family: "CIBFontSans Light", sans-serif;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.2px;
  color: var(--wai-muted)
}

/* ── Messages ────────────────────────────────────────────── */
.wai-msg {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.35;
  font-size: .95rem;
  white-space: pre-wrap;
  position: relative
}

.wai-msg-system {
  background: #ECF7F2;
  color: #1D2B26;
  border: 1px solid #D4E6DD
}

.wai-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #F2FBF7, #E8F7F0);
  color: #1F2723;
  border: 1px solid #D1EEE1
}

.wai-msg-bot {
  background: #F2F6F4;
  color: #1F2723;
  border: 1px solid #D8E2DD
}

.wai-msg .wai-sub {
  display: block;
  color: var(--wai-muted);
  font-size: 12px;
  margin-top: 6px
}

.wai-msg-timestamp {
  display: block;
  font-size: 9px;
  color: var(--wai-muted);
  opacity: .7;
  margin-top: 6px;
  text-align: right;
  font-weight: 400;
  line-height: 1
}

.wai-msg-user img,
.wai-msg-bot img {
  max-width: 180px;
  max-height: 180px;
  display: block;
  border-radius: 12px;
  margin-top: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15)
}

/* ── Agent Attachments ───────────────────────────────────── */
.wai-msg .wai-attachment-image {
  max-width: 260px;
  max-height: 260px;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 8px
}

.wai-msg .wai-attachment-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  margin-top: 8px;
  background: #FFFFFF;
  border: 1px solid #D8E2DD;
  text-decoration: none;
  color: var(--wai-text);
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  max-width: 280px
}

.wai-msg .wai-attachment-card:hover {
  background: #F2F6F4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1)
}

.wai-attachment-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0
}

.wai-attachment-card-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0
}

.wai-attachment-card-name {
  font-size: .85rem;
  font-weight: 500;
  color: #1F2723;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.wai-attachment-card-meta {
  font-size: .75rem;
  color: #7F8C8D
}

/* ── Quick Actions ───────────────────────────────────────── */
.wai-quick-actions-label {
  padding: 12px 22px 0;
  font-family: "CIBFontSans Regular", sans-serif;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.2px;
  color: var(--wai-text);
  background: #f2fdf1;
  border-top: 1px solid #E2EBE7
}

.wai-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 22px 14px;
  max-height: 170px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f2fdf1;
  border-bottom: 1px solid #E2EBE7
}

.wai-quick {
  border: 1.5px solid #D3DED8;
  background: #FFFFFF;
  color: #2C2A29;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "CIBFontSans Regular", sans-serif;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.2px;
  text-align: left;
  min-height: 62px;
  display: flex;
  align-items: center;
  transition: background .18s, border-color .18s, box-shadow .18s
}

.wai-quick:hover {
  border-color: var(--wai-primary);
  background: #F2FBF7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08)
}

/* ── Input Area ──────────────────────────────────────────── */
.wai-chat-input-area {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--wai-border);
  background: linear-gradient(180deg, #F8FBFA, #EEF5F2);
  align-items: center;
  justify-content: space-between
}

.wai-chat-input-area textarea {
  width: 394px;
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #D6E2DD;
  color: #1F2723;
  font-family: "CIBFontSans Regular", sans-serif;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: border-color .15s, box-shadow .15s;
  resize: none;
  overflow-y: hidden;
  max-height: 120px;
  min-height: 56px;
  height: 56px
}

.wai-chat-input-area textarea::placeholder {
  color: #969696
}

.wai-chat-input-area textarea:focus {
  outline: none;
  border-color: var(--wai-primary);
  box-shadow: 0 0 0 3px #00825A33
}

.wai-send-btn {
  border: none;
  padding: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e4e4e4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: transform .15s, background .15s;
  flex-shrink: 0
}

.wai-send-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block
}

.wai-send-btn:hover {
  transform: translateY(-1px);
  background: #d6d6d6
}

.wai-send-btn:active {
  transform: translateY(0);
  background: #ccc
}

.wai-attach-btn {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s;
  height: 56px;
  flex-shrink: 0
}

.wai-attach-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block
}

.wai-attach-btn:hover {
  opacity: .7
}

/* ── Attachment Preview ──────────────────────────────────── */
.wai-attachment-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 30%;
  overflow: hidden
}

.wai-attachment-preview:empty {
  display: none
}

.wai-attachment-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid #D6E2DD;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06)
}

.wai-attachment-chip img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px
}

.wai-attachment-chip .wai-name {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: #31433C
}

.wai-attachment-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #6A7A74;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  border-radius: 6px
}

.wai-attachment-remove:hover {
  background: #F2FBF7;
  color: #21332C
}

/* ── Typing Indicator ────────────────────────────────────── */
.wai-typing-indicator {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 16px;
  background: #F2F6F4;
  border: 1px solid #D8E2DD;
  display: flex;
  align-items: center;
  gap: 4px
}

.wai-typing-indicator .wai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5F6F69;
  animation: wai-typingBounce 1.4s infinite ease-in-out
}

.wai-typing-indicator .wai-dot:nth-child(1) {
  animation-delay: 0s
}

.wai-typing-indicator .wai-dot:nth-child(2) {
  animation-delay: .2s
}

.wai-typing-indicator .wai-dot:nth-child(3) {
  animation-delay: .4s
}

@keyframes wai-typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: .4
  }

  30% {
    transform: translateY(-10px);
    opacity: 1
  }
}

/* ── Terms Modal ─────────────────────────────────────────── */
.wai-terms-modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(8px);
  z-index: 1000;
  animation: wai-fadeIn .2s ease-out
}

.wai-terms-content {
  width: 548px;
  max-width: 90%;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
  overflow: hidden;
  animation: wai-slideUp .3s ease-out;
  padding: 32px 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px
}

@keyframes wai-slideUp {
  from {
    transform: translateY(20px);
    opacity: 0
  }

  to {
    transform: translateY(0);
    opacity: 1
  }
}

.wai-terms-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #5D6A65;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1
}

.wai-terms-close:hover {
  color: var(--wai-text);
  background: #00825A15
}

.wai-terms-icon {
  width: 40px;
  height: 40px;
  line-height: 1
}

.wai-terms-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block
}

.wai-terms-title {
  margin: 0;
  font-family: "CIBFontSans Bold", sans-serif;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.38px;
  text-align: center;
  color: #2C2A29
}

.wai-terms-body {
  padding: 0;
  color: #2C2A29
}

.wai-terms-body p {
  margin: 0;
  font-family: "CIBFontSans Regular", sans-serif;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.3px;
  text-align: center
}

.wai-terms-body a {
  color: var(--wai-primary);
  font-family: "CIBFontSans Bold", sans-serif;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.3px;
  text-decoration: underline;
  text-underline-offset: 12%;
  text-decoration-thickness: 7%;
  transition: color .2s
}

.wai-terms-body a:hover {
  color: var(--wai-verde-selva)
}

.wai-terms-actions {
  display: flex;
  gap: 16px;
  padding: 0;
  width: 100%;
  justify-content: center
}

.wai-terms-btn {
  width: 180px;
  border: none;
  height: 40px;
  padding: 11px 16px;
  border-radius: 100px;
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s, box-shadow .15s, background .2s
}

.wai-terms-btn-reject {
  background: #FFFFFF;
  color: var(--wai-text);
  border: 1px solid #2C2A29
}

.wai-terms-btn-reject:hover {
  background: #E8F0EC;
  transform: translateY(-1px)
}

.wai-terms-btn-accept {
  background: #B0F2AE;
  color: #2C2A29
}

.wai-terms-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 130, 90, .2)
}

.wai-terms-btn:active {
  transform: translateY(0)
}

/* ── Restart Modal ───────────────────────────────────────── */
.wai-restart-modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
  z-index: 1001;
  animation: wai-fadeIn .2s ease-out
}

.wai-restart-modal-content {
  width: min(360px, 88%);
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
  padding: 28px 24px 24px;
  text-align: center;
  animation: wai-slideUp .25s ease-out
}

.wai-restart-modal-icon {
  font-size: 36px;
  color: var(--wai-primary);
  margin-bottom: 10px;
  line-height: 1
}

.wai-restart-modal-text {
  font-size: 14px;
  color: var(--wai-text);
  line-height: 1.5;
  margin: 0 0 20px
}

.wai-restart-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center
}

.wai-restart-modal-btn {
  border: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .2s
}

.wai-restart-modal-btn-cancel {
  background: #F2F6F4;
  color: var(--wai-text);
  border: 1px solid #D8E2DD
}

.wai-restart-modal-btn-cancel:hover {
  background: #E8F0EC;
  transform: translateY(-1px)
}

.wai-restart-modal-btn-confirm {
  background: linear-gradient(135deg, #E8453C, #FF6B61);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(232, 69, 60, .25)
}

.wai-restart-modal-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(232, 69, 60, .35)
}

.wai-restart-modal-btn:active {
  transform: translateY(0)
}

/* ── Survey ──────────────────────────────────────────────── */
.wai-survey-container {
  width: 100%;
  max-width: 100%;
  background: #FFFFFF;
  border: 1px solid #D8E2DD;
  border-radius: 8px;
  padding: 0;
  margin: 16px auto;
  box-shadow: none;
  transition: opacity .3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden
}

.wai-survey-container.wai-survey-submitting {
  opacity: .7;
  pointer-events: none
}

.wai-survey-container.wai-survey-submitted {
  background: #FFFFFF;
  border-color: #D8E2DD
}

.wai-survey-title {
  font-family: "CIBFontSans Bold", sans-serif;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.38px;
  color: #00825A;
  padding: 16px;
  margin: 0;
  background: #F2FDF1;
  border-bottom: 1px solid #D8E2DD
}

.wai-survey-question {
  margin-bottom: 20px;
  padding: 0 16px
}

.wai-survey-question:first-of-type {
  margin-top: 24px
}

.wai-survey-question-text {
  font-family: "CIBFontSans Regular", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.3px;
  color: var(--wai-text);
  margin-bottom: 8px
}

.wai-survey-answer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.wai-survey-bool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 60px;
  padding: 4px 12px;
  border: none;
  background: transparent;
  color: var(--wai-text);
  font-family: "CIBFontSans Regular", sans-serif;
  border-radius: 0;
  cursor: pointer;
  transition: color .2s ease;
  font-size: 14px;
  line-height: 18px
}

.wai-survey-bool-btn::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #D6E2DD;
  background: #FFFFFF;
  flex-shrink: 0;
  transition: border-color .2s, background .2s
}

.wai-survey-bool-btn:hover::before {
  border-color: var(--wai-primary)
}

.wai-survey-bool-btn.wai-selected::before {
  border-color: var(--wai-primary);
  background: var(--wai-primary);
  box-shadow: inset 0 0 0 3px #FFFFFF
}

.wai-survey-rating-container {
  gap: 6px;
  align-items: center
}

.wai-survey-rating-star {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: #D6E2DD;
  cursor: pointer;
  transition: color .15s ease;
  padding: 2px;
  line-height: 1
}

.wai-survey-rating-star.wai-hovered {
  color: #00825A
}

.wai-survey-rating-star.wai-selected {
  color: #00825A
}

.wai-survey-rating-star:active {
  transform: scale(1.05)
}

.wai-survey-text-input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid #D6E2DD;
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--wai-text);
  font-family: "CIBFontSans Regular", sans-serif;
  font-size: 14px;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
  line-height: 18px
}

.wai-survey-text-input:focus {
  outline: none;
  border-color: var(--wai-primary);
  box-shadow: 0 0 0 2px #00825A18
}

.wai-survey-text-input::placeholder {
  color: var(--wai-muted);
  opacity: .7
}

.wai-survey-submit-btn {
  width: 171px;
  height: 40px;
  padding: 8px 16px;
  border: none;
  border-radius: 100px;
  background: #B0F2AE;
  color: #2C2A29;
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform .2s, box-shadow .2s
}

.wai-survey-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 130, 90, .3)
}

.wai-survey-submit-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none
}

.wai-survey-success {
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  color: var(--wai-primary);
  padding: 14px;
  animation: wai-successPulse .6s ease-out
}

@keyframes wai-successPulse {
  0% {
    transform: scale(.9);
    opacity: 0
  }

  50% {
    transform: scale(1.05)
  }

  100% {
    transform: scale(1);
    opacity: 1
  }
}

.wai-survey-error {
  background: #FFE9E6;
  color: #8A1F11;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #FFB5AC;
  font-size: .75rem;
  margin-top: 10px;
  animation: wai-errorShake .4s ease-out
}

@keyframes wai-errorShake {

  0%,
  100% {
    transform: translateX(0)
  }

  25% {
    transform: translateX(-8px)
  }

  75% {
    transform: translateX(8px)
  }
}

/* ── Survey Thank You ────────────────────────────────────── */
.wai-survey-thankyou {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 32px;
  text-align: center;
  animation: wai-fadeIn .3s ease-out
}

.wai-survey-thankyou-icon {
  margin-bottom: 24px
}

.wai-survey-thankyou-title {
  margin: 0 0 8px;
  font-family: "CIBFontSans Bold", sans-serif;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.38px;
  color: #00825A
}

.wai-survey-thankyou-subtitle {
  margin: 0 0 24px;
  font-family: "CIBFontSans Regular", sans-serif;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.3px;
  color: #2C2A29
}

.wai-survey-thankyou-btn {
  border: none;
  height: 40px;
  padding: 8px 24px;
  border-radius: 100px;
  background: #B0F2AE;
  color: #2C2A29;
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .15s, box-shadow .15s
}

.wai-survey-thankyou-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 130, 90, .15)
}

.wai-survey-thankyou-btn:active {
  transform: translateY(0)
}

/* ── Cursor Tooltip ──────────────────────────────────────── */
.wai-cursor-tooltip {
  position: fixed;
  pointer-events: none;
  background: var(--wai-negro);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  z-index: 99999;
  opacity: 0;
  transition: opacity .15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18)
}

.wai-cursor-tooltip.wai-visible {
  opacity: 1
}

/* ── Utilities ───────────────────────────────────────────── */
.wai-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}

/* ── Responsive ──────────────────────────────────────────── */
@media(max-width:520px) {
  .wai-chat-overlay {
    padding: 18px
  }

  .wai-chat-window {
    width: 100%;
    max-height: 92vh;
    min-height: 65vh
  }

  .wai-survey-container {
    max-width: 95%;
    padding: 12px
  }

  .wai-survey-rating-star {
    font-size: 1.2rem
  }
}
