/*
Theme Name: Hello Elementor Child
Description: Tema filho customizado com as funções de negócio da ABCSP.
Author: Jonathan
Template: hello-elementor
Version: 1.0.0
*/

/* --- PADRONIZAÇÃO TIPOGRÁFICA SYSTEM-UI - ABCSP --- */
html, body, p, span, a, li, input, textarea, select, h1, h2, h3, h4, h5, h6, 
.elementor-heading-title, .elementor-text-editor, .woocommerce-loop-product__title, .product_title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;
}

/* ============================================================
   ABCSP – BOTÃO FLUTUANTE DO FILTRO LATERAL
   ============================================================ */

.abcsp-filter-trigger {
    position: fixed;
    right: 16px;
    bottom: 24px;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.abcsp-filter-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.abcsp-filter-trigger:active {
    transform: translateY(0);
}

.abcsp-filter-trigger__label {
    line-height: 1;
}

/* Opacidade controlada no mobile (sutil, não atrapalha a leitura) */
@media (max-width: 768px) {
    .abcsp-filter-trigger {
        opacity: 0.85;
        padding: 10px 14px;
        font-size: 13px;
    }

    .abcsp-filter-trigger:hover {
        opacity: 1;
    }
}

/* ============================================================
   ABCSP – GAVETA DESLIZANTE (FILTRO LATERAL OCULTO)
   ============================================================ */

.abcsp-filter-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    visibility: hidden;
    pointer-events: none;
}

.abcsp-filter-drawer.is-active {
    visibility: visible;
    pointer-events: auto;
}

.abcsp-filter-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.abcsp-filter-drawer.is-active .abcsp-filter-drawer__overlay {
    opacity: 1;
}

.abcsp-filter-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 85vw);
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.abcsp-filter-drawer.is-active .abcsp-filter-drawer__panel {
    transform: translateX(0);
}

.abcsp-filter-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.abcsp-filter-drawer__title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    letter-spacing: 0.02em;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.abcsp-filter-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    color: #111827;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.abcsp-filter-drawer__close:hover {
    background: #fee2e2;
    color: #e11d48;
}

.abcsp-filter-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* ============================================================
   ABCSP – PAINEL DE FILTROS — LINHA DO TEMPO MINIMALISTA
   ============================================================ */

/* Campo: bolinha + label + select */
.abcsp-filter-field {
    margin-bottom: 32px;
    position: relative;
    padding-left: 4px;
}

/* Linha do tempo: bolinha conectada por linha vertical */
.abcsp-filter-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}

/* Linha vertical fina conectando os passos — com respiro lateral */
.abcsp-filter-field:not(:last-of-type) .abcsp-filter-step::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 22px;
    bottom: -32px;
    width: 1px;
    background: #e5e7eb;
}

/* Bolinha indicadora sutil */
.abcsp-filter-step__bullet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1.5px solid #d1d5db;
    border-radius: 50%;
    background: #ffffff;
    font-size: 9px;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Bolinha concluída → check ✓ */
.abcsp-filter-step__bullet.is-done {
    background: #e11d48;
    border-color: #e11d48;
    color: #ffffff;
}

/* Título do passo */
.abcsp-filter-field__label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.3s ease;
    cursor: default;
}

/* Título ativo (campo destravado) → cinza escuro */
.abcsp-filter-field:has(.abcsp-filter-field__select:not(:disabled)) .abcsp-filter-field__label {
    color: #4b5563;
}

/* Select extremamente limpo */
.abcsp-filter-field__select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    font-size: 14px;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 36px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

/* Selects de MODELO e APLICAÇÃO — legibilidade nítida no mobile */
#abcsp-filter-modelo,
#abcsp-filter-aplicacao {
    font-size: 13px;
    letter-spacing: 0.01em;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    #abcsp-filter-modelo,
    #abcsp-filter-aplicacao {
        font-size: 12px;
    }
}

.abcsp-filter-field__select:focus {
    border-color: #9ca3af;
}

/* Select desabilitado — cinza fosco sutil, sem borda colorida */
.abcsp-filter-field__select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

/* --- Botão APLICAR FILTRO — Retangular e imponente --- */
.abcsp-filter-submit {
    width: 100%;
    height: 50px;
    margin-top: 8px;
    background: #e5e7eb;
    color: #9ca3af;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: not-allowed;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Botão habilitado — acende no vermelho ABCSP sólido */
.abcsp-filter-submit:not(:disabled) {
    background: #e11d48;
    color: #ffffff;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.abcsp-filter-submit:not(:disabled):hover {
    background: #be123c;
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.35);
}

/* --- Estados de carregamento/erro --- */
.abcsp-filter-loading,
.abcsp-filter-error {
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

.abcsp-filter-error {
    color: #e11d48;
}

/* Acessibilidade: reduz movimento */
@media (prefers-reduced-motion: reduce) {
    .abcsp-filter-drawer__panel,
    .abcsp-filter-drawer__overlay {
        transition: none;
    }
}
