/* ============================================================
   BARBERFLOW — Notifications UI
   Importar após tokens.css e components.css
   NENHUMA animação de tela aqui — apenas toast, badge e lista.
   As animações de abas permanecem 100% em tokens.css + Router.js
============================================================ */

/* ── Botão sino no header ─────────────────────────────────── */
.notif-bell-btn {
  position: relative;
  display:  flex;
  align-items: center;
  justify-content: center;
  width:  40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--ease);
  flex-shrink: 0;
}

.notif-bell-btn:active {
  background: var(--gold-muted);
}

.notif-bell-btn svg,
.notif-bell-btn img {
  width:  24px;
  height: 24px;
  display: block;
}

/* ── Badge de contagem ────────────────────────────────────── */
#notif-badge {
  position:   absolute;
  top:        2px;
  right:      2px;
  min-width:  18px;
  height:     18px;
  padding:    0 4px;
  background: #e05252;
  color:      #fff;
  font-family: var(--font);
  font-size:  0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: var(--r-full);
  border: 2px solid var(--header-bg);
  pointer-events: none;
  z-index: 1;
}

/* ── Container de toasts ──────────────────────────────────── */
#notif-toast-container {
  position: fixed;
  top:      calc(var(--header-h) + 8px);
  right:    12px;
  left:     12px;
  z-index:  200;
  display:  flex;
  flex-direction: column;
  gap:      8px;
  pointer-events: none;
}

@media (min-width: 480px) {
  #notif-toast-container {
    left: auto;
    width: 360px;
  }
}

/* ── Toast individual ─────────────────────────────────────── */
.notif-toast {
  display:       flex;
  align-items:   flex-start;
  gap:           12px;
  padding:       14px 14px 14px 16px;
  background:    var(--card);
  border-radius: var(--r-md);
  box-shadow:    0 6px 20px rgba(43, 27, 18, .16);
  border-left:   4px solid var(--gold);
  pointer-events: all;
  opacity:       0;
  transform:     translateY(-12px);
  transition:    opacity .22s ease, transform .22s ease;
}

.notif-toast--visivel {
  opacity:   1;
  transform: translateY(0);
}

.notif-toast--saindo {
  opacity:   0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}

.notif-toast-icone {
  font-size:  1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-toast-corpo {
  flex: 1;
  min-width: 0;
}

.notif-toast-titulo {
  font-size:   0.875rem;
  font-weight: 600;
  color:       var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow:    hidden;
  text-overflow: ellipsis;
}

.notif-toast-body {
  font-size:  0.78rem;
  color:      var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
  display:     -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:    hidden;
}

.notif-toast-fechar {
  background:  none;
  border:      none;
  color:       var(--text-dim);
  font-size:   0.9rem;
  cursor:      pointer;
  padding:     0 0 0 4px;
  flex-shrink: 0;
  line-height: 1;
  opacity:     0.7;
  transition:  opacity var(--ease);
}

.notif-toast-fechar:hover { opacity: 1; }

/* Botão de ação confirmada — toast persistente */
.notif-toast-acao {
  display:       inline-block;
  margin-top:    8px;
  padding:       5px 14px;
  background:    var(--gold);
  color:         var(--text-inv, #1a0f0a);
  border:        none;
  border-radius: var(--r-sm, 6px);
  font-size:     0.75rem;
  font-weight:   700;
  letter-spacing: 0.02em;
  cursor:        pointer;
  transition:    opacity var(--ease), transform var(--ease);
}

.notif-toast-acao:hover  { opacity: 0.88; }
.notif-toast-acao:active { transform: scale(0.97); }

/* Toast persistente não some sozinho */
.notif-toast--persistente {
  border-left-color: var(--gold);
}

/* ── Popup de autenticação (AuthGuard) ────────────────────── */
.bf-auth-popup-overlay {
  position:   fixed;
  inset:      0;
  z-index:    10000;
  display:    flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: bf-popup-fade-in 0.22s ease both;
}

.bf-auth-popup-overlay--saindo {
  animation: bf-popup-fade-out 0.4s ease both;
}

@keyframes bf-popup-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes bf-popup-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.bf-auth-popup {
  position:      relative;
  background:    var(--card-bg, #1c1008);
  border:        1.5px solid var(--gold-border, rgba(212,160,23,.35));
  border-radius: var(--r-lg, 18px);
  padding:       32px 28px 24px;
  max-width:     320px;
  width:         calc(100vw - 40px);
  text-align:    center;
  box-shadow:    0 16px 48px rgba(0,0,0,.55);
  animation:     bf-popup-slide-in 0.28s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes bf-popup-slide-in {
  from { transform: translateY(24px) scale(0.92); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.bf-auth-popup-icon {
  font-size:     2.4rem;
  margin-bottom: 10px;
  line-height:   1;
}

.bf-auth-popup-title {
  font-family:   var(--font, sans-serif);
  font-size:     1.1rem;
  font-weight:   700;
  color:         var(--gold, #d4a017);
  margin:        0 0 8px;
}

.bf-auth-popup-msg {
  font-family:   var(--font, sans-serif);
  font-size:     0.88rem;
  color:         var(--text-muted, #c8b89a);
  margin:        0 0 22px;
  line-height:   1.45;
}

.bf-auth-popup-actions {
  display:   flex;
  gap:       10px;
  justify-content: center;
}

.bf-auth-popup-btn {
  flex:          1;
  padding:       10px 0;
  border:        none;
  border-radius: var(--r-md, 10px);
  font-family:   var(--font, sans-serif);
  font-size:     0.9rem;
  font-weight:   600;
  cursor:        pointer;
  transition:    opacity 0.15s, transform 0.12s;
}
.bf-auth-popup-btn:active { transform: scale(0.96); opacity: 0.85; }

.bf-auth-popup-btn--primary {
  background: var(--gold, #d4a017);
  color:      #1c1008;
}

.bf-auth-popup-btn--secondary {
  background: transparent;
  border:     1.5px solid var(--gold-border, rgba(212,160,23,.45));
  color:      var(--gold, #d4a017);
}

/* Botão fechar (X) ────────────────────────────────────────── */
.bf-auth-popup-btn-fechar {
  position:      absolute;
  top:           10px;
  right:         12px;
  background:    transparent;
  border:        none;
  color:         var(--text-muted, #c8b89a);
  font-size:     1.1rem;
  line-height:   1;
  cursor:        pointer;
  padding:       4px 6px;
  border-radius: 50%;
  transition:    color 0.15s, background 0.15s;
}
.bf-auth-popup-btn-fechar:hover { color: var(--gold, #d4a017); background: rgba(212,160,23,.12); }

/* Barra de progresso 3s ──────────────────────────────────── */
.bf-auth-popup-bar {
  margin-top: 18px;
  height:     3px;
  background: rgba(212,160,23,.18);
  border-radius: 2px;
  overflow:   hidden;
}
.bf-auth-popup-bar-inner {
  height:     100%;
  width:      100%;
  background: var(--gold, #d4a017);
  transform-origin: left;
  animation:  bf-popup-bar-drain 3s linear both;
}
@keyframes bf-popup-bar-drain {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── Banner de permissão push ─────────────────────────────── */
#notif-push-banner {
  display:        flex;
  align-items:    center;
  gap:            12px;
  padding:        14px 16px;
  background:     linear-gradient(135deg, var(--gold-muted), rgba(212,160,23,.22));
  border:         1px solid var(--gold-border);
  border-radius:  var(--r-md);
  margin:         0 0 16px;
}

#notif-push-banner[hidden] { display: none; }

.notif-push-icone {
  font-size:  1.6rem;
  flex-shrink: 0;
}

.notif-push-texto {
  flex: 1;
  min-width: 0;
}

.notif-push-titulo {
  font-size:   0.875rem;
  font-weight: 600;
  color:       var(--text);
  line-height: 1.3;
}

.notif-push-sub {
  font-size:  0.75rem;
  color:      var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.notif-push-acoes {
  display:        flex;
  flex-direction: column;
  gap:            6px;
  flex-shrink:    0;
}

.notif-push-ativar {
  padding:       6px 12px;
  background:    var(--gold);
  color:         var(--cta-text);
  border:        none;
  border-radius: var(--r-full);
  font-family:   var(--font);
  font-size:     0.75rem;
  font-weight:   600;
  cursor:        pointer;
  transition:    background var(--ease);
  white-space:   nowrap;
}

.notif-push-ativar:active { background: var(--gold-dark); color: #fff; }

.notif-push-dispensar {
  background:  none;
  border:      none;
  color:       var(--text-dim);
  font-family: var(--font);
  font-size:   0.7rem;
  cursor:      pointer;
  text-align:  center;
  padding:     2px 0;
  transition:  color var(--ease);
}

.notif-push-dispensar:hover { color: var(--text-muted); }

/* ── Tela de notificações ─────────────────────────────────── */
#tela-notificacoes .notif-header {
  display:     flex;
  align-items: center;
  justify-content: space-between;
  padding:     16px 16px 8px;
  position:    sticky;
  top:         0;
  background:  var(--bg);
  z-index:     5;
  border-bottom: 1px solid var(--border-soft);
}

#tela-notificacoes .notif-titulo {
  font-size:   1.1rem;
  font-weight: 700;
  color:       var(--text);
}

.notif-marcar-todas {
  background:  none;
  border:      none;
  color:       var(--gold);
  font-family: var(--font);
  font-size:   0.78rem;
  font-weight: 600;
  cursor:      pointer;
  padding:     4px 8px;
  border-radius: var(--r-sm);
  transition:  background var(--ease);
}

.notif-marcar-todas:active { background: var(--gold-muted); }

/* ── Tabs de categoria ────────────────────────────────────── */
.notif-cats {
  display:    flex;
  gap:        6px;
  padding:    10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
  position:   sticky;
  top:        57px; /* altura do header interno */
  z-index:    4;
}

.notif-cats::-webkit-scrollbar { display: none; }

.notif-cat-btn {
  padding:       6px 14px;
  border-radius: var(--r-full);
  border:        1px solid var(--gold-border);
  background:    var(--card2);
  color:         var(--text-muted);
  font-family:   var(--font);
  font-size:     0.78rem;
  font-weight:   500;
  cursor:        pointer;
  white-space:   nowrap;
  transition:    background var(--ease), color var(--ease), border-color var(--ease);
  flex-shrink:   0;
}

.notif-cat-btn.ativo {
  background:   var(--gold);
  border-color: var(--gold);
  color:        var(--cta-text);
  font-weight:  700;
}

/* ── Lista de notificações ────────────────────────────────── */
#notif-lista {
  padding: 8px 0 24px;
}

.notif-item {
  display:     flex;
  align-items: flex-start;
  gap:         12px;
  padding:     14px 16px;
  border-bottom: 1px solid var(--border-soft);
  cursor:      pointer;
  transition:  background var(--ease);
  position:    relative;
}

.notif-item:active { background: var(--gold-muted); }

.notif-item.lida {
  opacity: 0.65;
}

.notif-item-icone {
  font-size:   1.3rem;
  flex-shrink: 0;
  width:       40px;
  height:      40px;
  display:     flex;
  align-items: center;
  justify-content: center;
  background:  var(--card2);
  border-radius: var(--r-full);
  border:      1px solid var(--border-soft);
}

.notif-item-corpo {
  flex: 1;
  min-width: 0;
}

.notif-item-titulo {
  font-size:   0.875rem;
  font-weight: 600;
  color:       var(--text);
  line-height: 1.3;
}

.notif-item-body {
  font-size:  0.78rem;
  color:      var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
  display:     -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:    hidden;
}

.notif-item-tempo {
  font-size:  0.7rem;
  color:      var(--text-dim);
  margin-top: 4px;
}

.notif-item-ponto {
  position:     absolute;
  right:        14px;
  top:          50%;
  transform:    translateY(-50%);
  width:        9px;
  height:       9px;
  background:   var(--gold);
  border-radius: var(--r-full);
  flex-shrink:  0;
}

/* ── Estado vazio ─────────────────────────────────────────── */
.notif-empty {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  justify-content: center;
  padding:        60px 24px;
  gap:            8px;
  text-align:     center;
}

.notif-empty-icone {
  font-size:  2.8rem;
  opacity:    0.4;
}

.notif-empty-titulo {
  font-size:   1rem;
  font-weight: 600;
  color:       var(--text);
  margin-top:  4px;
}

.notif-empty-sub {
  font-size: 0.82rem;
  color:     var(--text-dim);
}

/* ═══════════════════════════════════════════════════════════
   QueueConfirmService — Modais de confirmação de cadeira
   ═══════════════════════════════════════════════════════════ */

/* Overlay base ─────────────────────────────────────────────── */
.qcs-modal-overlay {
  position:        fixed;
  inset:           0;
  background:      rgba(0, 0, 0, 0.72);
  display:         flex;
  align-items:     center;
  justify-content: center;
  padding:         20px;
  z-index:         9999;
  opacity:         0;
  transition:      opacity 0.22s ease;
}

.qcs-modal-overlay[hidden] {
  display: none;
}

.qcs-modal-overlay.qcs-modal--visivel {
  opacity: 1;
}

@keyframes qcs-entrada {
  from { transform: translateY(18px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

@keyframes qcs-saida {
  from { transform: translateY(0) scale(1);       opacity: 1; }
  to   { transform: translateY(12px) scale(0.97); opacity: 0; }
}

.qcs-modal-overlay.qcs-modal--saindo {
  animation: qcs-saida 0.22s ease forwards;
}

/* Card do modal ─────────────────────────────────────────────── */
.qcs-modal-card {
  background:    var(--card, #1a1a1a);
  border:        1px solid var(--gold-border, rgba(212,175,55,0.25));
  border-radius: 20px;
  padding:       28px 24px 24px;
  width:         100%;
  max-width:     360px;
  display:       flex;
  flex-direction: column;
  align-items:   center;
  gap:           12px;
  text-align:    center;
  box-shadow:    0 12px 40px rgba(0,0,0,0.55);
  animation:     qcs-entrada 0.26s ease forwards;
}

/* Ícone animado ────────────────────────────────────────────── */
.qcs-modal-icone {
  font-size:   2.8rem;
  line-height: 1;
  margin-bottom: 2px;
}

/* Título ───────────────────────────────────────────────────── */
.qcs-modal-titulo {
  font-size:   1.1rem;
  font-weight: 700;
  color:       var(--text, #f0e6cc);
  line-height: 1.3;
}

/* Subtítulo / descrição ────────────────────────────────────── */
.qcs-modal-sub {
  font-size:  0.88rem;
  color:      var(--text-muted, #9a8c7a);
  line-height: 1.5;
  margin-top: -4px;
}

.qcs-modal-sub strong {
  color:       var(--gold, #D4AF37);
  font-weight: 600;
}

/* Grupo de botões ──────────────────────────────────────────── */
.qcs-modal-acoes {
  display:       flex;
  flex-direction: column;
  gap:           10px;
  width:         100%;
  margin-top:    8px;
}

/* Botão primário (ouro) ────────────────────────────────────── */
.qcs-btn-sim,
.qcs-btn-pular {
  padding:       14px 20px;
  background:    var(--gold, #D4AF37);
  color:         var(--cta-text, #1a0800);
  border:        none;
  border-radius: var(--r-full, 999px);
  font-family:   var(--font, sans-serif);
  font-size:     0.95rem;
  font-weight:   700;
  cursor:        pointer;
  width:         100%;
  transition:    background 0.18s ease, transform 0.12s ease;
  letter-spacing: 0.02em;
}

.qcs-btn-sim:active,
.qcs-btn-pular:active {
  background:  var(--gold-dark, #b8922a);
  transform:   scale(0.97);
}

/* Botão secundário (outline ouro) ──────────────────────────── */
.qcs-btn-nao,
.qcs-btn-aguardar {
  padding:       13px 20px;
  background:    transparent;
  color:         var(--gold, #D4AF37);
  border:        1.5px solid var(--gold-border, rgba(212,175,55,0.4));
  border-radius: var(--r-full, 999px);
  font-family:   var(--font, sans-serif);
  font-size:     0.9rem;
  font-weight:   600;
  cursor:        pointer;
  width:         100%;
  transition:    background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.qcs-btn-nao:active,
.qcs-btn-aguardar:active {
  background:   var(--gold-muted, rgba(212,175,55,0.12));
  border-color: var(--gold, #D4AF37);
  transform:    scale(0.97);
}
