/* pdf_viewer.css — Premium styles for the in-app PDF viewer */
:root {
    --pdf-bg: #1e293b;
    --pdf-toolbar-bg: rgba(30, 41, 59, 0.85);
    --pdf-accent: #4361ee;
    --pdf-accent-light: #4cc9f0;
    --paper-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.pdf-viewer-container {
    background: var(--pdf-bg);
    padding: 2.5rem 1.5rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    margin-bottom: 2.5rem;
    position: relative;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pdf-viewer-container.is-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
    padding: 5rem 1rem 1rem;
    margin-bottom: 0;
    overflow: hidden;
}

.pdf-toolbar {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pdf-toolbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 20;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-toolbar:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    width: 92%;
}

.pdf-toolbar .btn-toolbar {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.9);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.pdf-toolbar .btn-toolbar:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: scale(1.1);
}

.pdf-toolbar .btn-toolbar:active {
    transform: scale(0.95);
}

.pdf-toolbar .toolbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    margin: 0 0.5rem;
}

.pdf-page-indicator {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.9);
    padding: 0 0.5rem;
}

.pdf-canvas-wrapper {
    margin-top: 1.5rem;
    overflow: auto;
    width: 100%;
    display: flex;
    justify-content: center;
    background: transparent;
    padding: 1rem 0;
    max-height: 85vh;
    transition: max-height 0.4s;
}

.is-fullscreen .pdf-canvas-wrapper {
    max-height: calc(100vh - 120px);
    height: 100%;
}

.pdf-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 25;
    transition: all 0.3s;
}

.is-fullscreen .pdf-close-btn {
    display: flex;
}

.pdf-close-btn:hover {
    background: #ff4b5c;
    border-color: #ff4b5c;
    transform: rotate(90deg);
}

#pdf-canvas {
    max-width: 100%;
    height: auto !important;
    background: white;
    border-radius: 4px;
    box-shadow: var(--paper-shadow);
    transition: transform 0.3s ease;
}

.pdf-loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--pdf-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    border-radius: 20px;
    z-index: 30;
}

.pdf-loader {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}
.pdf-loader::after {
    content: '';  
    box-sizing: border-box;
    position: absolute;
    left: 0;
    top: 0;
    background: var(--pdf-accent);
    width: 16px;
    height: 16px;
    transform: translate(-50%, 50%);
    border-radius: 50%;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pdf-error-message {
    color: #ff6b6b;
    text-align: center;
    padding: 2.5rem;
    background: rgba(255,107,107,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,107,107,0.2);
}

.zoom-badge {
    background: rgba(255,255,255,0.08);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
}

/* Custom Scrollbar for the viewer */
.pdf-canvas-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.pdf-canvas-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.pdf-canvas-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}
.pdf-canvas-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}
