/* =========================================================
   BKS DOCUMENT VIEWER
   Premium Standalone Styles
   ========================================================= */


/* =========================================================
   PAGE BACKGROUND
   ========================================================= */

.document-viewer-page {

    min-height: 70vh;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(244, 206, 20, 0.08),
            transparent 30%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(13, 11, 97, 0.08),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f7f9ff 50%,
            #eef1ff 100%
        );

    position: relative;

    overflow: hidden;
}


/* =========================================================
   SUBTLE GRID
   ========================================================= */

.document-viewer-page::before {

    content: "";

    position: absolute;

    inset: 0;

    background-size: 45px 45px;

    pointer-events: none;

}


/* =========================================================
   HERO
   ========================================================= */

.document-viewer-hero {

    position: relative;

    padding: 70px 20px 55px;

    text-align: center;

    background:
        radial-gradient(
            circle at center,
            rgba(244, 206, 20, 0.12),
            transparent 38%
        );
}


.document-viewer-hero-inner {

    max-width: 900px;

    margin: auto;

    position: relative;

    z-index: 2;

}


.document-eyebrow {

    display: inline-flex;

    align-items: center;

    gap: 9px;

    padding: 9px 18px;

    border-radius: 50px;

    background: rgba(13, 11, 97, 0.07);

    border: 1px solid rgba(13, 11, 97, 0.12);

    color: #0D0B61;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1.5px;

}


.document-viewer-hero h1 {

    margin: 18px 0 8px;

    color: #0D0B61;

    font-size: clamp(30px, 5vw, 52px);

    font-weight: 800;

    line-height: 1.15;

}


.document-viewer-hero p {

    margin: 0;

    color: #555;

    font-size: 15px;

}


/* =========================================================
   VIEWER SECTION
   ========================================================= */

.document-viewer-section {

    position: relative;

    padding: 20px 20px 80px;

}


.document-viewer-container {

    width: min(1200px, 100%);

    margin: auto;

    position: relative;

    z-index: 2;

}


/* =========================================================
   TOOLBAR
   ========================================================= */

.document-toolbar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 13px;

    background: rgba(255, 255, 255, 0.85);

    border: 1px solid rgba(13, 11, 97, 0.12);

    border-radius: 18px 18px 0 0;

    box-shadow:
        0 10px 35px rgba(13, 11, 97, 0.10);

    backdrop-filter: blur(15px);

}


.toolbar-left,
.toolbar-right {

    display: flex;

    align-items: center;

    gap: 8px;

}


#zoomLevel {

    min-width: 58px;

    text-align: center;

    color: #0D0B61;

    font-size: 13px;

    font-weight: 700;

}


/* =========================================================
   BUTTONS
   ========================================================= */

.viewer-btn {

    min-height: 42px;

    padding: 0 14px;

    border: 1px solid rgba(13, 11, 97, 0.12);

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.9);

    color: #0D0B61;

    font-family: inherit;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;

}


.viewer-btn:hover {

    transform: translateY(-2px);

    background: #0D0B61;

    color: #ffffff;

    box-shadow:
        0 8px 20px rgba(13, 11, 97, 0.20);

}


.viewer-back {

    text-decoration: none;

}


/* =========================================================
   PDF VIEWER
   ========================================================= */

.pdf-viewer {

    min-height: 700px;

    padding: 35px 20px;

    background:
        linear-gradient(
            135deg,
            #e9ebf2,
            #dfe2eb
        );

    border-left: 1px solid rgba(13, 11, 97, 0.10);

    border-right: 1px solid rgba(13, 11, 97, 0.10);

    overflow: auto;

    position: relative;

}


.pdf-canvas-area {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 25px;

}


/* =========================================================
   PDF PAGE
   ========================================================= */

.pdf-page-wrapper {

    position: relative;

    background: #ffffff;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.18);

    max-width: 100%;

}


.pdf-page-wrapper canvas {

    display: block;

    max-width: 100%;

    height: auto;

}


/* =========================================================
   PAGE NUMBER
   ========================================================= */

.pdf-page-number {

    position: absolute;

    bottom: 10px;

    right: 12px;

    padding: 5px 10px;

    border-radius: 20px;

    background: rgba(13, 11, 97, 0.85);

    color: #ffffff;

    font-size: 11px;

    font-weight: 700;

}


/* =========================================================
   LOADING
   ========================================================= */

.pdf-loading {

    position: absolute;

    inset: 0;

    min-height: 500px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    color: #0D0B61;

}


.loading-spinner {

    width: 48px;

    height: 48px;

    border-radius: 50%;

    border: 4px solid rgba(13, 11, 97, 0.15);

    border-top-color: #F4CE14;

    animation: bksViewerSpin 0.9s linear infinite;

    margin-bottom: 15px;

}


@keyframes bksViewerSpin {

    to {

        transform: rotate(360deg);

    }

}


/* =========================================================
   INFORMATION BAR
   ========================================================= */

.document-info-bar {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    padding: 15px 20px;

    background: #0D0B61;

    color: #ffffff;

    border-radius: 0 0 18px 18px;

    box-shadow:
        0 15px 35px rgba(13, 11, 97, 0.16);

    font-size: 12px;

}


.document-info-bar > div {

    display: flex;

    align-items: center;

    gap: 9px;

}


.document-info-bar i {

    color: #F4CE14;

}


/* =========================================================
   ERROR
   ========================================================= */

.viewer-error {

    min-height: 400px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 30px;

    color: #0D0B61;

}


.viewer-error i {

    font-size: 45px;

    margin-bottom: 15px;

    color: #F4CE14;

}


.viewer-error h3 {

    margin: 0 0 8px;

}


.viewer-error p {

    margin: 0;

    color: #666;

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .document-viewer-hero {

        padding: 50px 18px 40px;

    }


    .document-viewer-section {

        padding: 10px 10px 60px;

    }


    .document-toolbar {

        flex-direction: column;

        align-items: stretch;

        border-radius: 14px 14px 0 0;

    }


    .toolbar-left,
    .toolbar-right {

        justify-content: center;

        flex-wrap: wrap;

    }


    .viewer-btn-wide {

        flex: 1;

    }


    .pdf-viewer {

        min-height: 500px;

        padding: 15px 8px;

    }


    .document-info-bar {

        flex-direction: column;

        text-align: center;

        border-radius: 0 0 14px 14px;

    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .document-viewer-hero h1 {

        font-size: 28px;

    }


    .document-eyebrow {

        font-size: 10px;

        padding: 8px 12px;

    }


    .viewer-btn {

        min-height: 40px;

        padding: 0 11px;

    }


    .viewer-btn-wide span {

        display: none;

    }

}