/**
 * PDF Viewer Styles
 */

/* PDF Viewer Container */
.iv-sps-pdf-viewer {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* PDF Header */
.iv-sps-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.iv-sps-viewer-title h3 {
    margin: 0;
    font-size: 16px;
    color: #1e1e1e;
}

.iv-sps-viewer-month {
    display: inline-block;
    padding: 2px 8px;
    background: #e5e5e5;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Canvas Container */
.iv-sps-pdf-canvas-container {
    background: #525659;
    padding: 20px;
    text-align: center;
    overflow: auto;
    max-height: 60vh;
    min-height: 400px;
}

.iv-sps-pdf-canvas-container canvas {
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    background: #fff;
}

/* Viewer Controls */
.iv-sps-viewer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
}

.iv-sps-pagination,
.iv-sps-zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iv-sps-page-info {
    min-width: 60px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* Action Buttons */
.iv-sps-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid #e5e5e5;
}

/* Generic Button Styles */
.iv-sps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.iv-sps-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

.iv-sps-btn-icon {
    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.iv-sps-btn-icon:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.iv-sps-btn-icon svg {
    display: block;
}

.iv-sps-btn-primary {
    background: #0073aa;
    color: #fff;
}

.iv-sps-btn-primary:hover {
    background: #005a87;
    color: #fff;
}

.iv-sps-btn-secondary {
    background: #f0f0f1;
    color: #1e1e1e;
    border: 1px solid #ddd;
}

.iv-sps-btn-secondary:hover {
    background: #e5e5e5;
}

.iv-sps-btn-lg {
    padding: 12px 30px;
    font-size: 15px;
}

.iv-sps-btn-success {
    background: #46b450;
    color: #fff;
}

.iv-sps-btn-success:hover {
    background: #3a9a42;
}

.iv-sps-btn-danger {
    background: #dc3545;
    color: #fff;
}

.iv-sps-btn-danger:hover {
    background: #c82333;
}

/* Disabled state */
.iv-sps-btn:disabled,
.iv-sps-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading state */
.iv-sps-btn.loading {
    position: relative;
    color: transparent;
}

.iv-sps-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: iv-btn-spin 0.6s linear infinite;
}

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

/* PDF Loading State */
.iv-sps-pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #fff;
}

.iv-sps-pdf-loading .iv-sps-spinner {
    border-color: rgba(255,255,255,0.3);
    border-top-color: #fff;
}

.iv-sps-pdf-loading p {
    margin-top: 15px;
}

/* PDF Error State */
.iv-sps-pdf-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #fff;
    text-align: center;
    padding: 40px;
}

.iv-sps-pdf-error svg {
    margin-bottom: 15px;
    opacity: 0.8;
}

.iv-sps-pdf-error h4 {
    margin: 0 0 10px 0;
}

.iv-sps-pdf-error p {
    margin: 0;
    opacity: 0.8;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .iv-sps-viewer-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .iv-sps-action-buttons {
        flex-direction: column;
    }
    
    .iv-sps-btn-lg {
        width: 100%;
    }
    
    .iv-sps-pdf-canvas-container {
        max-height: 50vh;
    }
}
