/**
 * PDF Download Manager - Frontend Styles
 * Sidebar filter + card grid layout matching the reference design.
 */

/* Container: sidebar + content */
.pdm-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}
.pdm-no-filter {
    display: block;
}

/* Sidebar */
.pdm-sidebar {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
}

/* Filter group */
.pdm-filter-group {
    margin-bottom: 0;
}
.pdm-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 0;
    background: none;
    border: none;
    border-bottom: 1px solid #e2e5e9;
    cursor: pointer;
    font-size: 15px;
    color: #4a5568;
    font-weight: 400;
}
.pdm-filter-header span {
    font-size: 15px;
}
.pdm-filter-header:hover {
    color: #1a1a2e;
}
.pdm-filter-body {
    padding: 0;
}

/* Sub-group */
.pdm-filter-subgroup {
    border-left: 3px solid #e2e5e9;
    margin: 0;
    padding: 0;
    background: #f8f9fb;
}
.pdm-subgroup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid #eef0f3;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}
.pdm-subgroup-header:hover {
    background: #eef0f4;
}
.pdm-subgroup-body {
    padding: 4px 0 8px 0;
}

/* Checkbox items */
.pdm-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    transition: background 0.15s;
}
.pdm-filter-item:hover {
    background: #eef0f4;
}
.pdm-filter-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #2563eb;
    flex-shrink: 0;
}

/* Chevron rotation */
.pdm-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.pdm-chevron-collapsed {
    transform: rotate(-180deg);
}

/* Content area */
.pdm-content {
    flex: 1;
    min-width: 0;
}

/* Results count */
.pdm-results-count {
    font-size: 15px;
    color: #4a5568;
    padding: 8px 0 16px 0;
    border-bottom: 1px solid #e2e5e9;
    margin-bottom: 20px;
}

/* Grid */
.pdm-grid {
    display: grid;
    grid-template-columns: repeat(var(--pdm-columns, 2), 1fr);
    gap: 24px;
    transition: opacity 0.2s ease;
}

/* Card */
.pdm-card {
    background: #fff;
    border: 1px solid #e2e5e9;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.pdm-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Icon area */
.pdm-card-icon {
    background: #eef0f4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    min-height: 200px;
}
.pdm-pdf-icon {
    width: 80px;
    height: 80px;
    opacity: 0.6;
}

/* Info area */
.pdm-card-info {
    padding: 18px 20px;
}
.pdm-card-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: #1a1a2e;
    word-break: break-word;
}

/* Meta row */
.pdm-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.pdm-card-size {
    font-size: 13px;
    color: #6b7280;
}

/* Download button */
.pdm-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.pdm-download-btn:hover {
    background: #1d4ed8;
    color: #fff;
}
.pdm-download-btn:visited {
    color: #fff;
}
.pdm-download-btn svg {
    width: 20px;
    height: 20px;
}

.pdm-no-pdfs {
    color: #6b7280;
    font-style: italic;
    padding: 20px 0;
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 992px) {
    .pdm-container {
        flex-direction: column;
    }
    .pdm-sidebar {
        width: 100%;
        min-width: 0;
    }
    .pdm-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .pdm-grid {
        grid-template-columns: 1fr;
    }
}
