/*
  Popups do site, todos com mesma identidade visual.
  Cores vinculadas via var(--primary), var(--secondary), var(--accent)
  que vem do config/site.php injetadas no head do PHP.
*/

/* OVERLAY base */
.tc-popup-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.7); backdrop-filter: blur(4px); z-index: 9000; display: none; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity .25s ease; }
.tc-popup-overlay.open { display: flex; opacity: 1; }
.tc-popup-card { background: #fff; border-radius: 22px; padding: 28px 26px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.25); max-width: 440px; width: 100%; transform: translateY(20px) scale(.97); transition: transform .35s cubic-bezier(.34,1.4,.64,1), opacity .18s ease; }
.tc-popup-card.stepping { opacity: .35; transform: translateY(0) scale(.98); }
.tc-popup-overlay.open .tc-popup-card { transform: translateY(0) scale(1); }
.tc-popup-title { font-family: 'Sora','Plus Jakarta Sans',sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--secondary); text-align: center; margin-bottom: 10px; letter-spacing: -.02em; }
.tc-popup-sub { font-size: .95rem; color: var(--ink-soft, #475569); text-align: center; margin-bottom: 18px; line-height: 1.5; }
.tc-popup-sub .accent { color: var(--primary); font-weight: 700; }
.tc-popup-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.tc-popup-btn { padding: 14px 20px; border-radius: 12px; font-weight: 700; font-size: .96rem; border: 0; cursor: pointer; transition: transform .12s, opacity .15s; font-family: inherit; }
.tc-popup-btn:active { transform: scale(.97); }
.tc-popup-btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(255,0,4,.30); }
.tc-popup-btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255,0,4,.35); }
.tc-popup-btn-primary:disabled { background: var(--primary); box-shadow: none; cursor: not-allowed; }
.tc-popup-btn-secondary { background: var(--accent); color: #fff; }
.tc-popup-btn-ghost { background: transparent; color: var(--ink-soft, #475569); font-weight: 600; padding: 10px; }
.tc-popup-disclaimer { font-size: .72rem; color: #94a3b8; margin-top: 14px; line-height: 1.5; text-align: center; }
.tc-popup-disclaimer a { color: var(--primary); text-decoration: underline; }

/* SELECT estilizado */
.tc-popup-select, .tc-popup-input { width: 100%; padding: 13px 14px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 1rem; outline: none; font-family: inherit; background: #fff; color: var(--secondary); transition: border-color .2s; appearance: none; -webkit-appearance: none; }
.tc-popup-select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23475569' stroke-width='2'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 38px; }
.tc-popup-select:focus, .tc-popup-input:focus { border-color: var(--primary); }

/* AUTOCOMPLETE LIST - inline (não absolute) pra não cobrir botão */
.tc-popup-autocomplete-wrap { position: relative; }
.tc-popup-autocomplete-list { background: #fff; border: 1.5px solid #e2e8f0; border-top: 0; border-radius: 0 0 12px 12px; max-height: 200px; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,.06); display: none; margin-bottom: 10px; list-style: none; padding: 0; }
.tc-popup-autocomplete-list.open { display: block; }
.tc-popup-autocomplete-list li { padding: 10px 14px; cursor: pointer; font-size: .92rem; color: var(--secondary); transition: background .12s; border-bottom: 1px solid #f1f5f9; }
.tc-popup-autocomplete-list li:last-child { border-bottom: 0; }
.tc-popup-autocomplete-list li:hover, .tc-popup-autocomplete-list li.active { background: var(--primary-soft); color: var(--primary); }
.tc-popup-autocomplete-list .empty { padding: 11px 14px; color: #94a3b8; font-size: .88rem; cursor: default; }

/* Cidade pré-selecionada display */
.tc-cidade-predef { background: var(--primary-soft); border: 2px solid var(--primary); border-radius: 12px; padding: 16px; text-align: center; margin: 12px 0; }
.tc-cidade-predef .label { font-size: .82rem; color: var(--ink-soft, #475569); margin-bottom: 4px; }
.tc-cidade-predef .nome { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.tc-trocar-btn { background: transparent; color: var(--ink-soft, #475569); border: 1.5px dashed #cbd5e1; padding: 10px; border-radius: 10px; font-weight: 600; font-size: .88rem; cursor: pointer; width: 100%; transition: background .15s, border-color .15s; }
.tc-trocar-btn:hover { background: #f8fafc; border-color: var(--primary); color: var(--primary); }

/* GEO POPUP ÍCONE */
.tc-geo-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }

/* LOADING SPINNER POPUP */
.tc-popup-spinner { width: 48px; height: 48px; margin: 18px auto 16px; border: 4px solid #e2e8f0; border-top-color: var(--primary); border-radius: 50%; animation: tcSpin .8s linear infinite; }
@keyframes tcSpin { to { transform: rotate(360deg); } }

/* RESULT POPUP */
.tc-result-check { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(22,163,74,.25); }
.tc-result-line { background: var(--primary-soft); padding: 12px 16px; border-radius: 10px; text-align: center; margin: 10px 0; }
.tc-result-line strong { color: var(--primary); font-size: 1.1rem; }

/* SCHEDULE POPUP */
.tc-schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tc-schedule-grid .tc-popup-btn { padding: 16px 12px; font-size: .92rem; }

/* TIMER TOP BAR */
.tc-timer-bar { background: var(--primary); color: #fff; padding: 10px 16px; text-align: center; font-size: .85rem; font-weight: 700; letter-spacing: .02em; box-shadow: 0 1px 0 rgba(0,0,0,.08); position: relative; z-index: 60; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.tc-timer-label { opacity: .92; }
.tc-timer-blocks { display: inline-flex; gap: 6px; }
.tc-timer-block { background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 6px; font-variant-numeric: tabular-nums; min-width: 38px; text-align: center; }
.tc-timer-block .num { font-weight: 800; font-size: 1rem; }
.tc-timer-block .lbl { font-size: .68rem; opacity: .85; margin-left: 3px; }
.tc-timer-disclaimer { background: #f8fafc; color: #64748b; font-size: .68rem; padding: 6px 16px; text-align: center; border-bottom: 1px solid #f1f5f9; line-height: 1.4; }

/* HEADER PÓS LOCALIZAÇÃO */
.tc-loja-header { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 18px 20px 16px; position: relative; z-index: 50; }
.tc-loja-inner { max-width: 1024px; margin: 0 auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tc-loja-logo { width: 62px; height: 62px; border-radius: 50%; background: #fff; padding: 4px; border: 3px solid var(--primary); object-fit: contain; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.tc-loja-info { flex: 1; min-width: 0; }
.tc-loja-name { font-family: 'Sora',sans-serif; font-size: 1.25rem; font-weight: 800; color: var(--primary); line-height: 1.1; letter-spacing: -.01em; }
.tc-loja-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-soft,#475569); margin-top: 4px; align-items: center; }
.tc-loja-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.tc-loja-meta-item .free { color: var(--accent); font-weight: 700; }
.tc-loja-meta-item.geo { color: var(--primary); border: 1.5px solid var(--primary); padding: 3px 10px; border-radius: 50px; font-weight: 600; }
.tc-loja-meta-item.geo[hidden] { display: none; }
.tc-loja-rating { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; color: var(--secondary); font-weight: 600; }
.tc-loja-rating .star { color: #facc15; }
.tc-loja-status { display: inline-block; background: var(--accent-soft, #dcfce7); color: var(--accent); font-weight: 700; font-size: .72rem; padding: 4px 10px; border-radius: 50px; }

@media (max-width: 640px) {
  .tc-loja-name { font-size: 1.05rem; }
  .tc-loja-meta { font-size: .76rem; gap: 8px; }
  .tc-loja-logo { width: 54px; height: 54px; }
  .tc-timer-bar { font-size: .76rem; }
}
