/* OM Invoicing Fields Styles */

/* Hide invoice fields by default */
.timologio-hide {
    display: none !important;
}

/* Show when invoice selected */
.timologio-show .timologio-hide {
    display: block !important;
}

/* Invoice selector styling */
#billing_timologio_field {
    margin-bottom: 15px;
}

#billing_timologio_field label {
    font-weight: 600;
}

#billing_timologio {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
}

/* Invoice fields group */
.om-ai-invoice-fields {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #0073aa;
}

/* VAT field with AADE indicator */
#billing_vat_field {
    position: relative;
}

#billing_vat_field.om-ai-aade-loading::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 42px;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: om-ai-spin 0.8s linear infinite;
}

@keyframes om-ai-spin {
    to { transform: rotate(360deg); }
}

#billing_vat_field.om-ai-aade-success #billing_vat {
    border-color: #4caf50;
    background-color: #f1f8e9;
}

#billing_vat_field.om-ai-aade-error #billing_vat {
    border-color: #f44336;
    background-color: #ffebee;
}

/* Required field indicator for invoice fields */
.timologio-show #billing_vat_field label .required,
.timologio-show #billing_company_field label .required,
.timologio-show #billing_irs_field label .required {
    color: #e53935;
}

/* Optional indicator hide when required */
.timologio-show #billing_vat_field label .optional,
.timologio-show #billing_company_field label .optional,
.timologio-show #billing_irs_field label .optional {
    display: none;
}

/* Admin order display */
.om-ai-invoice-info {
    margin-top: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.om-ai-invoice-info h4 {
    margin: 0 0 10px;
    color: #0073aa;
    font-size: 14px;
}

.om-ai-invoice-info p {
    margin: 5px 0;
    font-size: 13px;
}

/* Transition for showing/hiding */
.timologio-hide {
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* Mobile */
@media (max-width: 768px) {
    #billing_timologio {
        font-size: 16px;
    }
}
