/* ============================================
   ASK CATS — Felines Love Hybrid Cat Hotline
   Obsidian & Gold Luxury Aesthetic + Drawer UX
   ============================================ */

.ac-body {
  min-height: 100vh;
  background: var(--gradient-hero);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  position: relative;
}

.ac-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}

/* --- Top Bar --- */
.ac-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
}

.ac-topbar__left,
.ac-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 110px;
}

.ac-topbar__right {
  justify-content: flex-end;
}

.ac-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-heading);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.ac-menu-btn:hover {
  border-color: var(--color-gold);
  background: rgba(201, 169, 110, 0.08);
}

.ac-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text-heading);
  text-decoration: none;
}

.ac-brand-link span {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ac-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: rgba(30, 30, 30, 0.85);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.ac-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 8px rgba(201, 169, 110, 0.7);
}

.ac-dot--live {
  background: var(--color-sage-light);
  box-shadow: 0 0 10px rgba(163, 196, 154, 0.85);
}

/* --- Ask Wines-Style Slide-out Left Drawer --- */
.ac-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ac-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.ac-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: #141414;
  border-right: 1px solid var(--color-border-hover);
  z-index: 1200;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
}

.ac-drawer.open {
  transform: translateX(0);
}

.ac-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.25rem;
}

.ac-drawer__close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.ac-drawer__close:hover {
  color: var(--color-gold);
}

.ac-drawer__primary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.ac-drawer__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.ac-drawer__link:hover,
.ac-drawer__link--active {
  background: rgba(201, 169, 110, 0.1);
  border-color: var(--color-border);
  color: var(--color-gold-light);
}

.ac-drawer__foot {
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ac-drawer__foot a {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  padding: 0.3rem 0.4rem;
}

.ac-drawer__foot a:hover {
  color: var(--color-gold);
}

.ac-drawer__credit {
  margin-top: 0.65rem;
  font-size: 0.76rem;
  color: var(--color-text-dim);
  line-height: 1.5;
}

/* --- Main Chat Shell --- */
.ac-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.ac-main--centered {
  justify-content: center;
  min-height: calc(100vh - 60px);
}

.ac-hero {
  text-align: center;
  margin-bottom: 2rem;
  animation: quizFade 0.45s ease forwards;
}

.ac-emblem {
  width: 78px;
  height: 78px;
  margin: 0 auto 1.15rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2a2419, #141414);
  border: 2.5px solid var(--color-gold);
  box-shadow: 0 0 36px rgba(201, 169, 110, 0.25), 0 6px 0 rgba(201, 169, 110, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--color-gold-light);
}

.ac-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 0.6rem;
  color: var(--color-text-heading);
}

.ac-hero__sub {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 540px;
  margin: 0 auto 1.4rem;
}

.ac-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  max-width: 680px;
  margin: 0 auto;
}

.ac-chip {
  padding: 0.48rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-hover);
  background: rgba(30, 30, 30, 0.78);
  color: var(--color-text);
  font-size: 0.84rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.ac-chip:hover {
  transform: translateY(-2px);
  border-color: var(--color-gold);
  background: rgba(201, 169, 110, 0.12);
  color: var(--color-gold-light);
}

/* --- Conversation Thread --- */
.ac-thread {
  display: none;
  flex-direction: column;
  gap: 1.15rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  flex: 1;
}

.ac-thread.active {
  display: flex;
}

.ac-urgent-banner {
  background: rgba(185, 28, 28, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.55);
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  color: #fee2e2;
  font-size: 0.94rem;
  line-height: 1.55;
}

.ac-urgent-banner strong {
  color: #fca5a5;
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.ac-msg {
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--gradient-card);
  box-shadow: var(--shadow-card);
  line-height: 1.65;
  animation: quizFade 0.25s ease forwards;
}

.ac-msg--user {
  align-self: flex-end;
  max-width: 84%;
  background: rgba(201, 169, 110, 0.12);
  border-color: rgba(201, 169, 110, 0.38);
}

.ac-msg--ai {
  align-self: stretch;
  border-color: var(--color-border);
}

.ac-msg--pro {
  align-self: stretch;
  border: 1px solid var(--color-gold);
  background: linear-gradient(145deg, #211d15 0%, #171717 100%);
  box-shadow: 0 8px 32px rgba(201, 169, 110, 0.14);
}

.ac-msg--system {
  align-self: stretch;
  background: rgba(125, 155, 118, 0.08);
  border-color: rgba(125, 155, 118, 0.35);
  font-size: 0.94rem;
}

.ac-msg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.ac-msg__sender {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-gold-light);
}

.ac-msg--user .ac-msg__sender {
  color: var(--color-text-heading);
}

.ac-msg--pro .ac-msg__sender {
  color: var(--color-gold);
}

.ac-msg__role {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ac-msg__body {
  white-space: pre-line;
  color: var(--color-text);
  font-size: 0.98rem;
}

.ac-citations {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
}

.ac-cite-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.ac-cite-card:hover {
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

.ac-cite-card__kind {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold);
}

.ac-cite-card__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-heading);
  line-height: 1.35;
}

.ac-cite-card__cta {
  font-size: 0.78rem;
  color: var(--color-gold-light);
  margin-top: auto;
}

/* --- Human Escalation Card --- */
.ac-escalate-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(201, 169, 110, 0.45);
  background: rgba(201, 169, 110, 0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.ac-escalate-box p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
  flex: 1;
  min-width: 220px;
}

.ac-escalate-box strong {
  color: var(--color-text-heading);
}

.ac-escalate-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ac-email-mini {
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-hover);
  background: #141414;
  color: var(--color-text);
  font-size: 0.86rem;
  min-width: 255px;
  max-width: 340px;
  flex: 1;
  font-family: var(--font-body);
}

/* --- Prompt Composer (Ask Wines Pill Style in Dark & Gold) --- */
.ac-composer-wrap {
  position: sticky;
  bottom: 0;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background: linear-gradient(to top, rgba(15, 15, 15, 0.98) 70%, rgba(15, 15, 15, 0));
}

.ac-composer {
  background: #181818;
  border: 2px solid var(--color-gold);
  border-radius: 22px;
  padding: 0.7rem 0.8rem 0.65rem 1.15rem;
  box-shadow: 0 6px 0 rgba(201, 169, 110, 0.2), 0 18px 40px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ac-composer__row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.ac-textarea {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--color-text-heading);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.5;
  resize: none;
  min-height: 28px;
  max-height: 150px;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 110, 0.35) transparent;
  outline: none;
}

.ac-textarea::placeholder {
  color: var(--color-text-muted);
}

.ac-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-gold);
  color: #0f0f0f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.ac-send-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.ac-send-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.ac-composer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-top: 1px solid rgba(201, 169, 110, 0.14);
  padding-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.ac-catname-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  width: 175px;
  max-width: 100%;
  font-family: var(--font-body);
}

.ac-human-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
  color: var(--color-text-muted);
}

.ac-human-toggle input {
  accent-color: var(--color-gold);
}

.ac-footnote {
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-dim);
  margin-top: 0.75rem;
  line-height: 1.5;
}

.ac-footnote a {
  color: var(--color-gold);
  text-decoration: underline;
}

/* --- Secondary Pages (Pros, About, Login, Dashboard) --- */
.ac-page {
  position: relative;
  z-index: 1;
  max-width: 1020px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.ac-page--narrow {
  max-width: 720px;
}

.ac-page__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.ac-page__badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(201, 169, 110, 0.12);
  border: 1px solid var(--color-border-hover);
  color: var(--color-gold);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.ac-page__header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 0.65rem;
}

.ac-page__header p {
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto;
}

.ac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.ac-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ac-card--featured {
  border-color: rgba(201, 169, 110, 0.45);
}

.ac-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ac-card h3 {
  font-size: 1.28rem;
  color: var(--color-text-heading);
}

.ac-card__subtitle {
  color: var(--color-gold);
  font-size: 0.88rem;
  font-weight: 600;
}

.ac-card__bio {
  color: var(--color-text-muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

.ac-form-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border-hover);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.ac-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.ac-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ac-field--full {
  grid-column: 1 / -1;
}

.ac-field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-text-heading);
}

.ac-input,
.ac-form-textarea {
  padding: 0.72rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-hover);
  background: #121212;
  color: var(--color-text-heading);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.ac-input:focus,
.ac-form-textarea:focus {
  border-color: var(--color-gold);
}

.ac-alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-size: 0.92rem;
  display: none;
}

.ac-alert.show {
  display: block;
}

.ac-alert--ok {
  background: rgba(125, 155, 118, 0.16);
  border: 1px solid var(--color-sage);
  color: var(--color-sage-light);
}

.ac-alert--err {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

/* Dashboard Specific */
.ac-dash-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-hover);
  background: var(--gradient-card);
  margin-bottom: 1.5rem;
}

.ac-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.ac-tab {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-body);
}

.ac-tab.active {
  background: var(--gradient-gold);
  color: #0f0f0f;
  border-color: transparent;
}

.ac-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 720px) {
  .ac-form-grid {
    grid-template-columns: 1fr;
  }
  .ac-status-pill {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }
  .ac-msg--user {
    max-width: 96%;
  }
}
