/**
 * PSC Notice Fetcher - PDF Viewer Styles
 */

/* Container */
.psc-pdf-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

/* Title */
.psc-pdf-title {
    padding: 12px 16px;
    background: #1e3a5f;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Toolbar */
.psc-pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #2c3e50;
    color: #fff;
    flex-wrap: wrap;
    gap: 10px;
}

.psc-pdf-nav,
.psc-pdf-zoom,
.psc-pdf-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.psc-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
}

.psc-pdf-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.psc-pdf-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.psc-pdf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

/* Page Info */
.psc-pdf-page-info {
    font-size: 14px;
    color: #fff;
    min-width: 80px;
    text-align: center;
}

/* Zoom Level */
.psc-pdf-zoom-level {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    min-width: 50px;
    text-align: center;
}

/* Viewer Wrapper */
.psc-pdf-viewer-wrapper {
    position: relative;
    background: #525659;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

/* Canvas */
.psc-pdf-canvas {
    display: block;
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: #fff;
}

/* Loading */
.psc-pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #fff;
    font-size: 14px;
    z-index: 10;
}

.psc-pdf-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: psc-spin 1s linear infinite;
}

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

/* Error Message */
.psc-pdf-error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    padding: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    max-width: 300px;
}

.psc-pdf-error-message svg {
    margin-bottom: 15px;
    opacity: 0.8;
}

.psc-pdf-error-message p {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
}

.psc-pdf-download-fallback {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
    width: auto;
    height: auto;
}

.psc-pdf-download-fallback:hover {
    background: #2980b9;
    color: #fff;
}

/* Fullscreen Mode */
.psc-pdf-container.psc-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    border-radius: 0;
    margin: 0;
}

.psc-pdf-container.psc-fullscreen .psc-pdf-viewer-wrapper {
    height: calc(100% - 56px);
}

/* Download Section */
.psc-pdf-download-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
}

.psc-download-note {
    margin: 0 0 15px;
    color: #6c757d;
    font-size: 14px;
}

.psc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1e3a5f, #2c5282);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.3);
}

.psc-download-btn:hover {
    background: linear-gradient(135deg, #2c5282, #1e3a5f);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.4);
}

.psc-download-btn svg {
    width: 20px;
    height: 20px;
}

/* Error State */
.psc-pdf-error {
    padding: 20px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c00;
    text-align: center;
    margin: 20px 0;
}

/* Notice Content Styles */
.psc-notice-intro {
    margin-bottom: 30px;
}

.psc-notice-lead {
    font-size: 18px;
    line-height: 1.7;
    color: #333;
}

.psc-notice-box {
    padding: 20px 25px;
    border-radius: 8px;
    margin: 15px 0;
}

.psc-notice-nepali {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 4px solid #1e3a5f;
}

.psc-notice-translated {
    background: linear-gradient(135deg, #e8f4f8, #d4edda);
    border-left: 4px solid #28a745;
}

.psc-nepali-title,
.psc-english-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
}

.psc-notice-original,
.psc-notice-english,
.psc-notice-pdf-section,
.psc-notice-key-info,
.psc-notice-notes,
.psc-notice-footer {
    margin-bottom: 35px;
}

.psc-notice-original h2,
.psc-notice-english h2,
.psc-notice-pdf-section h2,
.psc-notice-key-info h2,
.psc-notice-notes h2 {
    font-size: 22px;
    color: #1e3a5f;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* Info Table */
.psc-info-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.psc-info-table th,
.psc-info-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.psc-info-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    width: 200px;
}

.psc-info-table td {
    color: #333;
}

.psc-info-table tr:last-child th,
.psc-info-table tr:last-child td {
    border-bottom: none;
}

/* Notes List */
.psc-notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.psc-notes-list li {
    position: relative;
    padding: 12px 0 12px 30px;
    border-bottom: 1px solid #e9ecef;
    line-height: 1.6;
}

.psc-notes-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    width: 8px;
    height: 8px;
    background: #1e3a5f;
    border-radius: 50%;
}

.psc-notes-list li:last-child {
    border-bottom: none;
}

/* Footer Sections */
.psc-source-info,
.psc-disclaimer {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.psc-source-info h3,
.psc-disclaimer h3 {
    font-size: 16px;
    color: #495057;
    margin: 0 0 10px;
}

.psc-source-info p,
.psc-disclaimer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .psc-pdf-toolbar {
        justify-content: center;
    }
    
    .psc-pdf-nav,
    .psc-pdf-zoom,
    .psc-pdf-actions {
        flex: 1 1 100%;
        justify-content: center;
    }
    
    .psc-pdf-viewer-wrapper {
        padding: 10px;
    }
    
    .psc-info-table th {
        width: 120px;
    }
    
    .psc-info-table th,
    .psc-info-table td {
        padding: 10px 12px;
        font-size: 14px;
    }
}
