/* SPEH-X — Etapa 1 (2026-10-14): primeiro quadrante de COMPETIÇÕES sobre a página principal.
 * Só aparência. Desktop (≥ 900 px): ao lado do MENU aberto, abaixo do cabeçalho; telas menores:
 * por cima do MENU (que continua aberto por baixo). A página continua visível através da
 * película escura translúcida. */

.spx-cq {
    --spx-cq-laranja: #ff4d14;
    --spx-cq-verde: #2fe39a;
    --spx-cq-vidro: rgba(14, 14, 18, 0.68);
    --spx-cq-borda: rgba(255, 255, 255, 0.16);
    --spx-cq-linha: rgba(255, 255, 255, 0.14);
    --spx-cq-sub: #c4c4ca;
    --spx-ico-pino: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6-5.6-6-11a6 6 0 0 1 12 0c0 5.4-6 11-6 11z'/%3E%3Ccircle cx='12' cy='10' r='2.2'/%3E%3C/svg%3E");
    --spx-ico-haltere: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff4d14' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5l11 11M4 9l5-5M15 20l5-5M2.5 10.5l3-3M18.5 21.5l3-3M9 4l1.5 1.5M18.5 13.5L20 15M4 9l1.5 1.5M13.5 18.5L15 20'/%3E%3C/svg%3E");
    --spx-ico-pessoas: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6'/%3E%3Ccircle cx='17' cy='9' r='2.4'/%3E%3Cpath d='M16 14.2c2.9.1 5 2.6 5 5.8'/%3E%3C/svg%3E");
    --spx-ico-ingresso: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8l9-5 2.5 4.3a2 2 0 0 0 2.7.7L21 15l-9 5-2.4-4.2a2 2 0 0 0-2.8-.8z'/%3E%3Cpath d='M11 7.5l1 1.7M13 11l1 1.7'/%3E%3C/svg%3E");
    --spx-ico-fechar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5L5 19'/%3E%3C/svg%3E");

    position: fixed;
    top: var(--spx-cq-topo, 0px);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100001;
    box-sizing: border-box;
    color: #ffffff;
    font-family: inherit;
}

.spx-cq[hidden] {
    display: none;
}

#spx-cq *,
#spx-cq *::before,
#spx-cq *::after {
    box-sizing: border-box;
}


/* neutraliza estilos do tema/Elementor da página principal só dentro do quadrante */
#spx-cq h2,
#spx-cq h3,
#spx-cq p,
#spx-cq ul,
#spx-cq li {
    margin: 0;
    padding: 0;
    font-family: inherit;
    letter-spacing: normal;
    line-height: 1.3;
    text-transform: none;
}

#spx-cq button {
    margin: 0;
    min-height: 0;
    font-family: inherit;
    letter-spacing: normal;
    line-height: 1.25;
    text-transform: none;
    box-shadow: none;
}

#spx-cq .spx-cq__area {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

/* película escura translúcida: a página principal continua visível ao fundo */
#spx-cq .spx-cq__pelicula {
    position: absolute;
    inset: 0;
    background: rgba(6, 6, 9, 0.5);
}

#spx-cq .spx-cq__area {
    position: relative;
    height: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 22px 24px 32px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* ---------- título ---------- */
#spx-cq .spx-cq__topo {
    position: relative;
    margin: 0 0 22px;
    padding-right: 48px;
}

#spx-cq .spx-cq__sobre {
    margin: 0 0 4px;
    color: var(--spx-cq-laranja);
    font-size: 17px;
    font-weight: 700;
}

#spx-cq .spx-cq__subtitulo {
    margin: 0;
    color: #dcdce1;
    font-size: clamp(15px, 1.4vw, 21px);
}

#spx-cq .spx-cq__fechar {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--spx-cq-borda);
    border-radius: 8px;
    background: rgba(14, 14, 18, 0.6) var(--spx-ico-fechar) no-repeat center / 20px;
    cursor: pointer;
}

#spx-cq .spx-cq__fechar:hover,
#spx-cq .spx-cq__fechar:focus-visible {
    border-color: var(--spx-cq-laranja);
    outline: none;
}

/* ---------- cartão: vidro escuro ---------- */
#spx-cq .spx-cq__cartao {
    overflow: hidden;
    background: var(--spx-cq-vidro);
    border: 1px solid var(--spx-cq-borda);
    border-radius: 10px;
    -webkit-backdrop-filter: blur(12px) saturate(115%);
    backdrop-filter: blur(12px) saturate(115%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

#spx-cq .spx-cq__capa {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-height: 168px;
    padding: 22px 22px;
    background-color: #111115;
    background-image: linear-gradient(rgba(8, 8, 11, 0.1), rgba(8, 8, 11, 0.45)), var(--spx-cq-capa, linear-gradient(135deg, #1c1c22, #0d0d10));
    background-position: center 35%;
    background-size: cover;
}

#spx-cq .spx-cq__data {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    padding: 12px 14px 10px;
    border: 1px solid rgba(255, 110, 60, 0.75);
    border-radius: 4px;
    background: rgba(12, 12, 15, 0.86);
    line-height: 1.05;
}

#spx-cq .spx-cq__data-mes {
    color: var(--spx-cq-laranja);
    font-size: 20px;
    font-weight: 700;
}

#spx-cq .spx-cq__data-dia {
    font-size: 40px;
    font-weight: 800;
}

#spx-cq .spx-cq__data-ano {
    margin-top: 2px;
    font-size: 16px;
}

#spx-cq .spx-cq__selo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: rgba(10, 10, 13, 0.72);
    color: #c9c9cf;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

#spx-cq .spx-cq__selo::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

#spx-cq .spx-cq__selo--aberto {
    border-color: rgba(25, 195, 125, 0.75);
    background: rgba(6, 64, 40, 0.88);
    color: var(--spx-cq-verde);
}

#spx-cq .spx-cq__selo--esgotado {
    color: #ff6b5e;
}

#spx-cq .spx-cq__corpo {
    padding: 22px 30px 26px;
}

#spx-cq .spx-cq__nome {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(20px, 1.6vw, 26px);
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

#spx-cq .spx-cq__local {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: #ececf0;
    font-size: clamp(15px, 1.15vw, 18px);
}

/* ---------- linhas (Modalidade / Divisão e categoria / Vagas) ---------- */
#spx-cq .spx-cq__linhas {
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--spx-cq-linha);
}

#spx-cq .spx-cq__linhas > li {
    margin: 0;
    border-bottom: 1px solid var(--spx-cq-linha);
}

#spx-cq .spx-cq__linhas > li:last-child {
    border-bottom: 0;
}

#spx-cq .spx-cq__linha {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 16px;
    align-items: center;
    width: 100%;
    padding: 14px 4px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

#spx-cq .spx-cq__linha--estatica {
    grid-template-columns: 50px minmax(0, 1fr);
    cursor: default;
}

#spx-cq .spx-cq__linha:not(.spx-cq__linha--estatica):hover .spx-cq__seta,
#spx-cq .spx-cq__linha:focus-visible .spx-cq__seta {
    transform: translateX(3px) rotate(45deg);
}

#spx-cq .spx-cq__linha:focus-visible {
    outline: 2px solid var(--spx-cq-laranja);
    outline-offset: 2px;
}

#spx-cq .spx-cq__linha-texto {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

#spx-cq .spx-cq__linha-rotulo {
    color: var(--spx-cq-sub);
    font-size: 14px;
}

#spx-cq .spx-cq__linha-valor {
    color: #ffffff;
    font-size: clamp(15px, 1.15vw, 18px);
    font-weight: 700;
    overflow-wrap: anywhere;
}

#spx-cq .spx-cq__vagas {
    color: var(--spx-cq-laranja);
    font-size: 18px;
    font-weight: 800;
}

#spx-cq .spx-cq__seta {
    width: 11px;
    height: 11px;
    border-top: 2.5px solid var(--spx-cq-laranja);
    border-right: 2.5px solid var(--spx-cq-laranja);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

/* ---------- ícones ---------- */
#spx-cq .spx-cq__ico {
    display: inline-block;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    background: var(--spx-ico, none) no-repeat center / contain;
}

#spx-cq .spx-cq__ico--local { --spx-ico: var(--spx-ico-pino); width: 20px; height: 20px; }
#spx-cq .spx-cq__ico--modalidade { --spx-ico: var(--spx-ico-haltere); width: 34px; height: 34px; }
#spx-cq .spx-cq__ico--pessoas { --spx-ico: var(--spx-ico-pessoas); width: 34px; height: 34px; }
#spx-cq .spx-cq__ico--ticket { --spx-ico: var(--spx-ico-ingresso); width: 26px; height: 26px; }

/* ---------- INSCREVER-SE ---------- */
#spx-cq .spx-cq__inscrever {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 60px;
    padding: 12px 20px;
    border: 0;
    border-radius: 6px;
    background: var(--spx-cq-laranja);
    color: #ffffff;
    font: inherit;
    font-size: clamp(16px, 1.3vw, 20px);
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
}

#spx-cq .spx-cq__inscrever:hover {
    background: #e2410d;
}

#spx-cq .spx-cq__inscrever--fechado,
#spx-cq .spx-cq__inscrever--fechado:hover {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #b9b9c0;
    cursor: not-allowed;
}

/* ---------- MENU: COMPETIÇÕES destacado enquanto o quadrante está aberto ---------- */
body.spx-cq-aberto .wp-block-navigation__responsive-container.is-menu-open .spx-nav--competicoes > a {
    border-radius: 8px;
    background: rgba(255, 77, 20, 0.14);
}

body.spx-cq-aberto .wp-block-navigation__responsive-container.is-menu-open .spx-nav--competicoes .wp-block-navigation-item__label {
    color: #ff4d14 !important;
}

/* ---------- desktop (≥ 900 px): ao lado do MENU aberto, alinhado à esquerda como na referência ---------- */
@media (min-width: 900px) {
    body:has(.wp-block-navigation__responsive-container.is-menu-open) #spx-cq {
        left: min(403px, 100vw);
    }

    body:has(.wp-block-navigation__responsive-container.is-menu-open) #spx-cq .spx-cq__area {
        margin-left: 12px;
    }
}

/* ---------- telas menores: por cima do MENU, ocupando a tela ---------- */
@media (max-width: 899px) {
    .spx-cq {
        top: 0;
        z-index: 100002;
    }

    #spx-cq .spx-cq__pelicula {
        background: rgba(6, 6, 9, 0.72);
    }

    #spx-cq .spx-cq__area {
        max-width: none;
        padding: 18px 14px 28px;
    }

    #spx-cq .spx-cq__corpo {
        padding: 18px 18px 22px;
    }

    #spx-cq .spx-cq__capa {
        min-height: 140px;
        padding: 16px;
    }

    #spx-cq .spx-cq__data {
        min-width: 84px;
        padding: 10px 10px 8px;
    }

    #spx-cq .spx-cq__data-dia {
        font-size: 32px;
    }

    #spx-cq .spx-cq__selo {
        padding: 6px 11px;
        font-size: 11px;
    }
}

/* ---------- Integração (2026-10-20): INSCREVER-SE e links levam às rotas oficiais ---------- */
#spx-cq a.spx-cq__inscrever {
    box-sizing: border-box;
    text-decoration: none;
}

#spx-cq a.spx-cq__inscrever:hover,
#spx-cq a.spx-cq__inscrever:focus {
    color: #ffffff;
}

#spx-cq .spx-cq__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 14px 0 0;
    font-size: 13px;
}

#spx-cq .spx-cq__links a {
    color: #ff8a5c;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#spx-cq .spx-cq__links a:hover,
#spx-cq .spx-cq__links a:focus {
    color: #ffffff;
}
