/**
 * Elementor PDF Smart Viewer Styles
 *
 * @package ElementorPDFSmartViewer
 * @version 1.0.0
 */

.epsv-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.epsv-viewer {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    position: relative;
    width: 100%;
    height: calc(100% - 60px);
    overflow: auto;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
}

.epsv-canvas {
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    max-width: 100%;
    height: auto;
}

.epsv-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #6c757d;
    z-index: 10;
}

.epsv-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: epsv-spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.epsv-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 20px;
    max-width: 80%;
    display: none !important;
}

/* Upgrade Prompt Styling */
.epsv-upgrade-prompt {
    display: block !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.epsv-upgrade-prompt h3 {
    margin: 0 0 15px 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #fff;
}

.epsv-upgrade-prompt p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.epsv-upgrade-prompt p strong {
    color: #fff;
    font-weight: 600;
}

.epsv-upgrade-prompt .button {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.epsv-upgrade-prompt .button:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.epsv-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #fff;
    border-top: 1px solid #e9ecef;
    min-height: 60px;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}
.epsv-controls-left, .epsv-controls-center, .epsv-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.epsv-controls-center {
    flex: 1 1 0;
    justify-content: center;
}
.epsv-controls-left {
    justify-content: flex-start;
}
.epsv-controls-right {
    justify-content: flex-end;
}

.epsv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 8px 12px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    user-select: none;
}

.epsv-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.epsv-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.epsv-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.epsv-icon {
    font-size: 16px;
    line-height: 1;
}

.epsv-zoom-level {
    font-weight: 600;
    color: #495057;
    min-width: 50px;
    text-align: center;
}

.epsv-page-info {
    font-weight: 600;
    color: #495057;
    margin: 0 15px;
    white-space: nowrap;
}

.epsv-page-current,
.epsv-page-total {
    color: #007cba;
}

/* Fullscreen styles */
.epsv-container.epsv-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    border-radius: 0;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .epsv-controls {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .epsv-controls-left,
    .epsv-controls-center,
    .epsv-controls-right {
        width: 100%;
        justify-content: center;
    }
    
    .epsv-controls-center {
        order: -1;
    }
    
    .epsv-btn {
        min-width: 44px;
        height: 44px;
        font-size: 16px;
    }
    
    .epsv-page-info {
        margin: 0 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .epsv-controls {
        padding: 10px;
    }
    
    .epsv-controls-left,
    .epsv-controls-right {
        gap: 5px;
    }
    
    .epsv-btn {
        min-width: 40px;
        height: 40px;
        padding: 6px 8px;
        font-size: 14px;
    }
    
    .epsv-zoom-level {
        min-width: 40px;
        font-size: 12px;
    }
}

/* Print styles */
@media print {
    .epsv-controls {
        display: none;
    }
    
    .epsv-viewer {
        height: 100%;
    }
    
    .epsv-canvas {
        box-shadow: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .epsv-container {
        border: 2px solid #000;
    }
    
    .epsv-btn {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .epsv-btn,
    .epsv-canvas {
        transition: none;
    }
    
    .epsv-spinner {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .epsv-container {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .epsv-viewer {
        background: #1a202c;
    }
    
    .epsv-controls {
        background: #2d3748;
        border-top-color: #4a5568;
        color: #e2e8f0;
    }
    
    .epsv-btn {
        background: #4299e1;
        color: #fff;
    }
    
    .epsv-btn:hover {
        background: #3182ce;
    }
    
    .epsv-btn:disabled {
        background: #718096;
    }
    
    .epsv-zoom-level,
    .epsv-page-info {
        color: #e2e8f0;
    }
    
    .epsv-page-current,
    .epsv-page-total {
        color: #4299e1;
    }
    
    .epsv-loading {
        color: #a0aec0;
    }
    
    .epsv-error {
        background: #742a2a;
        border-color: #c53030;
        color: #fed7d7;
    }
    
    .epsv-upgrade-prompt {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    
    .epsv-upgrade-prompt .button {
        background: #e2e8f0;
        color: #2d3748;
    }
    
    .epsv-upgrade-prompt .button:hover {
        background: #cbd5e0;
    }
} 