/* PDF Viewer Section Styles */

.pdf-viewer-section {
    padding: 5rem 1rem;
    --doc-card-bg: #fff;
    --doc-border: rgba(0,0,0,0.1);
    --text-title: #222;
    --text-body: #555;
    --text-meta: #888;
}

.pdf-viewer-section.theme-dark {
    background-color: var(--chickin-anthracite);
    color: white;
    --doc-card-bg: #2d2d33;
    --doc-border: rgba(255,255,255,0.15);
    --text-title: #fff;
    --text-body: #ccc;
    --text-meta: #999;
}

/* Header */
.pdf-viewer-section .section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.pdf-viewer-section .section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-title);
}

.pdf-viewer-section .section-description {
    font-size: 1.125rem;
    color: var(--text-body);
}

/* Document Item Base */
.document-item {
    background-color: var(--doc-card-bg);
    border: 1px solid var(--doc-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.document-content {
    padding: 1.5rem;
}

.document-info {
    margin-bottom: 1.5rem;
}

.document-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-title);
}

.document-description {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-body);
    margin-bottom: 0.75rem;
}

.document-size {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-meta);
}

.document-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Dark button contrast fix */
.theme-dark .btn-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}
.theme-dark .btn-outline:hover {
    background-color: white;
    color: var(--chickin-anthracite);
    border-color: white;
} 

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm svg {
    flex-shrink: 0;
}

/* Thumbnail */
.document-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: #f5f5f5;
    overflow: hidden;
}

.document-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: var(--chickin-orange);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}


/* ===========================
   STYLE: CARDS (Grid)
   =========================== */
.style-cards .documents-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.style-cards .document-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}


/* ===========================
   STYLE: LIST (Vertical)
   =========================== */
.style-list .documents-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.style-list .document-item {
    display: flex;
    align-items: center;
}

.style-list .document-thumbnail {
    width: 120px;
    height: 150px;
    flex-shrink: 0;
}

.style-list .document-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.style-list .document-info {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .style-list .document-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .style-list .document-thumbnail {
        width: 100%;
    }
    .style-list .document-content {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ===========================
   STYLE: EMBEDDED (Full Viewer)
   =========================== */
.style-embedded .documents-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.pdf-embed-container {
    width: 100%;
    height: 600px;
    border: 1px solid var(--doc-border);
    border-radius: 8px;
    overflow: hidden;
    background-color: #525659;
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.style-embedded .document-content {
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .pdf-embed-container {
        height: 400px;
    }
}

/* ===========================
   STYLE: SPLIT (Content Left - PDF Right)
   =========================== */
.style-split-preview .documents-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.style-split-preview .document-item {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* More space for PDF */
    gap: 3rem;
    align-items: center;
    padding: 3rem;
    background-color: transparent; /* Cleaner look often better without card bg here or keep it */
    border: none; /* Consider removing border for a section-like feel */
}

/* On Dark theme, keep background separation? Or make it look integrated?
   Let's keep the card bg but make it robust. */
.style-split-preview .document-item {
    background-color: var(--doc-card-bg);
    border: 1px solid var(--doc-border);
}

.style-split-preview .pdf-embed-container {
    order: 2; /* Move to right */
    height: 700px; /* Taller for vertical paper */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* More elevation for the 'paper' feel */
}

.style-split-preview .document-content {
    order: 1; /* Move to left */
    padding: 0; /* Removing internal padding since parent has padding */
    text-align: left;
}

.style-split-preview .document-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.style-split-preview .document-description {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .style-split-preview .document-item {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 2rem;
    }
    .style-split-preview .pdf-embed-container {
        order: 1; /* PDF top on mobile usually better UX for "preview" sections */
        height: 500px;
    }
    .style-split-preview .document-content {
        order: 2;
    }
}
