/**
 * DIMI VAT Checkout Fields - Frontend Styles
 */

.dimivn_xuat_hoa_don_do {
    margin: 20px 0;
    padding: 0;
    background: transparent;
}

.dimivn_xuat_vat_input_label {
    display: block;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: normal;
    color: inherit;
}

.dimivn_xuat_vat_input {
    margin-right: 8px;
}

.dimivn_xuat_vat_wrap {
    display: none;
    margin-top: 15px;
    animation: fadeIn 0.3s ease-in-out;
}

.vat_active .dimivn_xuat_vat_wrap {
    display: block;
}

.dimivn_xuat_vat_wrap fieldset {
    margin: 10px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.dimivn_xuat_vat_wrap fieldset legend {
    background: transparent;
    padding: 0 8px;
    margin: 0 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    display: inline;
    width: inherit;
    border: 0;
    text-transform: none;
    color: #495057;
}

.dimivn_xuat_vat_wrap fieldset p {
    margin-bottom: 15px;
}

.dimivn_xuat_vat_wrap fieldset p:last-child {
    margin-bottom: 0;
}



/* Animation for smooth reveal */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Thank You Page Styles */
.dimi-vat-info-thankyou {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dimi-vat-info-thankyou h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dimi-vat-details {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.dimi-vat-details .vat-row {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f3f4;
}

.dimi-vat-details .vat-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.dimi-vat-details .vat-label {
    font-weight: 600;
    color: #495057;
    min-width: 140px;
    margin-right: 12px;
    font-size: 14px;
}

.dimi-vat-details .vat-value {
    color: #6c757d;
    flex: 1;
    font-size: 14px;
}


/* My Account Page Styles */
.dimi-vat-info-view-order {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.dimi-vat-info-view-order h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.dimi-vat-status {
    display: inline-flex;
    align-items: center;
    /* color: var(--dimi-brand-color, #007cba); */
    border-radius: 20px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.dimi-vat-status::before {
    content: "📄";
    margin-right: 6px;
}

.dimi-vat-details-view {
    display: grid;
    gap: 12px;
}

.dimi-vat-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.dimi-vat-row:last-child {
    border-bottom: none;
}

.dimi-vat-label {
    font-weight: 600;
    color: #495057;
    min-width: 140px;
    margin-right: 15px;
    font-size: 14px;
}

.dimi-vat-value {
    color: #6c757d;
    flex: 1;
    font-size: 14px;
}

.dimi-vat-note {
    border-left: 5px solid var(--dimi-brand-color, #007cba);
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    font-size: 13px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dimi-vat-details .vat-row,
    .dimi-vat-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .dimi-vat-details .vat-label,
    .dimi-vat-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .dimivn_xuat_vat_wrap fieldset {
        padding: 12px;
    }
    
    .dimivn_xuat_vat_wrap fieldset legend {
        font-size: 13px;
        margin-left: 5px;
    }
}
/* VAT show on View Order */
                .dimi-vat-info-view-order {
                    background: #f8f9fa;
                    border: 1px solid #e9ecef;
                    border-radius: 6px;
                    padding: 20px;
                    margin: 20px 0;
                }
                .dimi-vat-info-view-order h3 {
                    margin-top: 0;
                    margin-bottom: 15px;
                    color: #495057;
                    font-size: 16px;
                    border-bottom: 1px solid #dee2e6;
                    padding-bottom: 10px;
                }
                .dimi-vat-details-view {
                    display: grid;
                    gap: 12px;
                }
                .dimi-vat-row {
                    display: flex;
                    align-items: flex-start;
                    padding: 8px 0;
                    border-bottom: 1px solid #f1f3f4;
                }
                .dimi-vat-row:last-child {
                    border-bottom: none;
                }
                .dimi-vat-label {
                    font-weight: 600;
                    color: #495057;
                    min-width: 140px;
                    margin-right: 15px;
                    font-size: 14px;
                }

                /* Tax code auto-lookup */
                .dimi-vat-mst-group {
                    display: flex;
                    gap: 8px;
                    align-items: stretch;
                }
                .dimi-vat-mst-group .input-text {
                    flex: 1 1 auto;
                    margin: 0;
                }
                .dimi-vat-lookup-btn {
                    flex: 0 0 auto;
                    padding: 0 16px;
                    font-size: 13px;
                    line-height: 1.4;
                    white-space: nowrap;
                    color: #fff;
                    background: var(--dimi-brand-color, #007cba);
                    border: none;
                    border-radius: 4px;
                    cursor: pointer;
                }
                .dimi-vat-lookup-btn:hover {
                    opacity: 0.9;
                }
                .dimi-vat-lookup-btn:disabled {
                    opacity: 0.6;
                    cursor: default;
                }
                /* No reserved gap when idle; smoothly reveal when there is something to show */
                .dimi-vat-lookup-status {
                    display: flex;
                    align-items: center;
                    gap: 6px;
                    max-height: 0;
                    margin-top: 0;
                    opacity: 0;
                    overflow: hidden;
                    font-size: 13px;
                    line-height: 18px;
                    transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
                }
                .dimi-vat-lookup-status.is-shown {
                    max-height: 44px;
                    margin-top: 6px;
                    opacity: 1;
                }
                .dimi-vat-lookup-status.is-loading {
                    color: #6c757d;
                }
                .dimi-vat-lookup-status.is-error {
                    color: #dc3545;
                }
                .dimi-vat-lookup-status.is-success {
                    color: #28a745;
                }
                .dimi-vat-lookup-status .dimi-vat-spinner {
                    display: none;
                    flex: 0 0 auto;
                    width: 14px;
                    height: 14px;
                    border: 2px solid rgba(0, 0, 0, 0.15);
                    border-top-color: var(--dimi-brand-color, #007cba);
                    border-radius: 50%;
                }
                .dimi-vat-lookup-status.is-loading .dimi-vat-spinner {
                    display: inline-block;
                    animation: dimi-vat-spin 0.7s linear infinite;
                }
                @keyframes dimi-vat-spin {
                    to { transform: rotate(360deg); }
                }
                @media (prefers-reduced-motion: reduce) {
                    .dimi-vat-lookup-status {
                        transition: opacity 0.2s ease;
                    }
                    .dimi-vat-lookup-status.is-loading .dimi-vat-spinner {
                        animation: none;
                    }
                }

