/* =============================================================================
   Site publico do produtor/comissario - tela 2.0
   Identidade visual do app principal (app.uniqueingressos.com.br).
   Os tokens vem de assets/header/header.css (:root), ja usado pelo header do site;
   aqui so complementamos o que falta. Tudo escopado em .ps2 porque esta pagina
   carrega o CSS legado do site inteiro (bootstrap 4 + tema).
   ========================================================================== */

.ps2 {
    --ps2-orange: var(--orange-primary, #ff8c00);
    --ps2-orange-strong: #e67e00;
    --ps2-fg: var(--foreground, #0a0a0a);
    --ps2-muted: var(--muted-foreground, #334155);
    --ps2-surface: var(--card, #ffffff);
    --ps2-muted-surface: #f8fafc;
    --ps2-border: rgba(0, 0, 0, 0.06);
    --ps2-border-strong: rgba(0, 0, 0, 0.1);
    --ps2-radius: 16px;
    --ps2-radius-sm: 10px;
    --ps2-radius-lg: 20px;
    --ps2-radius-xl: 24px;
    --ps2-shadow-card: 0 2px 8px 0 rgba(0, 0, 0, 0.08), 0 1px 4px 0 rgba(0, 0, 0, 0.06);
    --ps2-shadow-elevated: 0 8px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 16px -8px rgba(0, 0, 0, 0.08);
    --ps2-shadow-orange: 0 10px 20px -6px rgba(255, 140, 0, 0.35);
    --ps2-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ps2-container: 1242px;
    --ps2-header-height: 63px;

    display: block;
    font-family: "Inter", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ps2-fg);
    background: #ffffff;
    padding-bottom: 56px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* O tema legado pinta o body com textura cinza; a 2.0 e branca como o app. */
body:has(.ps2) {
    background: #ffffff !important;
}

.ps2 *,
.ps2 *::before,
.ps2 *::after {
    box-sizing: border-box;
}

.ps2 a {
    text-decoration: none;
    color: inherit;
}

.ps2 a:hover,
.ps2 a:focus {
    text-decoration: none;
    color: inherit;
}

.ps2 img {
    max-width: 100%;
    display: block;
}

.ps2 h1,
.ps2 h2,
.ps2 h3 {
    font-family: "Poppins", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    letter-spacing: -0.01em;
    text-transform: none;
}

.ps2-container {
    width: 100%;
    max-width: var(--ps2-container);
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

/* -----------------------------------------------------------------------------
   Hero: capa do comissario + identidade
   -------------------------------------------------------------------------- */
.ps2-hero {
    position: relative;
    /* 72px = altura do cabecalho do site fora desta pagina; a folga vale mesmo sem o ajuste. */
    padding-top: calc(72px + 28px + env(safe-area-inset-top));
    padding-bottom: 32px;
    background: linear-gradient(180deg, rgba(255, 140, 0, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
    overflow: hidden;
}

.ps2-hero__glow {
    position: absolute;
    top: -160px;
    right: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.18) 0%, rgba(255, 140, 0, 0) 70%);
    pointer-events: none;
}

.ps2-hero__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ps2-hero__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1200 / 400;
    border-radius: var(--ps2-radius-xl);
    overflow: hidden;
    background: var(--ps2-muted-surface);
    border: 1px solid var(--ps2-border);
    box-shadow: var(--ps2-shadow-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fundo desfocado com a propria capa, para capas de proporcao diferente. */
.ps2-hero__cover::before {
    content: "";
    position: absolute;
    inset: -10%;
    background: var(--ps2-cover) center center / cover no-repeat;
    filter: blur(28px) saturate(120%);
    transform: scale(1.15);
    opacity: 0.55;
}

.ps2-hero__cover--placeholder::before {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.22) 0%, rgba(27, 27, 27, 0.12) 100%);
    filter: none;
    opacity: 1;
    transform: none;
}

.ps2-hero__cover-image {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
}

.ps2-hero__identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.ps2-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.2);
    color: var(--ps2-orange);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.ps2-hero__name {
    font-size: 31.5px;
    font-weight: 700;
    line-height: 1.15;
    word-break: break-word;
}

.ps2-hero__phrase {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    max-width: 640px;
}

.ps2-hero__phrase:empty {
    display: none;
}

/* -----------------------------------------------------------------------------
   Lista de eventos
   -------------------------------------------------------------------------- */
.ps2-events {
    padding-top: 8px;
}

.ps2-events__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ps2-events__title {
    font-size: 22px;
    font-weight: 600;
    color: var(--ps2-fg);
}

.ps2-events__count {
    font-size: 13px;
    color: var(--ps2-muted);
}

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

/* Cartao de evento: mesmo desenho do card do app (borda leve, raio 20, hover sobe). */
.ps2-card {
    display: flex;
    flex-direction: column;
    background: var(--ps2-surface);
    border: 1px solid var(--ps2-border);
    border-radius: var(--ps2-radius-lg);
    box-shadow: var(--ps2-shadow-card);
    overflow: hidden;
    transition: var(--ps2-transition);
}

.ps2-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 140, 0, 0.3);
    box-shadow: var(--ps2-shadow-elevated);
}

.ps2-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.ps2-card__media {
    display: block;
    position: relative;
    height: 370px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: var(--ps2-muted-surface);
    flex-shrink: 0;
}

.ps2-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease-out;
}

.ps2-card:hover .ps2-card__media img {
    transform: scale(1.04);
}

.ps2-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    padding: 17.5px 17.5px 21px;
}

.ps2-card__title {
    font-size: 15.75px;
    font-weight: 600;
    line-height: 1.25;
    min-height: 49px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ps2-card__title {
    transition: color 0.3s ease;
}

.ps2-card:hover .ps2-card__title {
    color: var(--ps2-orange);
}

.ps2-card__meta {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    font-size: 12.25px;
    color: var(--ps2-muted);
}

.ps2-card__meta > span {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.35;
}

.ps2-card__meta svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.ps2-card__meta > span > span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botoes */
.ps2-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 0;
    border-radius: var(--ps2-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: var(--ps2-transition);
}

.ps2-button--ghost {
    background: #ffffff;
    color: var(--ps2-fg);
    border: 1px solid var(--ps2-border-strong);
}

.ps2-button--ghost:hover,
.ps2-button--ghost:focus {
    color: var(--ps2-orange);
    border-color: rgba(255, 140, 0, 0.35);
}

.ps2-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.3);
}

/* Estado vazio */
.ps2-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 48px 24px;
    border: 1px dashed var(--ps2-border-strong);
    border-radius: var(--ps2-radius-lg);
    background: var(--ps2-muted-surface);
}

.ps2-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 140, 0, 0.12);
    color: var(--ps2-orange);
}

.ps2-empty__title {
    font-size: 17px;
    font-weight: 600;
}

.ps2-empty__text {
    margin: 0;
    font-size: 14px;
    color: var(--ps2-muted);
    max-width: 380px;
}

.ps2-empty .ps2-button {
    margin-top: 8px;
}

/* -----------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /*
     * Rodape fixo do site (81px) + margem para a barra de endereco do navegador, que aparece
     * e some durante a rolagem e come o fim da pagina. Com 104px sobravam 23px, que somem no
     * aparelho real: o ultimo cartao ficava debaixo da barra.
     */
    .ps2 {
        padding-bottom: calc(150px + env(safe-area-inset-bottom));
    }

    /*
     * A folga do topo usa 72px, que e a altura do cabecalho do site FORA desta pagina, e nao a
     * de 63px que esta pagina aplica: assim a capa nunca fica sob o cabecalho, mesmo se o
     * ajuste de 63px nao valer (navegador sem :has()). env() cobre o recorte do iPhone.
     */
    .ps2-hero {
        padding-top: calc(72px + 20px + env(safe-area-inset-top));
        padding-bottom: 18px;
    }

    .ps2-hero__inner {
        gap: 16px;
    }

    .ps2-hero__cover {
        aspect-ratio: 2 / 1;
        border-radius: var(--ps2-radius);
    }

    .ps2-events__head {
        margin-bottom: 14px;
    }

    .ps2-events__title {
        font-size: 19px;
    }

    /* A data nunca pode ser cortada; o endereco pode resumir em uma linha. */
    .ps2-card__where span {
        -webkit-line-clamp: 1;
    }

    .ps2-hero__name {
        font-size: 25px;
    }

    /* O app usa UMA coluna no celular, com o cartao ocupando a largura toda. */
    .ps2-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 21px;
    }

    .ps2-container {
        padding-left: 21px;
        padding-right: 21px;
    }

    .ps2-card__body {
        padding: 17.5px 17.5px 21px;
        gap: 10px;
    }

    .ps2-card__title {
        font-size: 14px;
        line-height: 17.5px;
        min-height: 49px;
    }

    .ps2-card__meta {
        font-size: 12px;
    }

    .ps2-button--accent {
        padding: 12px 14px;
        font-size: 13px;
        border-radius: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ps2-card,
    .ps2-card__media img,
    .ps2-button {
        transition: none;
    }

    .ps2-card:hover {
        transform: none;
    }

    .ps2-card:hover .ps2-card__media img {
        transform: none;
    }
}

/* -----------------------------------------------------------------------------
   Rodape do site (componente compartilhado): na 2.0 o botao de WhatsApp entra na
   mesma escala tipografica da pagina. Escopado por :has(.ps2), entao nenhuma outra
   tela do site muda.
   -------------------------------------------------------------------------- */
body:has(.ps2) .whatsapp-button {
    font-size: 15px;
    padding: 12px 22px;
    border-radius: 14px;
}

body:has(.ps2) .whatsapp-button .whatsapp-icon {
    width: 18px;
    height: 18px;
}

/* -----------------------------------------------------------------------------
   Cabecalho do site (componente compartilhado newHeaderV2): na 2.0 ele entra nas
   medidas do app (63px de altura, logo 28px, item de menu 14px/raio 16px, busca
   35px/raio 14px). Escopado por :has(.ps2) — nenhuma outra tela do site muda.
   -------------------------------------------------------------------------- */
body:has(.ps2) .header-container {
    height: 63px;
}

body:has(.ps2) .header-content {
    max-width: 1242px;
}

body:has(.ps2) .logo-image {
    height: 28px;
}

body:has(.ps2) .nav-item {
    font-size: 14px;
    padding: 7px 10.5px;
    border-radius: 16px;
}

body:has(.ps2) .search-input {
    height: 35px;
    border-radius: 14px;
    font-size: 12.25px;
}

body:has(.ps2) .search-container {
    max-width: 448px;
}
