/* Codeart OSS VAT Public Styles */

.codeart-business-field {
    margin-top: 10px;
}

/* VAT Number field with validate button */
.codeart-vat-number-field {
    position: relative;
}

.codeart-vat-number-field input {
    padding-right: 50px;
}

.codeart-validate-vat-btn {
    position: absolute;
    right: 0px;
    top: 39px;
    height: 45px;
    width: 45px;
    padding: 0 !important;
    min-width: 38px !important;
    background: #e15bcc !important;
    border-color: #e15bcc !important;
    color: white !important;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.codeart-validate-vat-btn.validated {
    background: #28a745 !important;
    border-color: #28a745 !important;
}

.codeart-validate-vat-btn:hover {
    background: #b43ba2 !important;
    border-color: #b43ba2 !important;
}

.codeart-validate-vat-btn.validated:hover {
    background: #218838 !important;
    border-color: #218838 !important;
}

.codeart-validate-vat-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.codeart-validate-vat-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

.codeart-validate-vat-btn .dashicons-spin {
    animation: dashicons-spin 1s infinite linear;
}

@keyframes dashicons-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.codeart-vat-validation-message {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 3px;
}

.codeart-vat-validation-message.validating {
    background-color: #f0f0f0;
    color: #666;
}

.codeart-vat-validation-message.valid {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.codeart-vat-validation-message.invalid {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#billing_vat_number.valid {
    border-color: #28a745 !important;
}

#billing_vat_number.invalid {
    border-color: #dc3545 !important;
}

/* Company Info Display */
.codeart-company-info {
    margin-top: 12px;
    padding: 12px 15px;
    background-color: #fff5fd;
    border: 1px solid #f5d7f1;
    border-radius: 4px;
}

.codeart-company-info p {
    margin: 8px 0;
    font-size: 14px;
}

.codeart-company-info strong {
    color: #333;
    display: inline-block;
    min-width: 80px;
}

/* Company Name readonly state */
#billing_company_name[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.codeart-business-checkbox label {
    font-weight: bold;
}

/* Admin Order Page Styles */
.codeart-business-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.codeart-business-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.codeart-vat-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
}

.codeart-vat-status.valid {
    background-color: #d4edda;
    color: #155724;
}

.codeart-vat-status.invalid {
    background-color: #f8d7da;
    color: #721c24;
}

/* Customer Order Details */
.woocommerce-customer-business-details {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.woocommerce-customer-business-details h2 {
    margin-top: 0;
}

.woocommerce-customer-business-details address {
    font-style: normal;
}

.woocommerce-customer-business-details address p {
    margin: 10px 0;
}
