/* ==========================================================================
   DOCUMENT & PDF VIEWER MODAL - NUR RELIEF
   ========================================================================== */

.doc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.doc-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.doc-modal-container {
    width: 100%;
    max-width: 1100px;
    height: 92vh;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* Modal Header */
.doc-modal-header {
    background: #0f172a;
    color: #ffffff;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.doc-modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.doc-modal-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.doc-modal-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    line-height: 1.3;
}

.doc-modal-badge {
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(14, 165, 165, 0.2);
    color: #00BCD4;
    border: 1px solid rgba(14, 165, 165, 0.3);
}

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

.doc-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.doc-modal-btn-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.doc-modal-btn-download:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    color: #ffffff;
}

.doc-modal-btn-close {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

.doc-modal-btn-close:hover {
    background: #ef4444;
    color: #ffffff;
    transform: rotate(90deg);
}

/* Modal Body */
.doc-modal-body {
    flex: 1;
    position: relative;
    background: #f1f5f9;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #ffffff;
}

.doc-modal-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #1e293b;
}

.doc-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

/* Loading Spinner */
.doc-modal-loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.doc-modal-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.doc-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spinSlow 0.9s linear infinite;
}

.doc-modal-loader span {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .doc-modal-overlay {
        padding: 8px;
    }
    .doc-modal-container {
        height: 96vh;
        border-radius: 14px;
    }
    .doc-modal-header {
        padding: 10px 14px;
    }
    .doc-modal-title {
        font-size: 14px;
    }
    .doc-modal-btn-download span {
        display: none;
    }
    .doc-modal-btn-download {
        padding: 8px 12px;
    }
}
