/* ============================================================
   ai-avatar-chatbot.css
   Custom styles for AI Avatar Chatbot Solution Page
   Extends: bootstrap.css, style.css, common.css, config.css
   ============================================================ */

/* --- Custom Border Grid --- */
.avatar-border-grid {
  border-top: 1px solid var(--layoutBorderColor);
  border-left: 1px solid var(--layoutBorderColor);
}
.avatar-border-cell {
  position: relative;
  padding: 40px 32px;
  border-right: 1px solid var(--layoutBorderColor);
  border-bottom: 1px solid var(--layoutBorderColor);
  background: #ffffff;
  transition: background 0.3s ease;
}
.avatar-border-cell:hover {
  background: rgba(246, 99, 32, 0.02);
}

/* --- FAQ Accordion --- */
.faq-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}
.faq-item {
  border: 1.5px solid var(--layoutBorderColor);
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.faq-item:hover, .faq-item.active {
  border-color: var(--secondaryMastercolor);
}
.faq-trigger {
  width: 100%;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  text-align: left;
  outline: none;
  cursor: pointer;
}
.faq-question {
  font-size: 15px;
  font-weight: 600;
  color: var(--mastercolor);
  margin: 0;
}
.faq-icon-wrapper {
  color: var(--secondaryMastercolor);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq-item.active .faq-icon-wrapper {
  transform: rotate(180deg);
}
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
}
.faq-answer {
  padding: 0 28px 24px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--primaryTextColor);
  margin: 0;
}

/* --- Lead Form Frame --- */
.ctf-frame-card {
  border: 1.5px solid var(--layoutBorderColor);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.03);
}
.ctf-frame-header {
  padding: 14px 20px;
  background: var(--secondaryMastercolorLite);
}
.ctf-frame-dot {
  width: 9px;
  height: 9px;
}
.ctf-dot-red { background: #ff5f56; }
.ctf-dot-yellow { background: #ffbd2e; }
.ctf-dot-green { background: #27c93f; }

/* --- Interactive AI Avatar Chatbot Simulator Console --- */
.avatar-console {
  border: 1.5px solid var(--layoutBorderColor);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.02);
  overflow: hidden;
  transition: all 0.3s ease;
}
.avatar-console:hover {
  border-color: var(--secondaryMastercolor);
  box-shadow: 0 20px 40px rgba(246, 99, 32, 0.05);
}

.avatar-screen {
  position: relative;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-height: 320px;
  overflow: hidden;
}

/* Glowing Aura behind Avatar */
.avatar-screen::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(246, 99, 32, 0.15) 0%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  animation: auraPulse 4s ease-in-out infinite alternate;
}

@keyframes auraPulse {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* CSS-based Vector Face Avatar */
.avatar-portrait {
  width: 100px;
  height: 100px;
  background: #1e293b;
  border: 3px solid var(--secondaryMastercolor);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 20px rgba(246, 99, 32, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  overflow: hidden;
}

.avatar-face {
  width: 60px;
  height: 70px;
  background: #fbcfe8; /* pink skin tone */
  border-radius: 30px;
  position: relative;
  margin-top: 10px;
  border: 1px solid rgba(0,0,0,0.1);
}

/* Eyes */
.avatar-eye {
  width: 6px;
  height: 6px;
  background: #0f172a;
  border-radius: 50%;
  position: absolute;
  top: 25px;
}
.avatar-eye.left { left: 16px; }
.avatar-eye.right { right: 16px; }

/* Mouth */
.avatar-mouth {
  width: 16px;
  height: 8px;
  background: #db2777;
  border-radius: 0 0 8px 8px;
  position: absolute;
  bottom: 20px;
  left: 22px;
  transition: all 0.2s ease;
}

/* Talking Animation */
.avatar-portrait.speaking .avatar-mouth {
  height: 12px;
  border-radius: 50%;
  animation: mouthTalk 0.5s ease-in-out infinite alternate;
}

@keyframes mouthTalk {
  0% { transform: scaleY(0.5); }
  100% { transform: scaleY(1.3); }
}

/* Hair overlay */
.avatar-hair {
  width: 70px;
  height: 35px;
  background: #0f172a;
  border-radius: 40px 40px 0 0;
  position: absolute;
  top: 5px;
  left: -5px;
}

/* Voice Waveform animation */
.voice-wave-container {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  z-index: 2;
}

.wave-bar {
  width: 3px;
  height: 8px;
  background: var(--secondaryMastercolor);
  border-radius: 2px;
  transition: height 0.15s ease;
  will-change: height;
}

.speaking .wave-bar {
  animation: waveBarBounce 0.6s ease-in-out infinite alternate;
}

.speaking .wave-bar:nth-child(2) { animation-delay: 0.1s; }
.speaking .wave-bar:nth-child(3) { animation-delay: 0.2s; }
.speaking .wave-bar:nth-child(4) { animation-delay: 0.3s; }
.speaking .wave-bar:nth-child(5) { animation-delay: 0.15s; }
.speaking .wave-bar:nth-child(6) { animation-delay: 0.25s; }
.speaking .wave-bar:nth-child(7) { animation-delay: 0.05s; }

@keyframes waveBarBounce {
  0% { height: 8px; }
  100% { height: 32px; }
}

/* Chat bubble mockup */
.chat-bubble-mock {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--layoutBorderColor);
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  font-family: system-ui, -apple-system, sans-serif;
  z-index: 2;
}

.chat-bubble-text {
  font-size: 11px;
  font-weight: 500;
  color: #0f172a;
  margin: 0;
  line-height: 1.5;
}

.chat-bubble-label {
  font-size: 8px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondaryMastercolor);
  margin-bottom: 4px;
  display: block;
}

/* Terminal Console below */
.telemetry-console {
  background: #090d16;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 18px;
  font-family: monospace;
  font-size: 11px;
}

.telemetry-title {
  color: #64748b;
  font-size: 9px;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.telemetry-json {
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  line-height: 1.6;
}

.json-key { color: #f472b6; }
.json-string { color: #34d399; }
.json-number { color: #fb923c; }
.json-boolean { color: #818cf8; }

/* --- Additional Layout Components (referred from esign UI) --- */

.es-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(246, 99, 32, 0.06);
  border: 1px solid rgba(246, 99, 32, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--secondaryMastercolor);
  transition: all 0.3s ease;
}
.avatar-border-cell:hover .es-feature-icon {
  background: rgba(246, 99, 32, 0.12);
  border-color: rgba(246, 99, 32, 0.35);
  transform: scale(1.05);
}

.ia-tab-item {
  padding: 18px 24px;
  border: 1px solid var(--layoutBorderColor);
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ia-tab-item:hover,
.ia-tab-item.active {
  border-color: var(--secondaryMastercolor);
  background-color: rgba(246, 99, 32, 0.02);
  transform: translateX(4px);
}

.ia-tab-num {
  font-size: 16px;
  font-weight: 700;
  color: rgba(246, 99, 32, 0.3);
  line-height: 1.2;
  transition: color 0.3s ease;
}

.ia-tab-item.active .ia-tab-num {
  color: var(--secondaryMastercolor);
}

.ia-tab-info {
  flex: 1;
}

.ia-tab-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--mastercolor);
  margin-bottom: 4px;
}

.ia-tab-desc {
  font-size: 12px;
  color: var(--primaryTextColor);
  margin-bottom: 0;
  line-height: 1.5;
}

.ia-view-content {
  display: none;
}

.ia-view-content.active {
  display: block;
  animation: iaFadeIn 0.4s ease-out forwards;
}

@keyframes iaFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Entity Extraction Cards */
.entity-card {
  background: #ffffff;
  border: 1.5px solid var(--layoutBorderColor);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  height: 100%;
}
.entity-card:hover {
  border-color: var(--secondaryMastercolor);
  box-shadow: 0 12px 30px rgba(246, 99, 32, 0.05);
  transform: translateY(-3px);
}
.entity-card-icon {
  width: 36px;
  height: 36px;
  background: var(--secondaryMastercolorLite);
  color: var(--secondaryMastercolor);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.entity-tag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.entity-tag-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.entity-card:hover .entity-tag-item {
  background: #fff;
  border-color: var(--layoutBorderColor);
}
.entity-tag-label {
  font-weight: 600;
  color: var(--mastercolor);
}
.entity-tag-value {
  color: var(--primaryTextColor);
  font-family: monospace;
  font-size: 11px;
}

/* Trust Commitments Grid */
.trust-card {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.trust-card:hover {
  border-color: var(--secondaryMastercolor) !important;
  box-shadow: 0 12px 24px rgba(246, 99, 32, 0.04) !important;
  transform: translateY(-2px);
}
