/* ==========================================================================
   Guia Lupa - Consultor de assinaturas (consultor.js).
   Mesmo acabamento dourado do aplicativo (GOLD em TierShowcase.tsx). A janela
   segue o tema do site (claro/escuro); na pagina /assinaturas, que nao usa o
   site.css, fica no escuro dela.
   ========================================================================== */

.gc-dock, .gc-overlay {
  --gc-deep0: #1C1404; --gc-deep1: #4A340A; --gc-deep2: #8A6416;
  --gc-shine0: #FFF3C4; --gc-shine1: #F5D57A; --gc-shine2: #D4A017; --gc-shine3: #A87A12;
  --gc-text: #FFF4D6; --gc-soft: #F5D57A; --gc-ink: #2A1E05;
  --gc-bg: var(--bg, #0B1220); --gc-surface: var(--surface, #121B2C); --gc-fg: var(--text, #EEF3FB);
  --gc-muted: var(--muted, #a3adbd); --gc-faint: var(--faint, #7c8698); --gc-line: var(--line, #22314b);
  --gc-danger: var(--danger, #F87171);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------------------------------------------------------------- botao */
.gc-dock { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px)); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; animation: gc-bob 3.6s ease-in-out infinite; }
.gc-dock.in-stack { position: static; z-index: auto; }
.gc-dock > * { pointer-events: auto; }
.gc-tip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--gc-soft); background: #FFF8E1; color: var(--gc-ink); font-size: 12px; font-weight: 700; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; pointer-events: none !important; white-space: nowrap; }
.gc-tip ion-icon { color: var(--gc-shine2); font-size: 12px; }
.gc-dock.tip-on:not(.seen) .gc-tip { opacity: 1; transform: none; }
.gc-orb { position: relative; width: 72px; height: 72px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.gc-orb:focus-visible { outline: 3px solid var(--gc-shine1); outline-offset: 2px; border-radius: 50%; }
.gc-halo { position: absolute; width: 58px; height: 58px; border-radius: 50%; background: var(--gc-shine2); animation: gc-pulse 2.6s cubic-bezier(.25, .46, .45, .94) infinite; }
.gc-ring { position: absolute; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(from 0deg, var(--gc-shine0), var(--gc-shine2), var(--gc-shine3), var(--gc-shine1), var(--gc-shine0)); animation: gc-spin 9s linear infinite; }
.gc-core { position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--gc-deep1), var(--gc-deep0)); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); color: var(--gc-soft); font-size: 22px; transition: transform .15s ease; }
.gc-orb:active .gc-core { transform: scale(.94); }
.gc-spark { position: absolute; right: 13px; top: 11px; font-size: 11px; color: var(--gc-shine0); display: grid; }
.gc-dock.still, .gc-dock.still .gc-halo, .gc-dock.still .gc-ring { animation: none; }
.gc-dock.still .gc-halo { opacity: 0; }
@keyframes gc-pulse { from { opacity: .45; transform: scale(1); } to { opacity: 0; transform: scale(1.75); } }
@keyframes gc-spin { to { transform: rotate(360deg); } }
@keyframes gc-bob { 50% { transform: translateY(-4px); } }

/* ---------------------------------------------------------------- janela */
.gc-lock, .gc-lock body { overflow: hidden; }
.gc-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 14px; }
.gc-overlay[hidden] { display: none; }
.gc-scrim { position: absolute; inset: 0; background: rgba(10, 18, 40, .6); animation: gc-fade .2s ease; }
.gc-dialog { position: relative; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 640px; height: 90vh; height: 90dvh; max-height: 760px; overflow: hidden; padding-bottom: 12px; border-radius: 24px; border: 1px solid var(--gc-soft); background: var(--gc-bg); color: var(--gc-fg); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); animation: gc-pop .26s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes gc-fade { from { opacity: 0; } }
@keyframes gc-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.gc-head { display: flex; align-items: center; gap: 10px; padding: 12px 8px 12px 14px; background: linear-gradient(135deg, var(--gc-deep0), var(--gc-deep1), var(--gc-deep2)); }
.gc-head__ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: linear-gradient(180deg, var(--gc-shine1), var(--gc-shine2)); color: var(--gc-ink); font-size: 18px; }
.gc-head__t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.gc-head h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--gc-text); letter-spacing: -.2px; }
.gc-head small { color: var(--gc-soft); font-size: 12px; font-weight: 600; }
.gc-x { width: 44px; height: 44px; border: 0; background: none; color: var(--gc-text); font-size: 24px; display: grid; place-items: center; cursor: pointer; border-radius: 12px; }
.gc-x:hover { background: rgba(255, 255, 255, .08); }

.gc-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 14px 6px; overscroll-behavior: contain; }
.gc-msg { display: flex; flex-direction: column; gap: 8px; }
.gc-msg.gc-new { animation: gc-in .22s ease; }
@keyframes gc-in { from { opacity: 0; transform: translateY(8px); } }
.gc-msg.user { align-items: flex-end; }
.gc-msg.assistant { align-items: stretch; }
.gc-bubble { max-width: 92%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.gc-msg.user .gc-bubble { background: var(--gc-shine2); color: var(--gc-ink); }
.gc-msg.assistant .gc-bubble { align-self: flex-start; background: var(--gc-surface); border: 1px solid var(--gc-line); }
.gc-bubble b { font-weight: 800; }
.gc-audio { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; }
.gc-think { display: inline-flex; align-items: center; gap: 4px; color: var(--gc-muted); }
.gc-think i { width: 6px; height: 6px; border-radius: 50%; background: var(--gc-shine2); animation: gc-dot 1s ease-in-out infinite; }
.gc-think i:nth-child(2) { animation-delay: .15s; }
.gc-think i:nth-child(3) { animation-delay: .3s; }
.gc-think span { margin-left: 6px; }
@keyframes gc-dot { 50% { opacity: .3; transform: translateY(-3px); } }

/* Cartao da indicacao */
.gc-rec { display: grid; gap: 6px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, var(--gc-deep0), var(--gc-deep1)); color: var(--gc-text); }
.gc-rec__k { display: flex; align-items: center; gap: 6px; color: var(--gc-soft); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; }
.gc-rec__k ion-icon { font-size: 18px; }
.gc-rec h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.gc-rec__i { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13.5px; line-height: 1.4; }
.gc-rec__i ion-icon { color: var(--gc-soft); font-size: 15px; flex-shrink: 0; margin-top: 2px; }
.gc-rec__p { margin: 2px 0 0; color: var(--gc-soft); font-size: 13.5px; font-weight: 600; }
.gc-rec small { color: var(--gc-soft); font-size: 12px; line-height: 1.4; }
.gc-rec__b { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.gc-rec__main { flex: 1; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; cursor: pointer; background: linear-gradient(90deg, var(--gc-shine0), var(--gc-shine1), var(--gc-shine2)); color: var(--gc-ink); font: inherit; font-weight: 800; font-size: 15px; transition: filter .15s ease; }
.gc-rec__main:hover { filter: brightness(1.05); }
.gc-rec__main:disabled { opacity: .6; cursor: progress; }
.gc-rec__alt { min-height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--gc-soft); background: none; color: var(--gc-text); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.gc-rec__trial { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; border: 1.5px dashed var(--gc-soft); background: none; color: var(--gc-text); font: inherit; font-weight: 800; font-size: 14.5px; cursor: pointer; margin-top: 2px; }
.gc-rec__trial ion-icon { color: var(--gc-soft); font-size: 16px; }
.gc-rec__trial:hover { background: rgba(245, 213, 122, .08); }
.gc-confirm { display: grid; gap: 6px; padding: 14px; border-radius: 18px; background: #FFF8E1; color: var(--gc-ink); border: 1px solid var(--gc-soft); font-size: 13.5px; line-height: 1.45; }
.gc-confirm p { margin: 0; }
.gc-confirm .gc-rec__alt { color: var(--gc-ink); border-color: var(--gc-shine3); }
.gc-next { display: flex; flex-wrap: wrap; gap: 8px; }
.gc-next a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--gc-soft); color: var(--gc-fg); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.gc-next a:hover { background: rgba(245, 213, 122, .1); }

/* Atalhos, gravacao e campo */
.gc-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px 2px; flex-shrink: 0; scrollbar-width: none; }
.gc-chips::-webkit-scrollbar { display: none; }
.gc-chips[hidden] { display: none; }
.gc-chip { flex-shrink: 0; max-width: 260px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--gc-soft); background: var(--gc-surface); color: var(--gc-fg); font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.gc-chip:hover { background: var(--gc-shine0); color: var(--gc-ink); }
.gc-rectip { display: flex; align-items: center; gap: 6px; align-self: center; padding: 6px 12px; border-radius: 999px; background: #FFF8E1; border: 1px solid var(--gc-soft); color: var(--gc-ink); font-size: 13px; font-weight: 600; }
.gc-rectip[hidden] { display: none; }
.gc-rectip i { width: 10px; height: 10px; border-radius: 50%; background: #DC2626; animation: gc-dot 1s ease-in-out infinite; }
.gc-err { margin: 0; padding: 0 14px; color: var(--gc-danger); font-size: 13px; font-weight: 600; }
.gc-err[hidden] { display: none; }
.gc-input { display: flex; align-items: flex-end; gap: 8px; margin: 0 14px; padding: 6px 6px 6px 14px; border-radius: 22px; border: 1px solid var(--gc-soft); background: var(--gc-surface); }
.gc-input textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 110px; padding: 9px 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--gc-fg); font: inherit; font-size: 16px; line-height: 22px; }
.gc-input textarea::placeholder { color: var(--gc-faint); }
.gc-send { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: linear-gradient(180deg, var(--gc-shine1), var(--gc-shine2)); color: var(--gc-ink); font-size: 20px; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.gc-send:disabled { opacity: .5; cursor: default; }
.gc-send.rec { background: linear-gradient(180deg, #DC2626, #B91C1C); color: #fff; animation: gc-recpulse 1.2s ease-in-out infinite; }
@keyframes gc-recpulse { 50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, .2); } }
.gc-foot { margin: 0; padding: 0 14px; text-align: center; color: var(--gc-faint); font-size: 12px; }

@media (max-width: 560px) {
  .gc-overlay { padding: 0; align-items: end; }
  .gc-dialog { max-width: none; height: 92vh; height: 92dvh; max-height: none; border-radius: 24px 24px 0 0; border-bottom: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .gc-dock, .gc-halo, .gc-ring, .gc-think i, .gc-send.rec, .gc-rectip i, .gc-msg.gc-new, .gc-dialog, .gc-scrim { animation: none !important; }
  .gc-halo { opacity: 0; }
}
