/**
 * ============================================================================
 * GO! VERMELHINHOS — FASE 10.5: REDESIGN COMPLETO DA HOME
 * assets/css/home-10-5.css
 *
 * Estilização premium da nova tela inicial:
 * - Cabeçalho navy/dark com logo oficial centralizado e sino com badge
 * - Saudação moderna 'Olá, passageiro! 👋'
 * - Apoio voluntário discreto ao projeto com PIX e botão de cópia
 * - Card principal 'Planejar viagem' com gradiente vermelho e grande CTA
 * - Cards secundários 'Ônibus no mapa' (Tempo real) e 'Horários' (Tabelas)
 * - Assinatura visual skyline de Maricá (Prefeitura-de-Marica-1)
 * - Bottom Navigation de 4 itens respeitando safe-area
 * ============================================================================
 */

/* ----------------------------------------------------------------------------
   1. ESTRUTURA GLOBAL DA HOME E BACKGROUND CINEMATOGRÁFICO
   ---------------------------------------------------------------------------- */
.home-page-body {
  background-color: #070D1E;
  background-image: 
    linear-gradient(180deg, 
      rgba(7, 13, 30, 0.72) 0%, 
      rgba(7, 13, 30, 0.65) 30%,
      rgba(7, 13, 30, 0.82) 70%, 
      rgba(7, 13, 30, 0.96) 100%
    ),
    url('../images/bg-onibus.webp');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: #FFFFFF;
  box-sizing: border-box;
  overflow-x: hidden;
}

@supports not (background-attachment: fixed) {
  .home-page-body {
    background-attachment: scroll;
  }
}

/* Container Principal com Scroll Suave e Limite Central */
.home-main-wrapper {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(64px + env(safe-area-inset-top, 0px)) 16px calc(60px + env(safe-area-inset-bottom, 0px) + 12px) 16px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* Espaçador Flexível de Layout (Hotfix 10.5.3.2) */
.home-flex-spacer {
  flex: 1 1 auto;
  min-height: 8px;
  width: 100%;
}

/* ----------------------------------------------------------------------------
   2. CABEÇALHO SUPERIOR NAVY (APP BAR)
   ---------------------------------------------------------------------------- */
.home-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(7, 13, 30, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 14px;
  padding-right: 14px;
  box-sizing: border-box;
  user-select: none;
}

/* Alinhador Central do Cabeçalho */
.home-header-inner {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Botão Hambúrguer */
.home-btn-hamburger {
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 12px;
  padding: 0;
  transition: background-color 0.18s ease, transform 0.12s ease;
  flex-shrink: 0;
  z-index: 2;
  touch-action: manipulation;
}

.home-btn-hamburger:hover {
  background: rgba(255, 255, 255, 0.10);
}

.home-btn-hamburger:active {
  transform: scale(0.92);
}

.home-hamburger-lines {
  width: 22px;
  height: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.home-hamburger-lines span {
  display: block;
  width: 100%;
  height: 2.2px;
  background-color: #FFFFFF;
  border-radius: 2px;
  transition: transform 0.2s ease;
}

/* Logo Oficial Centralizado */
.home-header-logo-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  text-decoration: none;
  z-index: 1;
}

.home-header-logo-img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s ease;
}

.home-header-logo-container:active .home-header-logo-img {
  transform: scale(0.96);
}

/* Botão de Notificação / Sino */
.home-btn-notification {
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 12px;
  position: relative;
  transition: background-color 0.18s ease, transform 0.12s ease;
  flex-shrink: 0;
  z-index: 2;
  touch-action: manipulation;
}

.home-btn-notification:hover {
  background: rgba(255, 255, 255, 0.10);
}

.home-btn-notification:active {
  transform: scale(0.92);
}

.home-bell-icon {
  width: 24px;
  height: 24px;
  stroke: #FFFFFF;
  stroke-width: 2;
  fill: none;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

/* Badge numérico com contagem de não lidas */
.home-notification-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background-color: #D3131E;
  color: #FFFFFF;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border: 2px solid #070D1E;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(211, 19, 30, 0.85);
  display: none;
  box-sizing: border-box;
  pointer-events: none;
  letter-spacing: -0.3px;
}

/* Quando houver notificações não lidas: pulso discreto e animação inicial elegante */
.home-btn-notification.has-unread {
  background: rgba(211, 19, 30, 0.12);
  border: 1px solid rgba(211, 19, 30, 0.25);
}

.home-btn-notification.has-unread .home-notification-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: notificationPulse 2.8s ease-in-out infinite;
}

@keyframes notificationPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.85;
    box-shadow: 0 0 0 0 rgba(211, 19, 30, 0.7);
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(211, 19, 30, 0);
  }
  100% {
    transform: scale(0.95);
    opacity: 0.85;
    box-shadow: 0 0 0 0 rgba(211, 19, 30, 0);
  }
}

/* Animação com duração limitada (chama atenção e para para não irritar o passageiro) */
.home-btn-notification.has-unread .home-bell-icon {
  transform-origin: top center;
  animation: bellSwingAttention 3.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) 2;
}

.home-btn-notification.has-unread {
  animation: haloPulse 2.8s ease-in-out 3;
}

@keyframes haloPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(211, 19, 30, 0.6);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(211, 19, 30, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(211, 19, 30, 0);
  }
}

@keyframes bellSwingAttention {
  0% { transform: rotate(0); }
  4% { transform: rotate(14deg); }
  8% { transform: rotate(-12deg); }
  12% { transform: rotate(10deg); }
  16% { transform: rotate(-8deg); }
  20% { transform: rotate(4deg); }
  24% { transform: rotate(0); }
  100% { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .home-btn-notification.has-unread,
  .home-btn-notification.has-unread .home-bell-icon,
  .home-btn-notification.has-unread .home-notification-badge {
    animation: none !important;
  }
}

/* ----------------------------------------------------------------------------
   AVISO TEMPORÁRIO (TOAST/BANNER DE NOVA NOTIFICAÇÃO)
   ---------------------------------------------------------------------------- */
.go-notif-toast-banner {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  width: calc(100% - 32px);
  max-width: 440px;
  background: #0B1730;
  border: 1px solid rgba(211, 19, 30, 0.45);
  border-left: 4px solid #D3131E;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 12px rgba(211, 19, 30, 0.25);
  z-index: 2200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  touch-action: manipulation;
}

.go-notif-toast-banner.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.go-notif-toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.go-notif-toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.go-notif-toast-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.go-notif-toast-sub {
  font-size: 0.74rem;
  color: #CBD5E1;
  margin: 0;
}

.go-notif-toast-action {
  font-size: 0.76rem;
  font-weight: 700;
  color: #F87171;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.go-notif-toast-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1rem;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .go-notif-toast-banner {
    transition: none !important;
  }
}

/* ----------------------------------------------------------------------------
   3. SEÇÃO DE SAUDAÇÃO
   ---------------------------------------------------------------------------- */
.home-greeting-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  margin-bottom: 18px;
}

.home-greeting-title {
  font-family: var(--font-display, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: clamp(1.4rem, 4.8vw, 1.65rem);
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.home-greeting-subtitle {
  font-size: clamp(0.86rem, 3.2vw, 0.96rem);
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  line-height: 1.35;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ----------------------------------------------------------------------------
   3.1 BANNER DISCRETO DE INSTALAÇÃO DO PWA (QUANDO DISPONÍVEL)
   ---------------------------------------------------------------------------- */
.home-install-banner {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(11, 19, 43, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.home-install-banner:hover {
  border-color: rgba(56, 189, 248, 0.65);
  transform: translateY(-1px);
}

.home-install-banner:active {
  transform: scale(0.98);
}

.home-install-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.home-install-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.home-install-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.home-install-sub {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.2;
}

.home-install-btn {
  background: #0284C7;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
  transition: background 0.15s ease;
  pointer-events: none;
}

/* ----------------------------------------------------------------------------
   5. CARD PRINCIPAL — PLANEJAR VIAGEM (REQUISITO 9)
   ---------------------------------------------------------------------------- */
.home-card-primary-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 45%, #881337 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 22px;
  padding: 18px 16px;
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(220, 38, 38, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.30);
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s ease;
  touch-action: manipulation;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.home-card-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.40);
}

.home-card-primary-cta:active {
  transform: scale(0.98);
}

/* Ícone de Rota em Caixa Quadrada Arredondada */
.home-primary-icon-wrapper {
  width: 52px;
  height: 52px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.home-primary-route-icon {
  width: 32px;
  height: 32px;
  fill: #FFFFFF;
}

.home-primary-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.home-primary-title {
  font-family: var(--font-display, sans-serif);
  font-size: clamp(1.15rem, 4vw, 1.3rem);
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.home-primary-description {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.90);
  margin: 0;
  line-height: 1.35;
  font-weight: 400;
}

/* Botão Redondo com Seta à Direita */
.home-primary-arrow-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.home-card-primary-cta:hover .home-primary-arrow-btn {
  background: rgba(255, 255, 255, 0.35);
  transform: translateX(3px);
}

.home-arrow-svg {
  width: 18px;
  height: 18px;
  fill: #FFFFFF;
}

/* ----------------------------------------------------------------------------
   6. CARDS SECUNDÁRIOS LADO A LADO (REQUISITOS 10, 11 e 12)
   ---------------------------------------------------------------------------- */
.home-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.home-secondary-card {
  background: rgba(11, 23, 48, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 18px;
  padding: 14px 12px;
  color: #FFFFFF;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.30);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  touch-action: manipulation;
  box-sizing: border-box;
}

.home-secondary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.home-secondary-card:active {
  transform: scale(0.97);
}

.home-sec-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-sec-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.home-sec-icon-box.map-box {
  background: rgba(2, 132, 199, 0.20);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.home-sec-icon-box.schedule-box {
  background: rgba(59, 130, 246, 0.20);
  border: 1px solid rgba(147, 197, 253, 0.35);
}

.home-sec-svg {
  width: 24px;
  height: 24px;
}

.home-sec-title {
  font-family: var(--font-display, sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.25;
}

/* Badges dos Cards Secundários */
.home-sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  max-width: fit-content;
}

.home-sec-badge.live {
  background: rgba(6, 78, 59, 0.50);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #A7F3D0;
}

.home-sec-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  animation: telemetryPulse 2s infinite ease-in-out;
}

.home-sec-badge.schedule {
  background: rgba(30, 58, 138, 0.50);
  border: 1px solid rgba(96, 165, 250, 0.40);
  color: #BAE6FD;
}

/* ----------------------------------------------------------------------------
   7. IDENTIDADE DE MARICÁ & SKYLINE (HOTFIX 10.5.3.2 — ENCERRAMENTO VISUAL DO RODAPÉ)
   ---------------------------------------------------------------------------- */
.home-marica-identity-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0;
  margin-bottom: 0;
  width: 100%;
  flex-shrink: 0;
}

.home-marica-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display, sans-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 10px; /* Respiro refinado entre 8 e 14px antes da arte */
  letter-spacing: 0.02em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.home-marica-pin-svg {
  width: 14px;
  height: 14px;
  fill: #FFFFFF;
}

.home-skyline-container {
  width: calc(100% + 32px);
  margin-left: -16px;
  margin-right: -16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
}

.home-skyline-img {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  user-select: none;
}

/* ----------------------------------------------------------------------------
   8. NAVEGAÇÃO INFERIOR DOCKED (BOTTOM NAVIGATION - REQUISITOS 15, 16 e 17)
   ---------------------------------------------------------------------------- */
.home-bottom-navigation {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(7, 13, 30, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px)) 10px;
  box-sizing: border-box;
  user-select: none;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.40);
}

.home-bottom-nav-inner {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.home-nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #94A3B8;
  text-decoration: none;
  min-width: 60px;
  min-height: 48px;
  padding: 4px 8px;
  border-radius: 12px;
  transition: color 0.15s ease, transform 0.12s ease;
  touch-action: manipulation;
}

.home-nav-tab:hover {
  color: #E2E8F0;
}

.home-nav-tab:active {
  transform: scale(0.92);
}

.home-tab-label {
  font-family: var(--font-body, sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.home-nav-tab.active {
  color: #EF4444;
}

.home-nav-tab.active .home-tab-label {
  color: #EF4444;
  font-weight: 700;
}

/* Ícone de Início Ativo em Círculo Vermelho (conforme a referência) */
.home-active-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #D3131E;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(211, 19, 30, 0.45);
}

.home-tab-svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.home-active-icon-circle .home-tab-svg {
  stroke: #FFFFFF;
  fill: #FFFFFF;
  width: 18px;
  height: 18px;
}

/* ----------------------------------------------------------------------------
   9. ANIMAÇÕES & RESPONSIVIDADE MULTI-VIEWPORT
   ---------------------------------------------------------------------------- */
@keyframes telemetryPulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

/* Telas muito estreitas (<= 340px) */
@media (max-width: 340px) {
  .home-secondary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .home-card-primary-cta {
    padding: 14px 12px;
  }
}


/* ============================================================================
   10. CENTRAL DE NOTIFICAÇÕES (FASE 10.8 & REFINAMENTO UI/UX)
   ============================================================================ */
.go-notif-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s;
}
.go-notif-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
body.notif-open {
  overflow: hidden !important;
}
.go-notif-card {
  background: #0B1730;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: min(85vh, 85dvh);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  animation: notifSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes notifSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.go-notif-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #070D1E;
  flex-shrink: 0;
}
.go-notif-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.go-notif-header-icon {
  font-size: 1.15rem;
  line-height: 1;
}
.go-notif-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #FFFFFF;
  text-transform: uppercase;
  margin: 0;
}
.go-notif-close-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.go-notif-close-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}
.go-notif-list {
  padding: 12px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.go-notif-list::-webkit-scrollbar {
  width: 5px;
}
.go-notif-list::-webkit-scrollbar-track {
  background: transparent;
}
.go-notif-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
.go-notif-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 16px;
  color: #94A3B8;
  font-size: 0.85rem;
}
.go-notif-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #D3131E;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.go-notif-empty {
  text-align: center;
  padding: 48px 20px;
  color: #94A3B8;
}
.go-notif-empty-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 12px;
  opacity: 0.7;
}
.go-notif-empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}
.go-notif-empty-sub {
  font-size: 0.82rem;
  line-height: 1.4;
}
.go-notif-item {
  background: #111A35;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.go-notif-item.is-unread {
  border-color: rgba(211, 19, 30, 0.4);
  background: linear-gradient(180deg, #151D3B 0%, #111A35 100%);
  box-shadow: 0 4px 14px rgba(211, 19, 30, 0.12);
}
.go-notif-item.item-ad {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(180deg, #131738 0%, #101630 100%);
}
.go-notif-item.item-ad.is-unread {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.16);
}
.go-notif-item.item-promocao {
  border-color: rgba(236, 72, 153, 0.35);
  background: linear-gradient(180deg, #1A132C 0%, #101630 100%);
}
.go-notif-item.item-promocao.is-unread {
  border-color: rgba(236, 72, 153, 0.55);
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.16);
}
.go-notif-item.item-aviso {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, #1B1824 0%, #111A35 100%);
}
.go-notif-item.item-novidade {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(180deg, #121E2C 0%, #111A35 100%);
}
.go-notif-item.item-info {
  border-color: rgba(14, 165, 233, 0.3);
  background: linear-gradient(180deg, #121B32 0%, #111A35 100%);
}
.go-notif-img-wrap {
  width: 100%;
  height: clamp(210px, 60vw, 260px);
  max-height: 270px;
  background: #060B18;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 6px 8px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.go-notif-card-img {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.go-notif-item-content {
  padding: 10px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.go-notif-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.go-notif-top-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.go-notif-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
}
.badge-unread-dot {
  font-size: 0.60rem;
  font-weight: 800;
  background: #D3131E;
  color: #FFFFFF;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 0 6px rgba(211, 19, 30, 0.7);
}
.badge-aviso {
  background: rgba(245, 158, 11, 0.18);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.badge-novidade {
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.badge-informacao {
  background: rgba(14, 165, 233, 0.18);
  color: #38BDF8;
  border: 1px solid rgba(14, 165, 233, 0.4);
}
.badge-atualizacao {
  background: rgba(99, 102, 241, 0.18);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.4);
}
.badge-ad {
  background: rgba(139, 92, 246, 0.22);
  color: #C084FC;
  border: 1px solid rgba(139, 92, 246, 0.45);
}
.badge-promocao {
  background: rgba(236, 72, 153, 0.22);
  color: #F472B6;
  border: 1px solid rgba(236, 72, 153, 0.45);
}
.badge-aviso-linha {
  background: rgba(239, 68, 68, 0.18);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.badge-prio-importante {
  background: rgba(245, 158, 11, 0.22);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.5);
}
.badge-prio-urgente {
  background: rgba(220, 38, 38, 0.25);
  color: #FCA5A5;
  border: 1px solid rgba(220, 38, 38, 0.6);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.3);
}
.go-notif-item.item-prio-importante {
  border-color: rgba(245, 158, 11, 0.4);
}
.go-notif-item.item-prio-urgente {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.18);
}
.go-notif-line-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #D3131E;
  margin: 4px 0 2px 0;
}
.go-notif-line-icon {
  font-size: 0.85rem;
  line-height: 1;
}
.go-notif-line-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.go-notif-line-codes {
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}
.go-notif-push-optin {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}
.go-notif-push-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.go-notif-push-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.go-notif-push-text {
  flex: 1 1 auto;
}
.go-notif-push-text strong {
  font-size: 0.82rem;
  color: #FFFFFF;
  display: block;
  margin-bottom: 2px;
}
.go-notif-push-text p {
  font-size: 0.74rem;
  color: #94A3B8;
  margin: 0;
  line-height: 1.35;
}
.go-notif-push-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.go-notif-push-dismiss {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.go-notif-push-dismiss:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}
.go-notif-push-btn {
  background: rgba(211, 19, 30, 0.9);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.go-notif-push-btn:hover {
  background: #B91C1C;
}
.go-notif-push-success {
  font-size: 0.76rem;
  color: #34D399;
  font-weight: 600;
  text-align: center;
  padding: 6px;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.go-notif-item-time {
  font-size: 0.72rem;
  color: #94A3B8;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.go-notif-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin: 0;
  word-break: break-word;
}
.go-notif-item-subtitle {
  font-size: 0.78rem;
  font-weight: 600;
  color: #C084FC;
  margin: 0;
  line-height: 1.3;
}
.go-notif-item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.go-notif-item-desc {
  font-size: 0.80rem;
  color: #CBD5E1;
  line-height: 1.45;
  margin: 0;
  word-break: break-word;
}
.go-notif-bullets {
  font-size: 0.78rem;
  color: #E2E8F0;
  line-height: 1.5;
  margin: 2px 0 0 0;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border-left: 3px solid #8B5CF6;
}
.go-notif-cta-container {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}
.go-notif-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 14px;
  background: #D3131E;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  transition: background 0.15s, transform 0.12s;
}
.go-notif-cta-btn:hover {
  background: #B91C1C;
}
.go-notif-cta-btn:active {
  transform: scale(0.97);
}
.go-notif-cta-btn.cta-ad {
  background: #7C3AED;
}
.go-notif-cta-btn.cta-ad:hover {
  background: #6D28D9;
}
.go-notif-cta-btn.cta-promocao {
  background: #DB2777;
}
.go-notif-cta-btn.cta-promocao:hover {
  background: #BE185D;
}
.go-notif-cta-btn.cta-aviso {
  background: #D97706;
}
.go-notif-cta-btn.cta-aviso:hover {
  background: #B45309;
}
.go-notif-cta-btn.cta-info {
  background: #0284C7;
}
.go-notif-cta-btn.cta-info:hover {
  background: #0369A1;
}
.go-notif-footer {
  padding: 10px 14px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #070D1E;
  flex-shrink: 0;
}
.go-notif-footer.is-hidden {
  display: none !important;
}
.go-notif-btn-understood {
  width: 100%;
  padding: 10px;
  background: #111A35;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.go-notif-btn-understood:hover {
  background: #172554;
  border-color: rgba(255, 255, 255, 0.28);
}
.go-notif-btn-understood:active {
  background: #0E172E;
}

@media (max-width: 380px) {
  .go-notif-backdrop {
    padding: 10px 8px;
  }
  .go-notif-card {
    border-radius: 16px;
    max-height: min(90vh, 90dvh);
  }
  .go-notif-header {
    padding: 12px 14px;
  }
  .go-notif-title {
    font-size: 0.88rem;
  }
  .go-notif-list {
    padding: 10px 12px;
    gap: 10px;
  }
  .go-notif-img-wrap {
    height: clamp(185px, 58vw, 225px);
    max-height: 235px;
    padding: 4px 6px;
  }
  .go-notif-item-content {
    padding: 8px 10px 10px 10px;
  }
  .go-notif-item-title {
    font-size: 0.88rem;
  }
  .go-notif-item-desc {
    font-size: 0.78rem;
  }
}
