/* Modern Document Viewer Styles */

.mdv-container {
    position: relative;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mdv-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.mdv-filename {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.mdv-buttons {
    display: flex;
    gap: 8px;
}

.mdv-btn {
    padding: 6px 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.mdv-btn:hover {
    background: #005a87;
    color: #fff;
}

.mdv-viewer {
    position: relative;
    background: #fff;
    overflow: auto;
}

.mdv-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    z-index: 10;
}

.mdv-viewer.loaded .mdv-loading {
    display: none;
}

.mdv-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: mdv-spin 1s linear infinite;
}

@keyframes mdv-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mdv-error,
.mdv-unsupported {
    padding: 40px;
    text-align: center;
    color: #666;
}

.mdv-unsupported p {
    margin-bottom: 16px;
}

/* PDF Viewer Specific */
.mdv-pdf-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mdv-pdf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.mdv-pdf-controls button {
    padding: 6px 12px;
    background: #0073aa;
    color: #fff;
    border: 1px solid #0073aa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.mdv-pdf-controls button:hover {
    background: #005a87;
    color: #fff;
    border-color: #005a87;
}

.mdv-pdf-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mdv-pdf-page-info {
    font-size: 13px;
    color: #666;
}

.mdv-pdf-zoom-level {
    min-width: 50px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

.mdv-pdf-canvas {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

/* Fullscreen Mode */
.mdv-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    margin: 0;
    border-radius: 0;
    z-index: 99999;
}

.mdv-container.fullscreen .mdv-viewer {
    height: calc(100vh - 60px) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .mdv-filename {
        max-width: 40%;
        font-size: 12px;
    }
    
    .mdv-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .mdv-pdf-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .mdv-pdf-controls button {
        padding: 4px 8px;
        font-size: 12px;
    }
}
