/* =============================================
   MENU PAGE — PDF VIEWER STYLES
   ============================================= */

/* Language Selector */
.lang-selector {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    right: 24px;
    z-index: 100;
    display: flex;
    gap: 4px;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-btn {
    padding: 8px 18px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lang-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.lang-btn--active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* =============================================
   PDF VIEWER
   ============================================= */

.pdf-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Canvas Container */
.pdf-canvas-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    perspective: 1800px;
}

#pdfCanvas {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    display: block !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.15s ease;
    position: relative;
    z-index: 1;
}

/* =============================================
   PAGE-FLIP ANIMATION
   ============================================= */

.pdf-canvas-container.flipping-left #pdfCanvas {
    animation: flipLeft 0.5s ease-in-out;
    transform-origin: left center;
}

.pdf-canvas-container.flipping-right #pdfCanvas {
    animation: flipRight 0.5s ease-in-out;
    transform-origin: right center;
}

@keyframes flipLeft {
    0% {
        transform: rotateY(0deg);
        opacity: 1;
    }

    45% {
        transform: rotateY(-90deg);
        opacity: 0;
    }

    55% {
        transform: rotateY(90deg);
        opacity: 0;
    }

    100% {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

@keyframes flipRight {
    0% {
        transform: rotateY(0deg);
        opacity: 1;
    }

    45% {
        transform: rotateY(90deg);
        opacity: 0;
    }

    55% {
        transform: rotateY(-90deg);
        opacity: 0;
    }

    100% {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

/* =============================================
   NAVIGATION ARROWS
   ============================================= */

.pdf-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    width: 48px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.pdf-viewer:hover .pdf-arrow {
    opacity: 1;
}

.pdf-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

.pdf-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.pdf-arrow--left {
    left: 20px;
}

.pdf-arrow--right {
    right: 20px;
}

.pdf-arrow:disabled {
    opacity: 0 !important;
    pointer-events: none;
}

/* =============================================
   PAGE INDICATOR
   ============================================= */

.pdf-page-indicator {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.pdf-viewer:hover .pdf-page-indicator {
    opacity: 1;
}

/* =============================================
   LOADING & ERROR STATES
   ============================================= */

.pdf-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.pdf-loading__spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pdf-loading.hidden {
    display: none;
}

.pdf-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.pdf-error p {
    font-family: var(--font-heading);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.pdf-error span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
}

/* =============================================
   HEADER OVERRIDE FOR MENU PAGE
   ============================================= */

.header--solid {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .lang-selector {
        top: calc(var(--header-height) + 10px);
        right: 16px;
    }

    .lang-btn {
        padding: 6px 14px;
        font-size: 12px;
    }

    .pdf-arrow {
        width: 36px;
        height: 60px;
    }

    .pdf-arrow--left {
        left: 8px;
    }

    .pdf-arrow--right {
        right: 8px;
    }

    .pdf-arrow svg {
        width: 18px;
        height: 18px;
    }

    #pdfCanvas {
        max-width: 95vw;
        max-height: 80vh;
    }
}

@media (max-width: 480px) {
    .pdf-arrow {
        width: 30px;
        height: 50px;
    }

    .pdf-arrow--left {
        left: 4px;
    }

    .pdf-arrow--right {
        right: 4px;
    }
}