/**
 * ValeAinda Experiência de Anúncios — CSS
 * Prefix: valeainda-exp-*
 */

/* === Form: product fields show/hide for Serviços === */
.valeainda-exp-product-field {
    transition: opacity 0.2s ease, max-height 0.2s ease, margin 0.2s ease;
}
.valeainda-exp-product-field.is-hidden {
    display: none !important;
}

/* Wrappers clássico e bloco, incluindo os cabeçalhos de seção de produto. */
.adverts-control-group.is-hidden,
.wpa-field-wrap.is-hidden,
.wpa-form-header.is-hidden {
    display: none !important;
}

/* === Form: cidade custom text field === */
.adverts-control-group [data-valeainda-exp-cidade-custom],
.wpa-field-wrap [data-valeainda-exp-cidade-custom] {
    transition: opacity 0.2s ease, height 0.2s ease, padding 0.2s ease;
}
.adverts-control-group [data-valeainda-exp-cidade-custom].is-visible,
.wpa-field-wrap [data-valeainda-exp-cidade-custom].is-visible {
    display: block !important;
}

/* === Form: cidade select optgroup styling === */
select[data-valeainda-exp-cidade-select] optgroup {
    font-weight: 600;
    color: #444;
}
select[data-valeainda-exp-cidade-select] option {
    padding-left: 12px;
}

/* === Single Advert: product info section === */
.valeainda-exp-product-info {
    margin-top: 32px;
    padding: 20px 24px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.valeainda-exp-section-title {
    margin: 0 0 16px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.valeainda-exp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px 24px;
}
.valeainda-exp-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.valeainda-exp-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}
.valeainda-exp-value {
    font-size: 1rem;
    color: #1f2937;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .valeainda-exp-product-info {
        padding: 16px;
        margin-top: 24px;
    }
    .valeainda-exp-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
/* === Form: quantity / stepper === */
.valeainda-exp-qty {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.valeainda-exp-qty-stepper {
    display: flex;
    align-items: stretch;
    width: fit-content;
    max-width: 100%;
}
.valeainda-exp-qty-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #6b7280;
    background: #f9fafb;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.valeainda-exp-qty-btn:first-child {
    border-radius: 8px 0 0 8px;
}
.valeainda-exp-qty-btn:last-child {
    border-radius: 0 8px 8px 0;
}
.valeainda-exp-qty-btn:hover {
    background: #e5e7eb;
}
.valeainda-exp-qty-btn:focus-visible,
.valeainda-exp-qty-input:focus-visible,
.valeainda-exp-qty-treat input:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 2px;
}
.valeainda-exp-qty-input {
    width: 5.5rem;
    min-height: 44px;
    border: 1px solid #6b7280;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    text-align: center;
    font-size: 1rem;
}
.valeainda-exp-qty-input:disabled {
    background: #e5e7eb;
    color: #4b5563;
}
.valeainda-exp-qty-treat {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
}
.valeainda-exp-qty-treat input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
    flex: 0 0 auto;
}
.valeainda-exp-qty-total {
    min-height: 1.5em;
    color: #1f2937;
    font-weight: 600;
}

/* === Focus visibility for classic and block forms === */
.adverts-form input:focus-visible,
.adverts-form select:focus-visible,
.adverts-form textarea:focus-visible,
.wpadverts-form input:focus-visible,
.wpadverts-form select:focus-visible,
.wpadverts-form textarea:focus-visible,
.wpadverts-form button:focus-visible,
.adverts-form button:focus-visible {
    outline: 3px solid #1d4ed8 !important;
    outline-offset: 2px !important;
}

@media (max-width: 430px) {
    .valeainda-exp-qty-stepper {
        width: 100%;
    }
    .valeainda-exp-qty-input {
        flex: 1 1 auto;
        width: auto;
    }
}
