/*
 * Página pública do organizador (eventon.com.br/{slug-do-organizador}).
 *
 * Tudo vive dentro de .orgp e só consome variáveis: a cor da marca chega no
 * atributo style do wrapper (--ev-accent, --ev-accent-strong, --ev-accent-soft,
 * --ev-on-accent, gerados por ColorHelper.BrandVars) e o tema escuro troca a
 * paleta de fundo/tinta em .orgp-dark. Nenhuma cor fixa aqui, senão a
 * personalização não pega.
 *
 * O cartão de evento é o mesmo da home (page-home.css): .ticket-card usa os
 * tokens --ev-red*, que aqui apontam para a cor do organizador.
 *
 * Layout por container query (não por viewport): o mesmo CSS desenha a página
 * de verdade e o preview estreito do painel do organizador.
 */

.orgp {
    container: orgp / inline-size;
    min-height: 100vh;
    background: var(--ev-paper);
    color: var(--ev-ink);

    /* A marca do organizador substitui o vermelho do Eventon em tudo que é acento. */
    --ev-red: var(--ev-accent);
    --ev-red-deep: var(--ev-accent-strong);
    --ev-red-wash: var(--ev-accent-soft);
    --ev-focus: var(--ev-accent);
    --orgp-hero-h: 300px;
}

/* Tema escuro: paleta invertida; a cor da marca continua a mesma. */
.orgp-dark {
    --ev-paper: #10141c;
    --ev-surface: #171d28;
    --ev-surface-deep: #1f2735;
    --ev-line: #283143;
    --ev-line-strong: #364156;
    --ev-ink: #f2f4f8;
    --ev-ink-soft: #cbd2dd;
    --ev-muted: #98a3b4;
    --ev-faint: #6c7788;
    --ev-navy: #0b0f17;
    --ev-e1: 0 1px 2px rgba(0, 0, 0, .35);
    --ev-e2: 0 4px 12px rgba(0, 0, 0, .4);
    --ev-e3: 0 14px 34px rgba(0, 0, 0, .55);
    color-scheme: dark;
}

.orgp a { color: var(--ev-accent); }
.orgp a:hover { color: var(--ev-accent-strong); }

.orgp .btn-primary,
.orgp .btn-primary:not(:disabled):not(.disabled):active {
    background: var(--ev-accent);
    border-color: var(--ev-accent);
    color: var(--ev-on-accent);
}

.orgp .btn-primary:hover,
.orgp .btn-primary:focus {
    background: var(--ev-accent-strong);
    border-color: var(--ev-accent-strong);
    color: var(--ev-on-accent);
    box-shadow: none;
}

.orgp ::selection { background: var(--ev-accent); color: var(--ev-on-accent); }

/* ==========================================================================
   Topo: logo + nome à esquerda, redes à direita
   ========================================================================== */

.orgp-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--ev-paper) 88%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--ev-line);
}

.orgp-topbar-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
}

.orgp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--ev-ink) !important;
    font-weight: 650;
    font-size: 15.5px;
    letter-spacing: -.01em;
}

.orgp-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    object-fit: cover;
    background: var(--ev-surface-deep);
    flex: 0 0 auto;
}

.orgp-brand-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ----- redes sociais (topo e rodapé) ----- */
.orgp-social {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.orgp-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--ev-muted);
    transition: color .15s var(--ev-ease), background-color .15s var(--ev-ease);
}

.orgp-social a:hover,
.orgp-social a:focus-visible {
    color: var(--ev-accent);
    background: var(--ev-accent-soft);
}

.orgp-social svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ==========================================================================
   Capa
   ========================================================================== */

.orgp-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ev-accent), var(--ev-accent-strong));
    color: #fff;
}

.orgp-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.orgp-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Sobre a foto, um véu escuro para o texto ler; sem foto o gradiente da marca basta. */
.orgp-hero-has-cover .orgp-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 11, 18, .18), rgba(8, 11, 18, .72));
}

.orgp-hero-in {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 40px;
    padding-bottom: 32px;
    min-height: var(--orgp-hero-h);
    justify-content: flex-end;
}

.orgp-hero-logo {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    padding: 4px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
    flex: 0 0 auto;
}

.orgp-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.orgp-hero-title {
    color: #fff;
    font-size: clamp(28px, 6cqw, 44px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.08;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.orgp-hero-desc {
    color: rgba(255, 255, 255, .88);
    font-size: 15.5px;
    line-height: 1.55;
    max-width: 62ch;
    margin-top: 10px;
}

.orgp-hero-desc p { margin: 0 0 8px; color: inherit !important; }
.orgp-hero-desc p:last-child { margin-bottom: 0; }
.orgp-hero-desc a { color: #fff; text-decoration: underline; }

.orgp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .8);
    font-size: 13.5px;
    font-weight: 600;
}

@container orgp (min-width: 720px) {
    .orgp { --orgp-hero-h: 380px; }
    .orgp-hero-in { flex-direction: row; align-items: flex-end; gap: 26px; padding-bottom: 40px; }
    .orgp-hero-logo { width: 128px; height: 128px; border-radius: 24px; padding: 5px; }
    .orgp-hero-logo img { border-radius: 19px; }
    .orgp-topbar-in { min-height: 68px; }
    .orgp-brand-logo { width: 40px; height: 40px; }
}

/* ----- aviso de prévia (só o dono vê) ----- */
.orgp-preview-note {
    background: var(--ev-warn-wash);
    color: #6d4d05;
    border-bottom: 1px solid rgba(217, 151, 10, .35);
    font-size: 13.5px;
    padding: 10px 0;
}

.orgp-preview-note .container { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.orgp-preview-note strong { font-weight: 650; }
.orgp-preview-note a { color: #6d4d05; text-decoration: underline; }

/* ==========================================================================
   Seções
   ========================================================================== */

.orgp-section { padding: 40px 0 8px; }

.orgp-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.orgp-section-head h2 {
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -.02em;
    margin: 0;
    color: var(--ev-ink);
}

.orgp-count { color: var(--ev-muted); font-size: 14px; font-weight: 500; white-space: nowrap; }

@container orgp (min-width: 720px) {
    .orgp-section { padding-top: 52px; }
    .orgp-section-head h2 { font-size: 26px; }
}

/* ----- evento em destaque ----- */
.orgp-feat {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--ev-surface);
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-panel);
    overflow: hidden;
    color: inherit !important;
    box-shadow: var(--ev-e1);
    transition: box-shadow .18s var(--ev-ease), transform .18s var(--ev-ease);
}

.orgp-feat:hover { box-shadow: var(--ev-e3); transform: translateY(-2px); text-decoration: none; }

.orgp-feat-media {
    aspect-ratio: 16 / 9;
    background: var(--ev-surface-deep);
    overflow: hidden;
}

.orgp-feat-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.orgp-feat-body { padding: 22px; display: flex; flex-direction: column; gap: 6px; }

.orgp-feat-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 11px;
    border-radius: var(--ev-r-pill);
    background: var(--ev-accent-soft);
    color: var(--ev-accent-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.orgp-feat-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.15;
    margin: 0;
    color: var(--ev-ink);
}

.orgp-feat-when { color: var(--ev-ink-soft); font-weight: 600; margin: 4px 0 0; font-size: 15px; }
.orgp-feat-where { color: var(--ev-muted); margin: 0; font-size: 14px; }
.orgp-feat-cta { align-self: flex-start; margin-top: 12px; }

@container orgp (min-width: 720px) {
    .orgp-feat { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
    .orgp-feat-media { aspect-ratio: auto; min-height: 100%; }
    .orgp-feat-body { padding: 32px; justify-content: center; }
    .orgp-feat-name { font-size: 30px; }
}

/* ----- busca e categorias ----- */
.orgp-filters { margin-bottom: 22px; }

.orgp-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.orgp-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--ev-ink);
    background: var(--ev-paper);
    border: 1px solid var(--ev-line-strong);
    border-radius: 10px;
}

.orgp-search-input::placeholder { color: var(--ev-faint); }
.orgp-search-input:focus { outline: none; border-color: var(--ev-accent); box-shadow: 0 0 0 3px var(--ev-accent-soft); }

.orgp-search-btn { height: 46px; min-height: 46px; padding: 0 20px; border-radius: 10px; flex: 0 0 auto; }

.orgp-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.orgp-chip {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--ev-r-pill);
    background: var(--ev-surface);
    border: 1px solid var(--ev-line);
    color: var(--ev-ink-soft) !important;
    font-size: 13.5px;
    font-weight: 500;
    transition: background-color .15s var(--ev-ease), border-color .15s var(--ev-ease);
}

.orgp-chip:hover { border-color: var(--ev-line-strong); background: var(--ev-surface-deep); text-decoration: none; }

.orgp-chip.is-on {
    background: var(--ev-accent);
    border-color: var(--ev-accent);
    color: var(--ev-on-accent) !important;
    font-weight: 600;
}

.orgp-applied { color: var(--ev-muted); font-size: 14px; margin: -8px 0 18px; }
.orgp-applied a { font-weight: 600; margin-left: 8px; }

/* ----- grade e cartões ----- */
.orgp .home-grid { gap: 20px; }

.orgp .ticket-card.is-past { opacity: .7; }
.orgp .ticket-card.is-past:hover { opacity: 1; }
.orgp .ticket-card.is-past .ticket-card-media img { filter: grayscale(.6); }
.orgp .ticket-card-tag-past { background: rgba(23, 28, 40, .82); }

.orgp-empty {
    color: var(--ev-muted);
    background: var(--ev-surface);
    border: 1px dashed var(--ev-line-strong);
    border-radius: var(--ev-r-card);
    padding: 36px 24px;
    text-align: center;
}

.orgp-empty h3 { font-size: 18px; font-weight: 650; margin: 0 0 6px; color: var(--ev-ink); }
.orgp-empty p { margin: 0 auto; }

/* ----- avise-me ----- */
.orgp-subscribe { padding: 48px 0 8px; }

.orgp-subscribe-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--ev-surface);
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-panel);
    padding: 28px 24px;
}

.orgp-subscribe-box h2 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; margin: 0 0 6px; color: var(--ev-ink); }
.orgp-subscribe-box p { color: var(--ev-muted); margin: 0; font-size: 14.5px; max-width: 48ch; }

.orgp-subscribe-form { display: grid; gap: 10px; }

.orgp-subscribe-form .form-control {
    height: 46px;
    border-radius: 10px;
    border: 1px solid var(--ev-line-strong);
    background: var(--ev-paper);
    color: var(--ev-ink);
}

.orgp-subscribe-form .form-control:focus { border-color: var(--ev-accent); box-shadow: 0 0 0 3px var(--ev-accent-soft); }
.orgp-subscribe-form .btn { height: 46px; border-radius: 10px; }
.orgp-subscribe-form .field-validation-error, .orgp-subscribe-form .text-danger { font-size: 13px; }

.orgp-subscribe-done {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ev-ok);
    font-weight: 600;
}

@container orgp (min-width: 720px) {
    .orgp-subscribe-box { flex-direction: row; align-items: center; justify-content: space-between; padding: 34px 38px; }
    .orgp-subscribe-form { grid-template-columns: 1fr 1fr auto; flex: 0 0 auto; width: 56%; }
}

/* ==========================================================================
   Rodapé: contato, redes e a assinatura do Eventon
   ========================================================================== */

.orgp-footer {
    margin-top: 56px;
    border-top: 1px solid var(--ev-line);
    padding: 28px 0 34px;
    color: var(--ev-muted);
    font-size: 14px;
}

.orgp-footer-in { display: flex; flex-direction: column; gap: 18px; }

.orgp-footer-brand { display: flex; align-items: center; gap: 10px; color: var(--ev-ink); font-weight: 650; }

.orgp-contact { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; }

.orgp-contact a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ev-ink-soft);
    font-weight: 500;
}

.orgp-contact a:hover { color: var(--ev-accent); }
.orgp-contact svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* A única presença do Eventon na página: pequena, no canto, sem competir com a marca do organizador. */
.orgp-powered {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ev-faint) !important;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .02em;
    opacity: .85;
    transition: opacity .15s var(--ev-ease);
}

.orgp-powered:hover { opacity: 1; text-decoration: none; }
.orgp-powered img { height: 16px; width: auto; display: block; }

@container orgp (min-width: 720px) {
    .orgp-footer-in { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
    .orgp-powered { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .orgp .ticket-card, .orgp-feat { transition: none; }
}
