/* Design tokens e estilos compartilhados das páginas públicas */

:root {
    --brand-primary: #09036B;
    --brand-secondary: #0909A0;
    --brand-accent: #00D4FF;
    --brand-gradient: linear-gradient(135deg, #09036B 0%, #0909A0 55%, #00D4FF 100%);
    --brand-primary-rgb: 9, 3, 107;
    --shadow-navy: 0 4px 20px rgba(9, 3, 107, .08);
    --shadow-navy-lg: 0 12px 32px rgba(9, 3, 107, .12);
    --hero-gradient: radial-gradient(circle at top right, #00D4FF 0%, transparent 40%), radial-gradient(circle at bottom left, #09036B 0%, #000013 100%);
    --color-footer-bg: #e4e2e1;
    --color-btn-outline-hover: #E7EDFF;
    --cta-gradient: linear-gradient(90deg, #3D8BFF 0%, #00C4E0 100%);
    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-card: 16px;
    --radius-btn: 50px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, .08);
    --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, .14);
    --navbar-height: 64px;
    --color-text-primary: #1e2023;
    --color-text-secondary: #4c4f54;
    --color-text-muted: #737479;
    --color-border: hsla(228, 4%, 77%, .3);
    --color-surface: #ffffff;
    --color-footer-bar: #004ed2;
    --color-text-dark: #001527;
    --color-accent-blue: #006dc7;
    --color-bg-page: #f3f4f8;
    --color-input-border: #e0e0e0;
    --color-surface-alt:  #f7f8fd;
    --color-divider:      #f0f0f0;
    --color-icon-muted:   #767676;
    --color-text-faint:   #767676;
    /* skeleton (UX-09) */
    --sk-bg:    #eaeaea;
    --sk-shine: #f5f5f5;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-ui);
    color: var(--color-text-primary);
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

a, a:hover {
    color: #215db0;
}

/* ── Navbar ─────────────────────────────────────────────── */

.navbar-custom {
    background: var(--color-surface) !important;
    box-shadow: var(--shadow-navy);
    height: var(--navbar-height);
    padding: 0 16px;
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link,
.navbar-custom .nav-item,
.navbar-custom .nav-item > a {
    color: var(--color-text-primary) !important;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    line-height: 20px;
}

.navbar-custom .navbar-brand img {
    height: 30px !important;
}

/* logo em par claro/escuro: alterna conforme o tema */
.navbar-custom .logo-escuro,
.menu-footer .logo-escuro { display: none; }

html[data-theme="dark"] .ui.selection.visible.dropdown > .text:not(.default) {
    font-weight: normal;
    color: white !important;
}

html[data-theme="dark"] .navbar-custom .logo-claro,
html[data-theme="dark"] .menu-footer .logo-claro {
    display: none;
}

html[data-theme="dark"] .navbar-custom .logo-escuro,
html[data-theme="dark"] .menu-footer .logo-escuro { display: inline; }

/* ícone casa (mobile) acompanha a cor do texto da navbar */
.navbar-custom .nav-home-link {
    color: var(--brand-primary);
}

/* botões de ação da navbar */
.navbar-custom .nav-link.btn-nav-solid {
    background: var(--brand-primary);
    color: #fff !important;
    border-radius: 8px;
    padding: 8px 18px !important;
    font-weight: 600;
    transition: transform .15s, opacity .2s;
}

.navbar-custom .nav-link.btn-nav-solid:hover { opacity: .9; transform: scale(1.03); }
.navbar-custom .nav-link.btn-nav-solid:active { transform: scale(.95); }

.navbar-custom .nav-link.btn-nav-ghost {
    color: var(--color-text-secondary) !important;
    font-weight: 600;
}

.navbar-custom .nav-link.btn-nav-ghost:hover { color: var(--brand-primary) !important; }

.navbar-custom .nav-link {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.navbar > .container {
    display: flex;
    flex-wrap: nowrap !important;
}

.user-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
    border: 2px solid var(--color-border);
}

html[data-theme="dark"] a.ui.active.label:hover {
    background-color: #12131a !important;
}

.navbar-custom .dropdown .dropdown-menu {
    width: 15rem;
    box-sizing: border-box;
    border-radius: 12px;
    box-shadow: var(--shadow-card-hover);
    border: 1px solid var(--color-border);
    padding: 6px 8px;
    overflow: hidden;
}

.navbar-custom .dropdown .dropdown-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 1px 0;
    padding: .6rem 1rem;
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text-primary) !important;
}

.navbar-custom .dropdown .dropdown-item:hover {
    background-color: #f0f4ff;
}

.navbar-custom .input-group .input-group-text {
    background: white;
    border: none;
    border-radius: 8px 0 0 8px;
}

.navbar-custom .input-group .form-control {
    border: none;
    border-radius: 0 8px 8px 0;
}

.navbar-custom .input-group .form-control:focus {
    box-shadow: none;
}

.navbar-search .input-group {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

/* ── Bottom mobile navigation ──────────────────────────── */

.nav-linker {
    display: none;
    color: white;
}

.menu-bottom {
    display: none;
}

.bottom-list {
    list-style: none;
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    justify-content: space-evenly;
    padding: 0;
}

.item-list {
    margin: 10px auto;
    color: white !important;
}

/* ── Footer ─────────────────────────────────────────────── */

.menu-footer {
    background-color: var(--color-footer-bg);
    border-top: 1px solid var(--color-border);
    margin-top: 3rem;
    width: 100%;
    padding: 48px 0;
}

.menu-footer > .container {
    margin: 0 auto;
    width: 100%;
    max-width: 1280px;
    display: grid;
    grid-template-columns: minmax(0, 300px) repeat(2, minmax(0, max-content)) minmax(0, 1fr);
    gap: 32px;
    padding: 0 6%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .menu-footer > .container {
        grid-template-columns: 1fr;
    }
}

.menu-footer .footer-brand {
    max-width: 300px;
}

.menu-footer .footer-brand img {
    height: 32px;
}

.menu-footer .footer-brand-text {
    margin-top: 14px;
    font-size: .875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.menu-footer > .container > .column > .title {
    color: var(--brand-primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    line-height: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.menu-footer > .container > .column > .item a {
    color: var(--color-text-muted);
    font-size: .875rem;
    font-weight: 400;
    line-height: 2.2rem;
    text-align: left;
}

.menu-footer > .container > .column > .item a:hover {
    color: var(--brand-accent);
}

.menu-footer .footer-social-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.menu-footer .social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background .2s;
}

.menu-footer .social-btn:hover {
    background: var(--brand-secondary);
    color: #fff;
}

.menu-footer .footer-copy {
    margin-top: 20px;
    font-size: .8rem;
    color: var(--color-text-muted);
    text-align: right;
}

@media (max-width: 768px) {
    .menu-footer .footer-social-buttons { justify-content: flex-start; }
    .menu-footer .footer-copy { text-align: left; }
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn-redondo {
    border-radius: var(--radius-btn) !important;
    font-weight: 500;
}

/* ── Responsive breakpoints ──────────────────────────────── */

@media (max-width: 412px) {
    .navbar-search {
        display: none;
    }
}

@media (max-width: 992px) {
    #navbarNav {
        display: none !important;
    }

    .menu-bottom {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        background: var(--brand-gradient);
        z-index: 1030;
    }

    .nav-linker {
        display: block;
        color: white;
    }

    .par {
        color: white;
        font-size: 14px;
        display: block;
    }

    .alinhamento {
        text-align: center;
    }

    .navbar-search {
        display: none;
    }

    .navbar-brand {
        margin: 0 auto;
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
    }
}

/* ── Botões de marca ─────────────────────────────────────── */

.btn-brand {
    display: inline-block;
    padding: .85rem 1.5rem;
    background: var(--cta-gradient);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    transition: opacity .2s;
    cursor: pointer;
    text-decoration: none;
}

.btn-brand:hover { opacity: .88; color: var(--brand-primary); }

.btn-brand-outline {
    display: inline-block;
    padding: .75rem 1.25rem;
    background: var(--color-surface);
    border: 1.5px solid var(--color-input-border);
    border-radius: 10px;
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: .9rem;
    transition: border-color .15s;
    cursor: pointer;
    text-decoration: none;
}

.btn-brand-outline:hover { border-color: var(--brand-primary); color: var(--brand-primary); }

/* ── Home — Hero ─────────────────────────────────────────── */

.hero {
    background: var(--hero-gradient);
    padding: 72px 16px 112px;
    text-align: center;
    color: white;
}

.hero .hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: .75rem;
}

.hero .hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, .8);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero .hero-search {
    max-width: 48rem;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: 14px;
    box-shadow: var(--shadow-navy-lg);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-search-icon {
    color: var(--brand-primary);
    font-size: 1.35rem;
    margin-left: 12px;
    flex-shrink: 0;
}

.hero .hero-search .busca_eventos {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    padding: 14px 4px;
    color: var(--color-text-primary);
}

.hero .hero-search .busca_eventos::placeholder,
.mobile-search-bar .busca_eventos::placeholder {
    color: var(--color-text-muted);
}

.hero .hero-search .btn-search {
    background: #00d2fd;
    border: none;
    color: var(--brand-primary);
    padding: 14px 40px;
    font-weight: 600;
    font-size: .95rem;
    border-radius: 8px;
    transition: filter .2s, transform .15s;
    flex-shrink: 0;
    cursor: pointer;
}

.hero .hero-search .btn-search:hover { filter: brightness(1.1); }
.hero .hero-search .btn-search:active { transform: scale(.95); }

/* ── Home — Seção de eventos ─────────────────────────────── */

#eventos {
    max-width: 1280px;
    margin: -64px auto 0;
    padding: 0 16px;
    position: relative;
    z-index: 2;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Estado vazio (busca sem resultados): ocupa a largura toda, centralizado e
   com padding-top que passa da sobreposição de -64px do #eventos sobre o hero,
   para o texto não cair sobre o gradiente escuro nem ficar preso numa coluna. */
#message-cad-list {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6rem 1rem 3rem;
    color: var(--color-text-muted);
}

#message-cad-list .empty-icon {
    display: block;
    font-size: 2.75rem;
    color: var(--color-icon-muted);
    opacity: .6;
    margin-bottom: .75rem;
}

#message-cad-list .empty-text {
    font-size: 1.1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    #message-cad-list { padding: 2.5rem 1rem; }
}

/* ── Home — Card de evento ───────────────────────────────── */

.event-card {
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-navy);
    overflow: hidden;
    background: var(--color-surface);
    transition: box-shadow .3s, transform .3s;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.event-card:hover {
    box-shadow: var(--shadow-navy-lg);
    transform: translateY(-4px);
    color: inherit;
    text-decoration: none;
}

.event-card .img-container {
    position: relative;
    height: 256px;
    overflow: hidden;
}

.event-card .img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.event-card:hover .img-container img {
    transform: scale(1.05);
}

.event-card .event-day {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    padding: 6px 12px;
    font-size: 20px;
    font-weight: 900;
    color: var(--brand-primary);
    line-height: 1.2;
}

.event-card .event-day .month {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    order: 1;
}

.event-card .btn-remover-favorito {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .92);
    color: #e0245e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: transform .15s, background .2s;
}

.event-card .btn-remover-favorito:hover { transform: scale(1.08); background: #fff; }

.event-card .btn-remover-favorito:disabled, .event-card .btn-remover-favorito[disabled] { opacity: .6; cursor: not-allowed; }

.event-card .event-badge-encerrado {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 1;
    background: rgba(30, 32, 35, .8);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 4px 10px;
    border-radius: 20px;
}

/* ── Meus Favoritos ───────────────────────────────────────── */

.mf-page { background: var(--color-bg-page); min-height: 60vh; padding: 2rem 0 4rem; }
.mf-wrap { max-width: 1100px; width: 100%; margin: 0 auto; padding: 0 1rem; box-sizing: border-box; }
.mf-card { background: var(--color-surface); border-radius: var(--radius-card); border: 1px solid var(--color-divider); padding: 1.5rem; box-sizing: border-box; }
.mf-title { font-size: 1.4rem; font-weight: 600; color: var(--color-text-primary); margin-bottom: 1.5rem; }
.mf-filter { display: flex; gap: .5rem; align-items: center; }
.mf-filter .form-control { border-radius: 8px 0 0 8px; }
.mf-filter .btn { border-radius: 0 8px 8px 0; }
.mf-label-muted { color: var(--color-text-muted); }

#grid_favoritos.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.event-card .event-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    background: var(--color-surface);
}

.event-card .event-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--brand-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    margin: 0;
}

.event-card .event-meta {
    font-size: 14px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-card .event-meta i {
    font-size: 15px;
    color: var(--color-text-muted);
}

/* ── Home — Carregar mais ────────────────────────────────── */

.load-more-wrap {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.btn-load-more {
    min-width: 240px;
    padding: .875rem 3rem;
    font-size: .95rem;
    font-weight: 600;
    background: transparent;
    border: 2px solid var(--brand-primary);
    border-radius: 8px;
    color: var(--brand-primary);
    cursor: pointer;
    transition: background .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-load-more:hover { background: var(--color-btn-outline-hover); }
.btn-load-more:active { transform: scale(.98); }

.btn-load-more:disabled,
.btn-load-more[disabled] {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-load-more i {
    font-size: 1.2rem;
    transition: transform .2s;
}

.btn-load-more:hover i { transform: translateY(2px); }

/* ── Home — Botão WhatsApp flutuante ─────────────────────── */

.floating-wpp {
    position: fixed;
    bottom: 32px;
    right: 32px;
    font-size: 14px;
    z-index: 2147483647;
}

.floating-wpp .floating-wpp-button {
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(37, 211, 102, .4);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform .2s;
}

.floating-wpp .floating-wpp-button:hover { transform: scale(1.1); }
.floating-wpp .floating-wpp-button:active { transform: scale(.95); }

/* no mobile, sobe acima do menu inferior fixo do comprador */
@media (max-width: 992px) {
    .floating-wpp {
        bottom: 96px;
        right: 16px;
    }
}

.floating-wpp .floating-wpp-popup.active {
    padding: 0 12px 12px;
    width: 260px;
    height: auto;
    bottom: 82px;
    opacity: 1;
}

.floating-wpp .floating-wpp-popup {
    border-radius: 6px;
    background-color: #e5ddd5;
    position: absolute;
    overflow: hidden;
    padding: 0;
    box-shadow: 1px 2px 8px rgba(60,60,60,.25);
    width: 0;
    height: 0;
    bottom: 0;
    opacity: 0;
    transition: bottom .1s ease-out, opacity .2s ease-out;
    transform-origin: bottom;
}

.floating-wpp .floating-wpp-button img,
.floating-wpp .floating-wpp-button svg {
    position: absolute;
    width: 100%;
    height: auto;
    object-fit: cover;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
}

.floating-wpp .floating-wpp-popup .floating-wpp-head {
    color: #fff;
    margin: 0 -15px 10px;
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.floating-wpp .floating-wpp-popup.active .floating-wpp-message {
    opacity: 1;
    transition-delay: .2s;
}

.floating-wpp .floating-wpp-popup .floating-wpp-message {
    background: #fff;
    padding: 8px;
    border-radius: 0 5px 5px;
    box-shadow: 1px 1px 1px rgba(0,0,0,.15);
    opacity: 0;
    transition: opacity .2s;
}

.floating-wpp .floating-wpp-input-message {
    background: #fff;
    margin: 10px -15px -15px;
    padding: 0 15px;
    display: flex;
    align-items: center;
}

.floating-wpp .floating-wpp-input-message textarea {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    margin: 10px 0;
    width: 100%;
    resize: vertical;
    font-family: inherit;
    font-size: inherit;
}

.floating-wpp .floating-wpp-btn-send {
    margin-left: 12px;
    cursor: pointer;
}

/* ── Home — Popup de cookies ─────────────────────────────── */

#cookie_popup {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 360px;
    z-index: 9999;
    background: var(--color-surface);
    border: none;
    border-radius: 18px;
    box-shadow: 0 12px 48px rgba(9, 3, 107, .16), 0 2px 8px rgba(0,0,0,.06);
    overflow: hidden;
}

#cookie_popup .cookie-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

#cookie_popup .cookie-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

#cookie_popup .cookie-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-text-primary, #1e2023);
    margin: 0;
}

#cookie_popup .cookie-desc {
    font-size: .82rem;
    color: var(--color-text-muted, #737479);
    margin: 0 0 12px;
    line-height: 1.45;
}

#cookie_popup .cookie-links {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

#cookie_popup .cookie-links a {
    font-size: .78rem;
    color: var(--brand-primary, #09036B);
    text-decoration: underline;
    text-underline-offset: 2px;
}

#cookie_popup .cookie-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

#cookie_popup #btn_aceitar_todos_cookies {
    grid-column: 1 / -1;
    background: var(--cta-gradient);
    border: none;
    color: white;
    border-radius: 10px;
    padding: .6rem;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}

#cookie_popup #btn_aceitar_todos_cookies:hover { opacity: .88; }

#cookie_popup #btn_customizar_cookies {
    background: #f0f4ff;
    border: 1.5px solid #d0d8f0;
    color: var(--brand-primary, #09036B);
    border-radius: 10px;
    padding: .55rem;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}

#cookie_popup #btn_customizar_cookies:hover { background: #e4ecff; }

#cookie_popup #btn_recusar_cookies {
    background: transparent;
    border: 1.5px solid var(--color-input-border);
    color: var(--color-text-muted, #737479);
    border-radius: 10px;
    padding: .55rem;
    font-size: .82rem;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

#cookie_popup #btn_recusar_cookies:hover {
    border-color: var(--color-text-faint);
    color: var(--color-text-secondary);
}

#cookie_popup .cookie-options .opt-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--color-text-primary, #1e2023);
    margin-bottom: 14px;
}

#cookie_popup .cookie-option-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-divider);
}

#cookie_popup .cookie-option-item:last-of-type { border-bottom: none; }

#cookie_popup .cookie-option-item .opt-info .opt-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-text-primary, #1e2023);
    margin: 0 0 2px;
}

#cookie_popup .cookie-option-item .opt-info .opt-desc {
    font-size: .76rem;
    color: var(--color-text-muted, #737479);
    line-height: 1.35;
    margin: 0;
}

#cookie_popup .form-check-input {
    width: 2.2em;
    height: 1.2em;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

#cookie_popup .form-check-input:checked {
    background-color: var(--brand-primary, #09036B);
    border-color: var(--brand-primary, #09036B);
}

#cookie_popup .cookie-opt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

#cookie_popup #btn_voltar_cookies {
    background: transparent;
    border: 1.5px solid var(--color-input-border);
    color: var(--color-text-muted, #737479);
    border-radius: 10px;
    padding: .55rem;
    font-size: .82rem;
    cursor: pointer;
}

#cookie_popup #btn_aceitar_cookies_personalizados {
    background: var(--cta-gradient);
    border: none;
    color: white;
    border-radius: 10px;
    padding: .6rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}

#cookie_popup #btn_aceitar_cookies_personalizados:hover { opacity: .88; }

@media (max-width: 420px) {
    #cookie_popup {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: 80px;
    }
}

/* ── Home — Barra de busca mobile ────────────────────────── */

.mobile-search-bar {
    display: none;
    padding: 0 16px;
    margin-top: -28px;
    position: relative;
    z-index: 3;
}

.mobile-search-bar .mobile-search-box {
    background: var(--color-surface);
    border-radius: 14px;
    box-shadow: var(--shadow-navy-lg);
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-search-bar .busca_eventos {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    padding: 12px 4px;
    color: var(--color-text-primary);
}

/* ── Home — Skeleton loaders (UX-09) ────────────────────── */

#home-loading { display: contents; }

@keyframes skeleton-shimmer {
    to { background-position: -200% 0; }
}

.skeleton-card {
    background: var(--color-surface, #fff);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    break-inside: avoid;
}

.skeleton-card .sk-img {
    height: 256px;
    background: linear-gradient(90deg, var(--sk-bg) 25%, var(--sk-shine) 50%, var(--sk-bg) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-card .sk-body {
    padding: 24px;
}

.skeleton-card .sk-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sk-line {
    border-radius: 4px;
    background: linear-gradient(90deg, var(--sk-bg) 25%, var(--sk-shine) 50%, var(--sk-bg) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.sk-line.sk-title  { height: 18px; width: 85%; }
.sk-line.sk-meta   { height: 13px; width: 70%; }
.sk-line.sk-meta-s { height: 13px; width: 55%; }

/* ── Home — Responsivo ───────────────────────────────────── */

@media (max-width: 768px) {
    .card-list {
        gap: 16px;
    }

    .mobile-search-bar {
        display: block;
    }

    .hero {
        padding: 56px 16px 60px;
    }

    .hero .hero-search {
        display: none;
    }

    /* no mobile a busca ocupa a base do hero; a seção volta ao fluxo normal */
    #eventos {
        margin-top: 28px;
    }
}

@media (max-width: 992px) {
    #eventos {
        padding-bottom: 80px;
    }
}

/* ── Termos de Uso — Página de escolha ───────────────────── */

.termos-hero {
    background: var(--hero-gradient);
    padding: 64px 16px 96px;
    text-align: center;
    color: white;
}

.termos-titulo {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: .75rem;
}

.termos-subtitulo {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .8);
    max-width: 640px;
    margin: 0 auto;
}

.termos-opcoes {
    max-width: 900px;
    margin: -48px auto 0;
    padding: 0 16px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.termos-card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-navy);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    color: inherit;
    transition: box-shadow .3s, transform .3s;
}

.termos-card:hover {
    box-shadow: var(--shadow-navy-lg);
    transform: translateY(-4px);
    color: inherit;
}

.termos-card-icone {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
}

.termos-card-titulo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin: .25rem 0 0;
}

.termos-card-desc {
    font-size: .9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.termos-card-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--brand-primary);
    transition: gap .2s;
}

.termos-card:hover .termos-card-link { gap: .7rem; }

html[data-theme="dark"] .termos-card-titulo,
html[data-theme="dark"] .termos-card-link {
    color: var(--color-text-dark);
}

/* ── Documento legal (política, termos comprador/organizador) ── */

.doc-legal {
    max-width: 900px;
    margin: -48px auto 0;
    padding: 2.5rem 3rem;
    position: relative;
    z-index: 2;
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-navy);
}

.doc-legal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 2.25rem 0 .75rem;
}

.doc-legal h2:first-child { margin-top: 0; }

.doc-legal h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 1.5rem 0 .5rem;
}

.doc-legal p,
.doc-legal li {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    text-align: justify;
}

.doc-legal li { margin-bottom: .75rem; }

.doc-legal ul { padding-left: 2rem; }

/* as cláusulas dos documentos legais trazem a própria numeração no texto (a), 1.1, …) —
   sem isso o navegador soma o marcador decimal do <ol> e duplica a numeração */
.doc-legal ol {
    list-style: none;
    padding-left: 0;
}

.doc-legal hr {
    border: none;
    border-top: 1px solid var(--color-divider);
    margin: 2rem 0;
}

.doc-legal a {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.doc-legal table {
    width: 100%;
    display: block;
    overflow-x: auto;
    margin: 1rem 0;
}

.doc-voltar {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* títulos numerados da lista dos termos do organizador */
.doc-legal .item-titulo {
    margin-top: 2.5rem;
    font-weight: 700;
    color: var(--brand-primary);
}

html[data-theme="dark"] .doc-legal .item-titulo { color: var(--color-text-dark); }

@media (max-width: 576px) {
    .doc-legal { padding: 1.75rem 1.25rem; }
}

html[data-theme="dark"] .doc-legal h2 { color: var(--color-text-dark); }
html[data-theme="dark"] .doc-legal a  { color: var(--color-accent-blue); }

/* ── Detalhe Evento — Página ─────────────────────────────── */

.ev-page {
    background: var(--color-bg-page);
    padding-bottom: 4rem;
    overflow-x: hidden;
}

.ev-banner {
    width: 100%;
    position: relative;
    background: #dde1ea;
}

.ev-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.ev-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(9,3,107,.25));
    pointer-events: none;
}

/* ── Detalhe Evento — Card principal ─────────────────────── */

.ev-card-wrap {
    width: 100%;
    max-width: 860px;
    margin: -48px auto 0;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.ev-card {
    background: var(--color-surface);
    border-radius: 16px;
    box-shadow: 0 6px 40px rgba(9,3,107,.12);
}

.ev-card-header {
    padding: 1.5rem 1.75rem 1.25rem;
    border-bottom: 1.5px solid var(--color-divider);
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.ev-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 .5rem;
    line-height: 1.3;
    word-break: break-word;
}

.ev-price-range {
    font-size: .875rem;
    color: var(--color-text-muted);
    margin: 0;
}

.ev-price-range strong { color: var(--brand-primary); font-weight: 700; }

.btn-ev-buy {
    display: block;
    width: 100%;
    padding: .85rem 1.5rem;
    background: var(--cta-gradient);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    transition: opacity .2s;
    cursor: pointer;
    text-decoration: none;
    margin-top: 1rem;
}

.btn-ev-buy:hover { opacity: .88; color: var(--brand-primary); }

/* ── Detalhe Evento — Favoritar ──────────────────────────── */

.ev-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.ev-title-actions {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    flex-shrink: 0;
}

.btn-ev-favorito {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--color-divider);
    background: var(--color-surface);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: border-color .2s, color .2s, transform .15s;
}

.btn-ev-favorito:hover { border-color: #e0245e; color: #e0245e; transform: scale(1.05); }

.btn-ev-favorito.active { border-color: #e0245e; color: #e0245e; background: rgba(224, 36, 94, .08); }

.btn-ev-favorito:disabled, .btn-ev-favorito[disabled] { opacity: .6; cursor: not-allowed; }

/* ── Detalhe Evento — Compartilhar ───────────────────────── */

.btn-ev-share {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--color-divider);
    background: var(--color-surface);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: border-color .2s, color .2s, transform .15s;
}

.btn-ev-share:hover { border-color: var(--brand-primary); color: var(--brand-primary); transform: scale(1.05); }

.ev-share-menu {
    width: 13rem;
    box-sizing: border-box;
    border-radius: 12px;
    box-shadow: var(--shadow-card-hover);
    border: 1px solid var(--color-border);
    padding: 6px 8px;
    overflow: hidden;
}

.ev-share-menu .dropdown-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 1px 0;
    padding: .6rem 1rem;
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text-primary) !important;
    background: none;
    border: none;
    text-align: left;
}

.ev-share-menu .dropdown-item:hover { background-color: #f0f4ff; }

html[data-theme="dark"] .ev-share-menu .dropdown-item:hover { background-color: rgba(255,255,255,.07); }

/* ── Detalhe Evento — Linha de informações ───────────────── */

.ev-info-row {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1.5px solid var(--color-divider);
}

.ev-info-col {
    flex: 1 1 220px;
    padding: 1.375rem 1.5rem;
    box-sizing: border-box;
    position: relative;
}

.ev-info-col:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 12%;
    height: 76%;
    width: 1.5px;
    background: #f0f0f0;
}

@media (max-width: 575px) {
    .ev-info-col { flex: 0 0 100%; border-bottom: 1.5px solid var(--color-divider); }
    .ev-info-col:last-child { border-bottom: none; }
    .ev-info-col::after { display: none; }
}

html[data-theme="dark"] .info-icon {
    color: white;
    background-color: rgba(9,3,107,1);
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(9,3,107,.07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-size: .95rem;
    margin-bottom: .875rem;
    flex-shrink: 0;
}

.info-heading {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--color-text-faint);
    margin-bottom: .6rem;
}

.info-label {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--color-text-faint);
    margin-bottom: .1rem;
}

.info-value {
    font-size: .875rem;
    color: var(--color-text-primary);
    font-weight: 500;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}

html[data-theme="dark"] .info-action {
    color: #9899A6;
}

.info-action {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    margin-top: .75rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.info-action:hover { opacity: .7; color: var(--brand-primary); }

/* ── Detalhe Evento — Descrição ──────────────────────────── */

.ev-description {
    padding: 1.75rem;
    font-size: .95rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    word-break: break-word;
    overflow-wrap: anywhere;
    border-radius: 0 0 16px 16px;
}

.ev-description-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--color-text-faint);
    margin-bottom: .875rem;
}

.ev-description img { max-width: 100%; height: auto; }
.ev-description table { max-width: 100%; display: block; overflow-x: auto; }

/* ── Detalhe Evento — Desktop ────────────────────────────── */

@media (min-width: 768px) {
    .ev-banner { max-height: 480px; overflow: hidden; }
    .ev-banner img { max-height: 480px; object-fit: contain; object-position: center top; }

    .ev-card-header { display: flex; align-items: flex-start; gap: 1.5rem; padding: 1.75rem 2rem 1.5rem; }
    .ev-header-info { flex: 1 1 auto; min-width: 0; }
    .ev-header-cta { flex-shrink: 0; min-width: 200px; }
    .btn-ev-buy { margin-top: 0; }
    .ev-title { font-size: 1.55rem; }

    .ev-info-col { padding: 1.5rem 1.75rem; }
    .ev-description { padding: 2rem; }
}

/* ── Detalhe Evento — Modal de contato ───────────────────── */

#popup_organizador {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0,0,0,.45);
    overflow-y: auto;
    padding: 1rem;
}

.ev-modal-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100%;
    padding: 1rem 0;
}

.ev-modal-box {
    background: var(--color-surface);
    border-radius: 16px;
    padding: 0;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 8px 48px rgba(0,0,0,.2);
    align-self: center;
    overflow: hidden;
    box-sizing: border-box;
}

.ev-modal-body {
    padding: 1.75rem;
    box-sizing: border-box;
}

.ev-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.ev-modal-title { font-size: 1.1rem; font-weight: 700; color: var(--color-text-primary); margin: 0; }

.ev-modal-close {
    background: none; border: none;
    font-size: 1.5rem; color: var(--color-icon-muted);
    cursor: pointer; padding: 0; line-height: 1;
}

.ev-modal-close:hover { color: var(--color-text-secondary); }

.ev-modal-event-box {
    background: var(--color-surface-alt);
    border-radius: 10px;
    padding: .875rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .875rem;
}

.ev-modal-event-box strong { color: var(--color-text-primary); font-weight: 700; }
.ev-modal-event-box p { color: var(--color-text-muted); margin: .2rem 0 0; font-size: .82rem; }

.btn-ev-send {
    padding: .75rem 1.5rem;
    background: var(--cta-gradient);
    border: none; border-radius: 10px; color: #fff;
    font-weight: 600; font-size: .9rem;
    transition: opacity .2s; cursor: pointer;
}

.btn-ev-send:hover { opacity: .88; }

.btn-ev-cancel {
    padding: .75rem 1.25rem;
    background: var(--color-surface); border: 1.5px solid var(--color-input-border);
    border-radius: 10px; color: var(--color-text-secondary);
    font-weight: 600; font-size: .9rem;
    transition: border-color .15s; cursor: pointer;
}

.btn-ev-cancel:hover { border-color: var(--brand-primary); color: var(--brand-primary); }

@media (max-width: 767.98px) {
    #popup_organizador {
        position: static !important;
        background: transparent !important;
        z-index: auto !important;
        overflow: visible !important;
        padding: 0 !important;
        height: auto !important;
        width: 100% !important;
    }
    .ev-modal-wrapper {
        display: block !important;
        min-height: auto !important;
        padding: 0 !important;
    }
    .ev-modal-box {
        border-radius: 12px !important;
        max-width: calc(100% - 2rem) !important;
        margin: .75rem 1rem 1.5rem !important;
        box-shadow: 0 2px 20px rgba(9,3,107,.1) !important;
    }
}

/* ── Checkout — Shell da página ──────────────────────────── */

.co-page { background: var(--color-bg-page); min-height: 60vh; padding: 2rem 0 4rem; }

.co-wrap {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.co-card .row { margin-left: 0; margin-right: 0; }

.co-card {
    background: var(--color-surface);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(9,3,107,.08);
    padding: 1.75rem 2rem;
    max-width: 1100px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
}

@media (max-width: 575px) {
    .co-card { padding: 1.25rem 1rem; }
}

/* ── Checkout — Wizard de passos ─────────────────────────── */

.wizard-progress-container {
    position: relative;
    margin-bottom: 1.5rem;
    align-items: center;
}

.wizard-progress-container::before {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(12.5% + 20px);
    right: calc(12.5% + 20px);
    height: 2px;
    background: var(--color-input-border);
    z-index: 0;
}

/* Trecho preenchido da linha, do início até a etapa atual (4 etapas fixas).
   right recua conforme a etapa ativa; z-index 0 fica sob os círculos (z-index 1). */
.wizard-progress-container::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(12.5% + 20px);
    right: 100%;
    height: 2px;
    background: var(--brand-primary);
    z-index: 0;
    transition: right .3s ease;
}

.wizard-progress-container:has([data-step="2"].wizard-col-active)::after { right: calc(62.5% + 20px); }
.wizard-progress-container:has([data-step="3"].wizard-col-active)::after { right: calc(37.5% + 20px); }
.wizard-progress-container:has([data-step="4"].wizard-col-active)::after { right: calc(12.5% + 20px); }

.wizard-col {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
    border: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.wizard-col span {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--color-input-border);
    color: var(--color-icon-muted);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
    transition: background .25s, box-shadow .25s;
}

.wizard-col[data-step="1"] span::before { content: "1"; }
.wizard-col[data-step="2"] span::before { content: "2"; }
.wizard-col[data-step="3"] span::before { content: "3"; }
.wizard-col[data-step="4"] span::before { content: "4"; }

.wizard-col-active span {
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 2px 10px rgba(9,3,107,.35);
}

/* Etapas já concluídas (à esquerda da ativa): preenchidas em navy com "✓",
   distinguindo-as das etapas futuras (cinza). Sem alterar o JS — usa :has. */
.wizard-col:has(~ .wizard-col-active) span {
    background: var(--brand-primary);
    color: #fff;
}

.wizard-col:has(~ .wizard-col-active) span::before {
    content: "\2713" !important;
    font-size: 1rem;
}

.wizard-label-container { margin-bottom: .5rem; }
.wizard-label-container span { font-size: 1.35rem; font-weight: 700; color: var(--color-text-primary); }
.wizard-label-hidden { display: none; }

.wizard-step { display: none; }
.wizard-step-active { display: block; }

/* ── Checkout — Cabeçalho do evento ──────────────────────── */

.event-header { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1.5px solid var(--color-divider); }
.event-header h2 { font-size: 1.3rem; font-weight: 700; color: var(--color-text-primary); margin-bottom: .5rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: .35rem .75rem; }
.event-meta-item { font-size: .85rem; color: var(--color-text-muted); display: flex; align-items: center; gap: .35rem; }
.event-meta-item i { color: var(--brand-primary); font-size: .75rem; }

/* ── Checkout — Lista de ingressos ───────────────────────── */

.ingressos-container { margin: .75rem 0; }

.titulo-grid {
    display: grid;
    grid-template-columns: 1fr 120px 160px;
    gap: 0 1rem;
    padding: .25rem 1.25rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--color-icon-muted);
}

.ingresso {
    display: grid;
    grid-template-columns: 1fr 120px 160px;
    grid-template-areas: "nome preco qtd";
    align-items: start;
    gap: 0 1rem;
    border: 1.5px solid var(--color-input-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin: .5rem 0;
    background: var(--color-surface);
    transition: border-color .15s, box-shadow .15s;
}

.ingresso:hover { border-color: #09036B33; box-shadow: 0 2px 10px rgba(9,3,107,.06); }

.titulo-ingresso   { grid-area: nome;  font-weight: 600; color: var(--color-text-primary); padding-top: .25rem; min-width: 0; }
.valor-ingresso    { grid-area: preco; color: var(--color-text-secondary); padding-top: .25rem; min-width: 0; }
.quantidade-ingresso { grid-area: qtd; min-width: 0; }
.quantidade-ingresso .form-select,
.quantidade-ingresso .form-control { width: 100%; box-sizing: border-box; }

@media (max-width: 575px) {
    .titulo-grid { display: none; }
    .ingresso {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "nome nome" "preco qtd";
        gap: .5rem .75rem;
    }
}

.titulo {
    font-size: .875rem;
    color: var(--color-text-muted);
    margin: .2rem 0;
    font-weight: 400;
}

/* ── Checkout — Forma de pagamento ───────────────────────── */

.payment-method-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--color-icon-muted); margin: 1.25rem 0 .6rem; }

.btn-grupo-opcao-pagamento {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 0;
}

@media (min-width: 576px) {
    .btn-grupo-opcao-pagamento { flex-direction: row; }
}

.btn-opcao-pagamento {
    flex: 1;
    min-height: 64px;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1.5px solid var(--color-input-border);
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
    box-shadow: none;
    outline: none;
}

.btn-opcao-pagamento:hover { border-color: #09036B55; box-shadow: 0 2px 8px rgba(9,3,107,.08) !important; }

.btn-opcao-pagamento.active {
    border-color: #09036B !important;
    background: rgba(9,3,107,.04) !important;
    color: #09036B !important;
    box-shadow: 0 0 0 2px rgba(9,3,107,.15) !important;
}

.btn-opcao-pagamento input { position: absolute; opacity: 0; pointer-events: none; }

/* ── Checkout — Totais ───────────────────────────────────── */

#total-container {
    background: var(--color-surface-alt);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0 0;
}

#total-container .row { margin: .2rem 0; font-size: .9rem; color: var(--color-text-muted); }
#total-container span { font-weight: 600; color: var(--color-text-primary); }

.total-geral { font-size: 1.2rem !important; font-weight: 700 !important; color: var(--brand-primary) !important; }

/* ── Checkout — Botões de ação ───────────────────────────── */

.btn { height: auto; }

/* escopado ao checkout: a tela de registro de organizador também usa o id btn_avancar */
.co-card #btn_avancar, .co-card #btn_pagar {
    height: auto;
    padding: .85rem 2.5rem;
    background: var(--cta-gradient);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    transition: opacity .2s;
}

.co-card #btn_avancar:hover, .co-card #btn_pagar:hover { opacity: .88; }

.btn-co-primary {
    padding: .8rem 1.5rem;
    background: var(--cta-gradient);
    border: none; border-radius: 10px;
    color: #fff; font-weight: 600; font-size: .95rem;
    transition: opacity .2s; width: 100%; cursor: pointer;
}

.btn-co-primary:hover { opacity: .88; }

.btn-co-secondary {
    padding: .8rem 1.5rem;
    background: var(--color-surface); border: 1.5px solid var(--color-input-border);
    border-radius: 10px; color: var(--color-text-secondary); font-weight: 600; font-size: .95rem;
    transition: border-color .15s; width: 100%; cursor: pointer;
}

.btn-co-secondary:hover { border-color: var(--brand-primary); color: var(--brand-primary); }

/* ── Estados interativos (UX-10) ─────────────────────────── */

/* focus-visible: outline visível só para navegação por teclado */
.btn-brand:focus-visible,
.btn-ev-buy:focus-visible,
.btn-ev-send:focus-visible,
.btn-co-primary:focus-visible,
#btn_avancar:focus-visible,
#btn_pagar:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 3px;
}

.btn-brand-outline:focus-visible,
.btn-ev-cancel:focus-visible,
.btn-co-secondary:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 3px;
}

/* active: compressão visual ao clicar */
.btn-brand:active,
.btn-ev-buy:active,
.btn-ev-send:active,
.btn-co-primary:active,
#btn_avancar:active,
#btn_pagar:active {
    opacity: .75;
    transform: scale(.98);
}

.btn-brand-outline:active,
.btn-ev-cancel:active,
.btn-co-secondary:active {
    background: rgba(9, 3, 107, .06);
    transform: scale(.98);
}

/* disabled */
.btn-brand:disabled, .btn-brand[disabled],
.btn-ev-buy:disabled, .btn-ev-buy[disabled],
.btn-ev-send:disabled, .btn-ev-send[disabled],
.btn-co-primary:disabled, .btn-co-primary[disabled],
#btn_avancar:disabled, #btn_avancar[disabled],
#btn_pagar:disabled, #btn_pagar[disabled],
.btn-brand-outline:disabled, .btn-brand-outline[disabled],
.btn-ev-cancel:disabled, .btn-ev-cancel[disabled],
.btn-co-secondary:disabled, .btn-co-secondary[disabled] {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

/* opção de pagamento: foco via teclado no radio interno */
.btn-opcao-pagamento:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(9, 3, 107, .15) !important;
    outline: none;
}

.btn-opcao-pagamento.disabled,
.btn-opcao-pagamento[aria-disabled="true"] {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Checkout — Sidebar / resumo ─────────────────────────── */

.sidebar-col {
    border-right: 1.5px solid var(--color-input-border);
    padding-right: 1.5rem;
}

.dados-comprador {
    background: var(--color-surface-alt);
    border-radius: 12px;
    padding: 1.25rem;
}

.dados-comprador .titulo { font-size: .875rem; color: var(--color-text-secondary) !important; }

/* Resumo lateral: o .titulo-grid global é uma grade larga (1fr 120px 160px) feita
   para a tabela principal; no resumo estreito ela estoura. Aqui volta a comportar-se
   como uma row do Bootstrap para alinhar com as linhas de ingresso (col-6/col-3/col-3). */
.dados-comprador .titulo-grid {
    display: flex;
    gap: 0;
    color: var(--color-icon-muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: .3rem 0;
}

.dados-comprador .ingresso-do-comprador {
    font-size: .82rem;
    color: var(--color-text-secondary);
    margin: 0;
    padding: .15rem 0;
}

.dados-comprador .ingresso-do-comprador .col-6 { color: var(--color-text-primary); font-weight: 500; }

.dados-comprador .titulo-grid .col-3,
.dados-comprador .ingresso-do-comprador .col-3 { text-align: right; }

.timeout {
    font-size: 2rem !important;
    font-weight: 700;
    color: var(--brand-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.5px;
    margin-bottom: .75rem;
    display: block;
}

.sidebar-divider { display: none; }

/* ── Checkout — Passo 3 / ingressos por pessoa ───────────── */

.step3-info {
    background: #fffbeb; border: 1px solid #fde68a;
    border-radius: 10px; padding: .875rem 1rem;
    font-size: .875rem; color: #78350f;
    margin-bottom: 1rem;
}

.ip-card {
    border: 1.5px solid var(--color-input-border);
    border-radius: 10px;
    padding: .75rem 1.25rem;
    margin: .5rem 0;
    background: var(--color-surface);
    transition: border-color .15s;
}

.ip-card:hover { border-color: #09036B33; }

.ip-card.ingresso {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: unset;
    gap: .5rem;
    align-items: center;
}

@media (min-width: 576px) {
    .ip-card.ingresso {
        grid-template-columns: 2fr 2fr 2fr auto;
        gap: .5rem 1rem;
    }
}

.ip-card-titulo { font-weight: 600; color: var(--color-text-primary); font-size: .9rem; min-width: 0; }
.ip-card-check { white-space: nowrap; }
.ip-card .titulo-ingresso { grid-area: unset; }

.ip-card-header { display: none; }

@media (min-width: 576px) {
    .ip-card-header {
        display: grid;
        grid-template-columns: 2fr 2fr 2fr auto;
        gap: 0 1rem;
        padding: .25rem 1.25rem;
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .5px;
        color: var(--color-icon-muted);
        margin-bottom: .25rem;
    }
}

/* ── Checkout — dados adicionais (passo 3) ───────────────── */

.ip-campos-adicionais:empty { display: none; }

.ip-campos-adicionais {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-top: .5rem;
    margin-top: .25rem;
    border-top: 1px solid var(--color-input-border);
}

@media (min-width: 576px) {
    .ip-campos-adicionais { grid-column: 1 / -1; }
}

.ip-campo-adicional-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: .25rem;
}

.ip-campo-adicional-opcoes { display: flex; flex-direction: column; gap: .25rem; }

/* ── Checkout — Prompt de login ──────────────────────────── */

.login-prompt {
    background: var(--color-surface-alt);
    border: 1.5px solid var(--color-input-border);
    border-radius: 12px;
    padding: 1.75rem;
    text-align: center;
    max-width: 360px;
    margin: 2rem auto;
}

.login-prompt h4 { font-size: 1rem; font-weight: 700; margin-bottom: .35rem; color: var(--color-text-primary); }
.login-prompt p { font-size: .875rem; color: var(--color-text-muted); margin-bottom: 1rem; }

/* Passo 2: aproxima e centraliza as duas colunas, reduzindo o vazio lateral
   em volta do card de login/identificação. Só afeta a etapa "Seus dados". */
.wizard-step[data-step="2"] > .row {
    justify-content: center;
    align-items: center;
}

.wizard-step[data-step="2"] .col.ps-md-4 {
    max-width: 480px;
}

/* ── Checkout — Bandeiras de cartão ──────────────────────── */

.card-brands { height: auto; overflow: visible; margin: .5rem 0 1rem; }
.card-brands span { height: 20px; width: 30px; }
.card-brands img { height: 20px; width: 30px; }

/* ── Checkout — Campos de cartão (cc-row) ────────────────── */

.cc-row { display: flex; gap: .75rem; }
.cc-row > * { flex: 1; min-width: 0; }

@media (max-width: 575px) {
    .cc-row { flex-direction: column; }
    .cc-row > * { flex: none; }
}

/* ── Checkout — Mount points MercadoPago ─────────────────── */

#numero_cartao,
#validade_cartao,
#cod_seg_cartao {
    height: 42px;
    padding: 0 0 0 0.75rem !important;
    overflow: hidden;
    display: flex;
    align-items: center;
}

#numero_cartao iframe,
#validade_cartao iframe,
#cod_seg_cartao iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
}

/* ── Checkout — Trust badges e sticky CTA ────────────────── */

.trust-badges { font-size: .8rem; color: var(--color-text-muted); margin-top: .5rem; }
.trust-badges i { color: #22c55e; }
.trust-badges strong { color: var(--color-text-primary); }

@media (max-width: 767.98px) {
    .sticky-cta-mobile {
        position: sticky; bottom: 0;
        background: var(--color-surface);
        padding: .75rem 0 .5rem;
        z-index: 100;
        border-top: 1px solid var(--color-input-border);
        box-shadow: 0 -2px 8px rgba(0,0,0,.08);
    }
}

/* ── Checkout — Páginas de resultado ─────────────────────── */

.co-result {
    text-align: center;
    padding: 2.5rem 1.5rem;
    max-width: 560px;
    margin: 0 auto;
}

.result-icon {
    width: 72px; height: 72px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 1.25rem;
}

.result-icon.success { background: #f0fdf4; color: #22c55e; }
.result-icon.danger  { background: #fef2f2; color: #ef4444; }
.result-icon.warning { background: #fffbeb; color: #f59e0b; }
.result-icon.info    { background: #eff6ff; color: #3b82f6; }

.result-title { font-size: 1.4rem; font-weight: 700; color: var(--color-text-primary); margin-bottom: .75rem; }
.result-body { font-size: .9rem; color: var(--color-text-muted); line-height: 1.7; text-align: left; }
.result-body ul { padding-left: 1.25rem; }
.result-body ul li { margin-bottom: .5rem; }

/* ── Checkout — QR Code ──────────────────────────────────── */

.qr-wrapper { display: flex; flex-direction: column; align-items: center; gap: .875rem; }
.qr-wrapper img { border: 4px solid var(--color-input-border); border-radius: 12px; max-width: 210px; }

/* ── Checkout — Compatibilidade ──────────────────────────── */

.box { margin-top: 0 !important; float: none; }
.social-login a.cadastre { color: #09036B; text-decoration: none; }

/* ── Checkout — Campo somente-leitura ────────────────────── */

.co-info-field {
    background: var(--color-surface-alt);
    border: 1.5px solid var(--color-input-border);
    border-radius: 10px;
    padding: .625rem 1rem;
}

.co-info-label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--color-text-muted);
    margin-bottom: .2rem;
}

.co-info-value {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: .95rem;
    font-weight: 500;
    color: var(--color-text-primary);
    padding: 0;
    box-shadow: none;
}

/* ── Checkout — Loading overlay ──────────────────────────── */

#checkout-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.92);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    z-index: 10;
}

#checkout-loading .co-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--color-input-border);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: co-spin .7s linear infinite;
}

#checkout-loading p { margin: 0; font-size: .95rem; color: var(--color-text-secondary); }

/* ── Botão de tema (claro / escuro) ─────────────────────── */

.btn-tema {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1rem;
    padding: 6px 8px;
    cursor: pointer;
    opacity: .8;
    transition: opacity .15s;
    line-height: 1;
}

.btn-tema:hover { opacity: 1; }

/* ── Dark mode — override de tokens ─────────────────────── */

html[data-theme="dark"] {
    /* Superfícies */
    --color-bg-page:      #12131a;
    --color-surface:      #1c1e2b;
    --color-surface-alt:  #23263a;

    /* Bordas e divisores */
    --color-border:       rgba(255, 255, 255, .08);
    --color-divider:      #2a2d48;
    --color-input-border: #363852;

    /* Texto */
    --color-text-primary:   #e8e9ef;
    --color-text-secondary: #9899a6;
    --color-text-muted:     #8f9099;  /* ~5.2:1 em #1c1e2b — AA */
    --color-text-dark:      #dde1ff;
    --color-text-faint:     #9a9aaa;  /* ~6.0:1 em #1c1e2b — AA */

    /* Ícones */
    --color-icon-muted: #8f9099;  /* ~5.2:1 em #1c1e2b — AA */

    /* Ações */
    --color-accent-blue:  #4ca3ff;
    --color-footer-bar:   #0036a0;
    --color-footer-bg:    #171827;
    --color-btn-outline-hover: rgba(255, 255, 255, .06);

    /* Sombras navy ficam neutras no escuro */
    --shadow-navy:    0 4px 20px rgba(0, 0, 0, .4);
    --shadow-navy-lg: 0 12px 32px rgba(0, 0, 0, .55);

    /* Sombras (mais densas no escuro) */
    --shadow-card:       0 4px 24px rgba(0, 0, 0, .4);
    --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, .6);

    /* skeleton */
    --sk-bg:    #23263a;
    --sk-shine: #2a2d48;
}

/* Bootstrap 5 não ativa dark mode automaticamente (requer data-bs-theme); forçar fundo */
html[data-theme="dark"] body {
    background-color: var(--color-bg-page);
    color: var(--color-text-primary);
}

/* Busca do hero e mobile: superfícies e texto seguem os tokens no dark mode */
html[data-theme="dark"] .hero .hero-search .busca_eventos,
html[data-theme="dark"] .mobile-search-bar .busca_eventos {
    color: var(--color-text-primary);
}

html[data-theme="dark"] .hero-search-icon {
    color: var(--color-accent-blue);
}

    /* Navbar clara vira superfície escura: reforça texto e sombra */
    html[data-theme="dark"] .navbar-custom {
        box-shadow: 0 4px 20px rgba(0, 0, 0, .5);
    }

html[data-theme="dark"] .navbar-custom .nav-link.btn-nav-solid {
    background: var(--brand-secondary);
}

/* Cards: badge de data e título mantêm contraste */
html[data-theme="dark"] .event-card .event-day {
    color: var(--color-text-dark);
}

html[data-theme="dark"] .event-card .event-name {
    color: var(--color-text-dark);
}

/* Botão carregar mais: borda/texto claros */
html[data-theme="dark"] .btn-load-more {
    border-color: var(--color-text-dark);
    color: var(--color-text-dark);
}

/* Footer: título dos grupos e sociais legíveis no escuro */
html[data-theme="dark"] .menu-footer > .container > .column > .title {
    color: var(--color-text-dark);
}

html[data-theme="dark"] .menu-footer .social-btn {
    background: var(--brand-secondary);
}

html[data-theme="dark"] a, html[data-theme="dark"] a:hover { color: #415FFE }

html[data-theme="dark"] .navbar-custom .dropdown .dropdown-item:hover { background-color: rgba(255,255,255,.07); }

html[data-theme="dark"] .ev-info-col:not(:last-child)::after { background: var(--color-divider); }

html[data-theme="dark"] #checkout-loading { background: rgba(28, 30, 43, .94); }

html[data-theme="dark"] .btn-opcao-pagamento.active { background: rgba(9,3,107,.25) !important; color: var(--color-text-secondary) !important; }

@keyframes co-spin { to { transform: rotate(360deg); } }

/* ── Contraste dos CTAs (WCAG AA) ────────────────────────────
   O --cta-gradient (azul→ciano claro) não atinge 4.5:1 com texto branco.
   Texto navy passa em todo o gradiente (como o botão "Buscar" da home).
   Regra agrupada após as definições para vencer os color:#fff originais. */
.btn-brand,
.btn-ev-buy,
.btn-ev-send,
.btn-co-primary,
.co-card #btn_avancar,
.co-card #btn_pagar,
#cookie_popup #btn_aceitar_todos_cookies,
#cookie_popup #btn_aceitar_cookies_personalizados {
    color: var(--brand-primary);
}
