/**
 * PDF Invoice Editor - Minimal styles for WP integration
 * Most styling is handled by Tailwind CSS
 */

/* Section collapse */
[data-nxtpdf-section][data-collapsed] [data-nxtpdf-section-content] {
    display: none;
}

[data-nxtpdf-section][data-collapsed] [data-nxtpdf-arrow] {
    transform: rotate(-90deg);
}

/* Preview elements – data-active driven toggle avoids @layer specificity issues */
[data-nxtpdf-loading],
[data-nxtpdf-placeholder],
[data-nxtpdf-preview-shell] {
    display: none;
}

[data-nxtpdf-loading][data-active],
[data-nxtpdf-placeholder][data-active] {
    display: flex;
}

[data-nxtpdf-preview-shell][data-active] {
    display: block;
    margin: 0 auto;
}

[data-nxtpdf-preview-frame] {
    display: block;
    border: 0;
    background: #fff;
}

/* WooCommerce order action buttons */
.wc-action-button-nxtpdf_invoice_print::after {
    font-family: dashicons !important;
    content: "\f193" !important;
}

.wc-action-button-nxtpdf_packing_slip_print::after {
    font-family: dashicons !important;
    content: "\f190" !important;
}

/* Toast notifications */
[data-nxtpdf-toast] {
    position: fixed;
    top: 50px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 100000;
    animation: pieSlideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-nxtpdf-toast="success"] {
    background: #10b981;
    color: #fff;
}

[data-nxtpdf-toast="error"] {
    background: #ef4444;
    color: #fff;
}

@keyframes pieSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
