/* ============================================================
   WooCommerce VAT Validator — Styles
   ============================================================ */

/* ---- Input states ---------------------------------------- */

.wvv-vat-input,
input[data-wvv-field],
#billing_vat_number,
#wvv_vat_number,
.wvv-block-status + input,
input.wvv-input--valid,
input.wvv-input--invalid {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wvv-input--valid {
    border-color: #4caf50 !important;
    box-shadow: 0 0 0 1px #4caf50;
}

.wvv-input--invalid {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 1px #e53935;
}

.wvv-input--loading {
    border-color: #1976d2 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%231976d2' stroke-width='2' stroke-dasharray='32' stroke-dashoffset='32'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 36px;
}

/* ---- Validation status message --------------------------- */

.wvv-validation-status,
.wvv-block-status {
    display: block;
    margin-top: 4px;
    font-size: 0.85em;
    min-height: 1.2em;
    transition: color 0.2s ease;
}

.wvv-status--valid  { color: #388e3c; }
.wvv-status--invalid { color: #c62828; }
.wvv-status--loading { color: #1565c0; }

/* ---- Company info hint ----------------------------------- */

.wvv-company-info,
.wvv-company-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.82em;
    color: #555;
    font-style: italic;
}

.wvv-company-info .wvv-company-name {
    font-weight: 600;
    font-style: normal;
    display: block;
}

/* ---- Account fieldset ------------------------------------ */

.wvv-account-fieldset {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.wvv-account-fieldset legend {
    font-weight: 600;
    padding: 0 8px;
    font-size: 0.9em;
    color: #333;
}

/* ---- Badges (order list & meta box) --------------------- */

.wvv-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.78em;
    font-weight: 600;
    vertical-align: middle;
    line-height: 1.6;
    margin-left: 4px;
}

.wvv-badge--valid {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.wvv-badge--invalid {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ---- Admin meta box -------------------------------------- */

.wvv-meta-box p {
    margin-bottom: 10px;
}

.wvv-meta-box code {
    font-size: 0.9em;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
}

.wvv-exempt-notice {
    background: #e8f5e9;
    border-left: 3px solid #43a047;
    padding: 6px 10px;
    border-radius: 0 3px 3px 0;
    font-size: 0.88em;
    color: #2e7d32;
}

/* ---- Order page (thank you / account orders) ------------ */

.woocommerce-table.woocommerce-table--customer-details .wvv-badge {
    font-size: 0.72em;
}

/* ---- Responsive ----------------------------------------- */

@media ( max-width: 600px ) {
    .wvv-account-fieldset {
        padding: 12px;
    }
}
