/* ═══════════════════════════════════════════
   GLOBAL — CSS Variables & Reset
   ═══════════════════════════════════════════ */

:root {
    --bg: #0e0e14;
    --surface: #1a1a2e;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e8e8f0;
    --text-muted: #8888a0;
    --accent: #6366f1;
    --accent-hover: #5558e6;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   SHARED — Session Container & Pre-Session
   ═══════════════════════════════════════════ */

.session-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pre-session {
    text-align: center;
    max-width: 480px;
    width: 100%;
}

.logo-area h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.logo-area p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.start-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.start-form label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.start-form input {
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.start-form input:focus {
    border-color: var(--accent);
}

.start-form input::placeholder {
    color: var(--text-muted);
}

.error {
    color: #ef4444;
    font-size: 0.9rem;
    text-align: center;
}

.hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* ═══════════════════════════════════════════
   SHARED — Buttons
   ═══════════════════════════════════════════ */

.btn-start {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.btn-start:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-start:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-text {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-text:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.btn-control {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-control:hover {
    border-color: var(--accent);
}

.btn-control.active-warning {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-end {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #ef4444;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-end:hover {
    background: #ef4444;
    color: white;
}

.btn-retry {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background: var(--accent);
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════
   GLOBAL — Video element styles
   (must be in app.css because JS injects these
    elements without Blazor scoping attributes)
   ═══════════════════════════════════════════ */

#avatar-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

#self-view video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transform: scaleX(-1);
}

/* ═══════════════════════════════════════════
   Email Coaching Button
   ═══════════════════════════════════════════ */

.btn-email {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

  .btn-email:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
    text-decoration: none;
    color: var(--text);
  }

.btn-email-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 6px;
  flex-shrink: 0;
}

  .btn-email-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
  }

.btn-email:hover .btn-email-icon {
  background: rgba(99, 102, 241, 0.2);
}

/* ═══════════════════════════════════════════
   LEGAL PAGES (Terms, Privacy)
   ═══════════════════════════════════════════ */

.legal-page {
  min-height: 100vh;
  padding: 80px 24px 100px;
  display: flex;
  justify-content: center;
}

.legal-content {
  max-width: 680px;
  width: 100%;
}

  .legal-content h1 {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
  }

.legal-updated {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal-content p {
  font-size: 0.92rem;
  color: #b0b0c0;
  line-height: 1.75;
  margin-bottom: 14px;
}

.legal-content a {
  color: var(--accent);
  text-decoration: none;
}

  .legal-content a:hover {
    text-decoration: underline;
  }

.legal-content strong {
  color: var(--text);
}

/* ═══════════════════════════════════════════
   CONTACT PAGE
   ═══════════════════════════════════════════ */

.contact-page {
  min-height: 100vh;
  padding: 80px 24px 100px;
  display: flex;
  justify-content: center;
}

.contact-content {
  max-width: 640px;
  width: 100%;
  text-align: center;
}

  .contact-content h1 {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
  }

.contact-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 48px;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.contact-card {
  padding: 28px 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}

.contact-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 12px;
}

  .contact-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent);
  }

.contact-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.contact-link {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}

  .contact-link:hover {
    text-decoration: underline;
  }

.contact-company {
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}

  .contact-company h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
  }

  .contact-company p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0;
  }

.contact-response {
  margin-top: 16px;
  font-size: 0.82rem;
  color: #52525b;
}

@media (max-width: 500px) {
  .contact-cards {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════
   GLOBAL FOOTER
   ═══════════════════════════════════════════ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

  .footer-links a {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
  }

    .footer-links a:hover {
      color: var(--text);
    }

.footer-copy {
  font-size: 0.75rem;
  color: #52525b;
}

.footer-company {
  font-size: 0.72rem;
  color: #3f3f46;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════
   Entitlement Button States
   ═══════════════════════════════════════════ */

/* Locked — modality not in current plan */

.btn-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  opacity: 0.7;
  cursor: default;
  background: var(--surface);
  border: 1px dashed var(--border);
}

  .btn-locked:hover {
    opacity: 0.9;
    border-color: rgba(99, 102, 241, 0.4);
  }

.btn-locked-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.btn-locked-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

  .btn-locked-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
  }

.btn-locked-cta {
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

  .btn-locked-cta:hover {
    background: var(--accent-hover);
    color: white;
    text-decoration: none;
  }

/* Exhausted — limit reached */

.btn-exhausted {
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 8px;
  padding: 16px 18px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  cursor: default;
}

.btn-exhausted-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  font-weight: 600;
}

.btn-exhausted-label {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.btn-exhausted-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.btn-exhausted-cta {
  margin-top: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
}

  .btn-exhausted-cta:hover {
    background: var(--accent-hover);
    color: white;
    text-decoration: none;
  }

/* Usage indicator on available buttons */

.btn-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.btn-usage {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.8;
  letter-spacing: 0.02em;
}

.btn-start:hover .btn-usage {
  opacity: 1;
}


/* ═══════════════════════════════════════════
   Text chat limit-reached banner
   ═══════════════════════════════════════════ */

.tc-limit-banner {
  margin: 16px 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.tc-limit-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

  .tc-limit-icon svg {
    width: 22px;
    height: 22px;
    stroke: #fca5a5;
  }

.tc-limit-content {
  flex: 1;
}

  .tc-limit-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
  }

  .tc-limit-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
  }

.tc-limit-cta {
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

  .tc-limit-cta:hover {
    background: var(--accent-hover);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
  }
