/* Front‑end styles for NBPD Product Document Preview */

/* Modal overlay */
/* Overlay centers the modal using flex layout */
.nbpdp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    /* The overlay is hidden by inline style in markup. Define layout properties here. */
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal container */
/* Modal sizes: centered in view, responsive */
.nbpdp-modal {
    background: #fff;
    width: 80%;
    max-width: 900px;
    height: 80%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .nbpdp-modal {
        width: 95%;
        height: 90%;
    }
}

/* Modal header */
/* Modal header with actions */
.nbpdp-modal-header {
    background: #f7f7f7;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e1e1e1;
    gap: 10px;
}

.nbpdp-modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nbpdp-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* Close button styling */
.nbpdp-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Download button inherits theme button styles via WooCommerce button class if present */
.nbpdp-modal-download.button {
    text-decoration: none;
}

/* Modal content */
.nbpdp-modal-content {
    flex: 1;
    overflow: hidden;
}

.nbpdp-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Prevent body scroll when modal open */
body.nbpdp-no-scroll {
    overflow: hidden;
}

/* Override preview button styles */
.nbpdp-preview-button.button {
    height: auto;
    padding: 7px 10px;
    margin-top: 10px;
    background: #E91E63 !important;
    border-color: #E91E63 !important;
    font-size: 9px !important;
    font-weight: 700 !important;
}

/* Override download button styles */
.nbpdp-modal-download.button {
    font-size: 12px !important;
    padding: 6px 19px;
    height: auto !important;
}

/* Override close button styles */
button.nbpdp-modal-close {
    height: auto;
    padding: 5px;
    border-radius: 100px !important;
    line-height: 1 !important;
    padding-top: 0;
    background: #F44336 !important;
}