/* AGTU CHATBOT - VIRTUAL SUSANA GLASSMORPHISM UI */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --chat-primary: #0f172a;
  --chat-primary-light: #1e293b;
  --chat-accent: #c5a059;
  --chat-accent-hover: #b08d48;
  --chat-accent-glow: rgba(197, 160, 89, 0.35);
  --chat-bg: rgba(255, 255, 255, 0.92);
  --chat-text: #1e293b;
  --chat-text-muted: #64748b;
  --chat-border: rgba(226, 232, 240, 0.8);
  --chat-bot-msg: #f8fafc;
  --chat-user-msg: linear-gradient(135deg, #c5a059 0%, #a37c35 100%);
  --chat-shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.05);
  --chat-shadow-btn: 0 10px 25px -5px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(197, 160, 89, 0.3);
}

.agtu-chatbot-wrapper {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999999;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Floating Toggle Button */
.agtu-chatbot-toggle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--chat-primary) 0%, var(--chat-primary-light) 100%);
  box-shadow: var(--chat-shadow-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid var(--chat-accent);
  position: relative;
  overflow: visible;
}

.agtu-chatbot-toggle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--chat-accent);
  opacity: 0.2;
  z-index: -1;
  animation: agtu-pulse 2.5s infinite ease-in-out;
}

@keyframes agtu-pulse {
  0% { transform: scale(1); opacity: 0.25; }
  50% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.agtu-chatbot-toggle:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 15px 30px -5px rgba(15, 23, 42, 0.5), 0 0 15px var(--chat-accent-glow);
}

.agtu-chatbot-toggle:active {
  transform: translateY(1px) scale(0.98);
}

.agtu-chatbot-toggle svg {
  width: 28px;
  height: 28px;
  fill: var(--chat-accent);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  position: absolute;
}

.agtu-chatbot-toggle .icon-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 1;
  transform: rotate(0deg) scale(1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.agtu-chatbot-wrapper.open .agtu-chatbot-toggle {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

/* Availability Badge on Toggle (Always Green) */
.agtu-chatbot-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  background: #10b981;
  color: white;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
  transition: transform 0.3s ease;
  z-index: 3;
}

.agtu-chatbot-wrapper.open .agtu-chatbot-badge {
  transform: scale(0);
}

/* Chat Window (Glassmorphism) — 20% higher (744px vs 620px) */
.agtu-chatbot-window {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 400px;
  height: 744px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  max-width: calc(100vw - 40px);
  max-width: calc(100dvw - 40px);
  background: var(--chat-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: var(--chat-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(0.96);
  transform-origin: bottom right;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.agtu-chatbot-wrapper.open .agtu-chatbot-window {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Header */
.agtu-chatbot-header {
  background: linear-gradient(135deg, var(--chat-primary) 0%, var(--chat-primary-light) 100%);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(197, 160, 89, 0.3);
  position: relative;
  overflow: hidden;
}

/* Subtle gold glow in header */
.agtu-chatbot-header::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--chat-accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.agtu-chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 11px;
  z-index: 1;
}

.agtu-chatbot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(197, 160, 89, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--chat-accent);
  box-shadow: 0 0 15px rgba(197, 160, 89, 0.2);
  position: relative;
  overflow: hidden;
}

.agtu-chatbot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agtu-chatbot-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.agtu-chatbot-subtitle {
  margin: 2px 0 0 0;
  font-size: 11px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.agtu-chatbot-status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
}

/* Header Action Buttons */
.agtu-chatbot-header-actions {
  display: flex;
  gap: 8px;
  z-index: 1;
  align-items: center;
}

.agtu-chatbot-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.agtu-chatbot-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.05);
}

.agtu-chatbot-action-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Talk to Advisor Prominent Button */
.agtu-advisor-btn {
  background: rgba(197, 160, 89, 0.2);
  border: 1px solid var(--chat-accent);
  color: #ffffff;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.15);
}

.agtu-advisor-btn:hover {
  background: var(--chat-accent);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

.agtu-advisor-btn svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* Messages Container */
.agtu-chatbot-messages {
  flex: 1;
  min-height: 0;
  padding: 14px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.agtu-chatbot-messages::-webkit-scrollbar {
  width: 5px;
}
.agtu-chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}
.agtu-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 10px;
}
.agtu-chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* Message Row with Avatar */
.agtu-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  flex-shrink: 0;
  animation: agtu-msg-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.agtu-msg-row.bot {
  justify-content: flex-start;
}

.agtu-msg-row.user {
  justify-content: flex-end;
}

.agtu-msg-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--chat-accent);
  flex-shrink: 0;
  margin-bottom: 2px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Message Bubbles */
.agtu-msg {
  max-width: 86%;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.42;
  word-wrap: break-word;
  position: relative;
  letter-spacing: -0.005em;
}

@keyframes agtu-msg-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.agtu-msg.bot {
  background-color: #ffffff;
  color: #000000;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(226, 232, 240, 0.8);
}

.agtu-msg.user {
  background: var(--chat-user-msg);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 15px -3px rgba(197, 160, 89, 0.4);
  font-weight: 500;
}

/* Links and Lists inside Bot Messages */
.agtu-msg.bot a {
  color: #b08d48;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.agtu-msg.bot a:hover {
  color: var(--chat-primary);
}

.agtu-msg.bot ul {
  margin: 5px 0;
  padding-left: 16px;
}

.agtu-msg.bot li {
  margin-bottom: 3px;
}
.agtu-msg.bot li:last-child {
  margin-bottom: 0;
}

.agtu-msg.bot strong {
  color: #0f172a;
  font-weight: 700;
}

/* Typing Indicator */
.agtu-typing {
  display: flex;
  gap: 5px;
  padding: 12px 14px;
  background-color: #ffffff;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  box-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(226, 232, 240, 0.8);
}

.agtu-typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--chat-accent);
  border-radius: 50%;
  animation: agtu-typing-bounce 1.4s infinite ease-in-out both;
}

.agtu-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.agtu-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes agtu-typing-bounce {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Quick Replies / Chips */
.agtu-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  padding-left: 30px;
  flex-shrink: 0;
  animation: agtu-msg-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.agtu-chip {
  background: #ffffff;
  border: 1px solid rgba(197, 160, 89, 0.5);
  color: var(--chat-primary);
  padding: 5px 10px;
  border-radius: 16px;
  font-size: 11.2px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  font-family: inherit;
}

.agtu-chip:hover {
  background: var(--chat-primary);
  color: #ffffff;
  border-color: var(--chat-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
}

.agtu-chip:active {
  transform: translateY(0);
}

/* Special Advisor Chip */
.agtu-chip.advisor-chip {
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.15) 0%, rgba(197, 160, 89, 0.25) 100%);
  border: 1.5px solid var(--chat-accent);
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 5px;
}

.agtu-chip.advisor-chip:hover {
  background: var(--chat-user-msg);
  color: #ffffff;
  border-color: transparent;
}

/* Input Area */
.agtu-chatbot-input-area {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--chat-border);
  display: flex;
  gap: 8px;
  align-items: center;
  backdrop-filter: blur(10px);
}

.agtu-chatbot-input {
  flex: 1;
  min-inline-size: 0;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 16px;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
  color: var(--chat-text);
}

.agtu-chatbot-input::placeholder {
  color: #94a3b8;
}

.agtu-chatbot-input:focus {
  border-color: var(--chat-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.agtu-chatbot-send {
  background: var(--chat-primary);
  color: var(--chat-accent);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.agtu-chatbot-send:hover:not(:disabled) {
  background: var(--chat-accent);
  color: #ffffff;
  transform: scale(1.06);
  box-shadow: 0 6px 15px rgba(197, 160, 89, 0.35);
}

.agtu-chatbot-send:active:not(:disabled) {
  transform: scale(0.95);
}

.agtu-chatbot-send:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.agtu-chatbot-send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  margin-left: 2px;
}

/* Lead Capture Form inside Chat */
.agtu-lead-form {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  margin-top: 6px;
  margin-left: 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  animation: agtu-msg-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: visible;
}

.agtu-lead-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 14px 14px 0 0;
  background: var(--chat-user-msg);
}

.agtu-lead-form h4 {
  margin: 2px 0 1px 0;
  font-size: 13.5px;
  color: var(--chat-primary);
  font-weight: 700;
}

.agtu-lead-form p {
  margin: 0 0 4px 0;
  font-size: 11.5px;
  color: var(--chat-text-muted);
  line-height: 1.35;
}

.agtu-contact-channel-group {
  display: flex;
  gap: 6px;
  margin-bottom: 2px;
}

.agtu-channel-pill {
  flex: 1;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: var(--chat-text);
  border-radius: 8px;
  padding: 7px 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: center;
}

.agtu-channel-pill:hover {
  border-color: var(--chat-accent);
  background: #ffffff;
}

.agtu-channel-pill.active {
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.18) 0%, rgba(197, 160, 89, 0.3) 100%);
  border-color: var(--chat-accent);
  color: var(--chat-primary);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(197, 160, 89, 0.2);
}

.agtu-header-close-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
}

.agtu-lead-form input,
.agtu-lead-form select,
.agtu-lead-form textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 12px;
  box-sizing: border-box;
  font-family: inherit;
  color: var(--chat-text);
  transition: all 0.2s ease;
  outline: none;
}

.agtu-lead-form textarea {
  resize: vertical;
  min-height: 48px;
}

.agtu-lead-form input:focus,
.agtu-lead-form select:focus,
.agtu-lead-form textarea:focus {
  border-color: var(--chat-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.12);
}

.agtu-lead-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.agtu-lead-form button.submit-btn {
  flex: 1;
  background: var(--chat-user-msg);
  color: white;
  border: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
  font-family: inherit;
}

.agtu-lead-form button.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(197, 160, 89, 0.4);
}

.agtu-lead-form button.submit-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.agtu-lead-form button.cancel-btn {
  background: #f1f5f9;
  color: #64748b;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.agtu-lead-form button.cancel-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Powered By Footer */
.agtu-chatbot-footer {
  text-align: center;
  padding: 8px 12px;
  background: rgba(248, 250, 252, 0.95);
  font-size: 11px;
  color: #94a3b8;
  border-top: 1px solid rgba(226, 232, 240, 0.5);
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.agtu-chatbot-footer img {
  height: 15px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.agtu-chatbot-footer img:hover {
  opacity: 1;
}

/* Proactive Welcome Bubble */
.agtu-proactive-bubble {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  max-width: min(320px, calc(100dvw - 32px));
  box-sizing: border-box;
  background: #ffffff;
  color: var(--chat-primary);
  padding: 12px 14px 12px 16px;
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(197, 160, 89, 0.3);
  font-size: 13.5px;
  line-height: 1.4;
  font-weight: 600;
  white-space: normal;
  word-break: break-word;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999998;
}

.agtu-proactive-bubble span {
  flex: 1;
  min-inline-size: 0;
}

.agtu-proactive-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.agtu-proactive-bubble:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 30px -5px rgba(15, 23, 42, 0.2), 0 0 0 1px var(--chat-accent);
}

.agtu-proactive-close {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 2px;
}

.agtu-proactive-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ==========================================================================
   SIRI-STYLE VOICE MODE (VIRTUAL SUSANA)
   ========================================================================== */

/* Input Bar Siri Voice Trigger Button (Hidden until voice development resumes) */
.agtu-chatbot-voice-btn {
  display: none !important;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(197, 160, 89, 0.45);
  background: radial-gradient(circle at 30% 30%, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18), 0 0 12px rgba(56, 189, 248, 0.2);
  overflow: hidden;
}

.agtu-chatbot-voice-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #00f2fe, #7928ca, #ff0844, #c5a059, #00f2fe);
  opacity: 0.55;
  z-index: 0;
  animation: agtu-siri-spin 4s linear infinite;
}

.agtu-chatbot-voice-btn::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: #0f172a;
  z-index: 1;
}

.agtu-chatbot-voice-btn svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
  position: relative;
  z-index: 2;
  transition: transform 0.25s ease;
}

.agtu-chatbot-voice-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 18px rgba(121, 40, 202, 0.38), 0 0 16px rgba(0, 242, 254, 0.35);
}

.agtu-chatbot-voice-btn:hover svg {
  transform: scale(1.1);
}

/* Header Voice Mode Button (Hidden until voice development resumes) */
.agtu-header-voice-btn {
  display: none !important;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.16), rgba(121, 40, 202, 0.24));
  color: #ffffff;
}

.agtu-header-voice-btn:hover {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.32), rgba(255, 8, 68, 0.32));
  border-color: rgba(0, 242, 254, 0.8);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.35);
}

/* Full-Window Siri Voice Overlay */
.agtu-voice-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background:
    radial-gradient(circle at 50% 32%, rgba(56, 189, 248, 0.14) 0%, transparent 55%),
    radial-gradient(circle at 30% 65%, rgba(121, 40, 202, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 75% 60%, rgba(255, 8, 68, 0.12) 0%, transparent 55%),
    linear-gradient(165deg, #050814 0%, #0b1124 55%, #110e24 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px 20px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: #ffffff;
  overflow: hidden;
}

/* Apple Intelligence / Siri Iridescent Edge Glow */
.agtu-voice-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: conic-gradient(
    from var(--siri-angle, 0deg),
    rgba(0, 242, 254, 0.65),
    rgba(121, 40, 202, 0.65),
    rgba(255, 8, 68, 0.65),
    rgba(197, 160, 89, 0.65),
    rgba(0, 242, 254, 0.65)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  animation: agtu-siri-border-pulse 3s ease-in-out infinite alternate;
}

@keyframes agtu-siri-border-pulse {
  0% { opacity: 0.45; filter: blur(0.5px); }
  100% { opacity: 0.9; filter: blur(1.5px); }
}

.agtu-voice-overlay.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Top Bar inside Voice Overlay */
.agtu-voice-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.agtu-voice-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agtu-voice-avatar-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 1.5px;
  background: linear-gradient(135deg, #00f2fe, #ff0844, #c5a059);
  position: relative;
}

.agtu-voice-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.agtu-voice-identity-text h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.agtu-voice-identity-text span {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.agtu-voice-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  font-family: inherit;
  backdrop-filter: blur(8px);
}

.agtu-voice-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.agtu-voice-close-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Center Stage: Dedicated Sound Waves for Sound In (Mic) & Sound Out (Susana) */
.agtu-voice-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  min-height: 0;
  padding: 8px 0;
  gap: 10px;
}

.agtu-voice-wave-box {
  width: 100%;
  background: rgba(15, 23, 42, 0.72);
  border: 1.5px solid rgba(56, 189, 248, 0.28);
  border-radius: 20px;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.45), 0 8px 28px rgba(0, 0, 0, 0.3);
}

.agtu-voice-overlay[data-state="listening"] .agtu-voice-wave-box {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: inset 0 0 28px rgba(16, 185, 129, 0.12), 0 0 25px rgba(16, 185, 129, 0.22);
}

.agtu-voice-overlay[data-state="speaking"] .agtu-voice-wave-box {
  border-color: rgba(197, 160, 89, 0.75);
  box-shadow: inset 0 0 28px rgba(197, 160, 89, 0.15), 0 0 25px rgba(197, 160, 89, 0.25);
}

.agtu-voice-overlay[data-state="thinking"] .agtu-voice-wave-box {
  border-color: rgba(234, 179, 8, 0.55);
}

@keyframes agtu-siri-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Sound Wave Canvas (Sound In & Sound Out) */
.agtu-siri-canvas {
  width: 100%;
  height: 116px;
  display: block;
  pointer-events: none;
}

/* Status Pill */
.agtu-voice-status {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 5px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.25s ease;
}

.agtu-voice-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.agtu-voice-overlay[data-state="listening"] .agtu-voice-status {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
}

.agtu-voice-overlay[data-state="listening"] .agtu-voice-status::before {
  animation: agtu-mic-blink 1s ease-in-out infinite alternate;
}

@keyframes agtu-mic-blink {
  0% { opacity: 0.35; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.2); }
}

.agtu-voice-overlay[data-state="speaking"] .agtu-voice-status {
  color: #fbbf24;
  background: rgba(197, 160, 89, 0.18);
  border-color: rgba(197, 160, 89, 0.5);
}

.agtu-voice-overlay[data-state="thinking"] .agtu-voice-status {
  color: #eab308;
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(234, 179, 8, 0.35);
}

/* Live Transcript / Subtitle Box */
.agtu-voice-transcript {
  width: 100%;
  max-height: 170px;
  overflow-y: auto;
  text-align: center;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14.5px;
  line-height: 1.48;
  color: #f8fafc;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.agtu-voice-transcript::-webkit-scrollbar {
  width: 4px;
}
.agtu-voice-transcript::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.agtu-voice-transcript a {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: underline;
}

.agtu-voice-transcript strong {
  color: #facc15;
  font-weight: 700;
}

.agtu-voice-user-echo {
  display: block;
  font-size: 12.5px;
  color: #94a3b8;
  font-style: italic;
  margin-bottom: 6px;
}

/* Bottom Controls Bar */
.agtu-voice-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 2;
  padding-top: 8px;
}

.agtu-voice-ctrl-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
  font-family: inherit;
  backdrop-filter: blur(8px);
}

.agtu-voice-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.agtu-voice-ctrl-btn.primary-mic {
  background: linear-gradient(135deg, #00f2fe 0%, #7928ca 55%, #ff0844 100%);
  border: none;
  color: #ffffff;
  padding: 10px 20px;
  box-shadow: 0 6px 20px rgba(121, 40, 202, 0.45);
}

.agtu-voice-ctrl-btn.primary-mic:hover {
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.55);
  transform: translateY(-2px) scale(1.02);
}

.agtu-voice-ctrl-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .agtu-chatbot-wrapper {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    right: 14px;
  }

  .agtu-chatbot-toggle {
    width: 58px;
    height: 58px;
  }

  .agtu-proactive-bubble {
    bottom: 68px;
    right: 0;
    width: calc(100vw - 28px);
    width: calc(100dvw - 28px);
    max-width: 300px;
    font-size: 12.5px;
    line-height: 1.38;
    padding: 10px 12px 10px 14px;
    white-space: normal;
  }

  .agtu-chatbot-window {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
    height: min(560px, calc(100vh - 96px));
    height: min(560px, calc(100dvh - 84px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 20px;
  }

  .agtu-chatbot-header {
    padding: 12px 14px;
    gap: 8px;
    flex-shrink: 0;
  }

  .agtu-chatbot-header-info {
    min-inline-size: 0;
    gap: 9px;
  }

  .agtu-chatbot-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .agtu-chatbot-header-actions {
    flex-shrink: 0;
    gap: 6px;
  }

  .agtu-advisor-btn {
    padding: 5px 10px;
    font-size: 11px;
  }

  .agtu-chatbot-input-area {
    padding: 9px 10px;
    flex-shrink: 0;
  }

  .agtu-chatbot-input {
    font-size: 16px;
    padding: 9px 12px;
  }

  .agtu-lead-form {
    margin-left: 0;
    padding: 12px;
  }

  .agtu-lead-form input,
  .agtu-lead-form select,
  .agtu-lead-form textarea {
    font-size: 16px;
  }

  .agtu-chatbot-window.keyboard-open .agtu-chatbot-header {
    padding: 9px 12px;
  }

  .agtu-chatbot-window.keyboard-open .agtu-chatbot-footer {
    display: none;
  }
}
