/* HiResCovers Design Assets Download Manager
   css/downloads.css
*/

/* ============================================================
   LAYOUT
   ============================================================ */

#downloads-layout {
    display: flex;
    gap: 15px;
    padding: 10px;
    align-items: flex-start;
}

#dl-sidebar {
    width: 220px;
    flex-shrink: 0;
}

#dl-main {
    flex: 1;
    min-width: 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.dl-sidebar-block {
    background: #e8ecf0;
    border: 1px solid #c9d0d9;
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
}

.dl-sidebar-header {
    background: #5a6c85;
    color: #ffffff;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: bold;
    font-family: Verdana, Arial, sans-serif;
}

.dl-cat-list {
    list-style: none;
    margin: 0;
    padding: 5px 0;
}

.dl-cat-list li {
    position: relative;
}

.dl-cat-list > li > a {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    color: #2c3e50;
    text-decoration: none;
    flex: 1;
}

.dl-cat-list > li > a:hover {
    background: #d0d8e0;
    color: #0070c0;
}

.dl-cat-list > li.active > a {
    color: #0070c0;
    font-weight: bold;
}

.dl-cat-count {
    font-size: 10px;
    color: #888;
    background: #d0d8e0;
    border-radius: 8px;
    padding: 1px 5px;
    margin-right: 8px;
    font-family: Verdana, Arial, sans-serif;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.dl-subcat-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 15px;
    border-top: 1px solid #d0d8e0;
}

.dl-subcat-list li a {
    display: block;
    padding: 4px 10px;
    font-size: 11px;
    font-family: Verdana, Arial, sans-serif;
    color: #2c3e50;
    text-decoration: none;
}

.dl-subcat-list li a:hover {
    color: #0070c0;
}

.dl-subcat-list li.active a {
    color: #0070c0;
    font-weight: bold;
}

/* ============================================================
   SEARCH
   ============================================================ */

.dl-search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.dl-search-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #c9d0d9;
    border-radius: 4px;
    font-size: 13px;
    font-family: Verdana, Arial, sans-serif;
    background: #f5f7f9;
}

.dl-search-input:focus {
    outline: none;
    border-color: #5a6c85;
    background: #fff;
}

.dl-search-btn {
    padding: 6px 14px;
    background: #5a6c85;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    cursor: pointer;
}

.dl-search-btn:hover {
    background: #4a5c75;
}

.dl-clear-btn {
    padding: 6px 12px;
    background: #c0392b;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    text-decoration: none;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */

.dl-breadcrumb {
    font-size: 11px;
    font-family: Verdana, Arial, sans-serif;
    color: #666;
    margin-bottom: 8px;
    padding: 5px 8px;
    background: #f0f3f5;
    border: 1px solid #dce2e8;
    border-radius: 3px;
}

.dl-breadcrumb a {
    color: #0070c0;
    text-decoration: none;
}

.dl-breadcrumb a:hover {
    text-decoration: underline;
}

/* ============================================================
   RESULTS INFO
   ============================================================ */

.dl-results-info {
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    color: #555;
    margin-bottom: 10px;
}

.dl-cat-desc {
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    color: #555;
    background: #f0f3f5;
    border: 1px solid #dce2e8;
    border-radius: 3px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

/* ============================================================
   FILE GRID
   ============================================================ */

.dl-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.dl-file-card {
    background: #e8ecf0;
    border: 1px solid #c9d0d9;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dl-file-card:hover {
    border-color: #5a6c85;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.dl-file-thumb {
    display: block;
    width: 100%;
    height: 130px;
    overflow: hidden;
    background: #d0d8e0;
    text-align: center;
}

.dl-file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #d0d8e0;
    transition: transform 0.2s;
}

.dl-file-card:hover .dl-file-thumb img {
    transform: scale(1.05);
}

.dl-no-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7a8c9e;
}

.dl-no-thumb i {
    font-size: 36px;
    margin-bottom: 5px;
}

.dl-no-thumb span {
    font-size: 11px;
    font-family: Verdana, Arial, sans-serif;
    font-weight: bold;
}

.dl-file-info {
    padding: 8px;
}

.dl-file-name {
    display: block;
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dl-file-name:hover {
    color: #0070c0;
}

.dl-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 10px;
    font-family: Verdana, Arial, sans-serif;
    color: #666;
}

.dl-file-cat {
    background: #5a6c85;
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
}

.dl-file-uploader, .dl-file-downloads {
    color: #777;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.dl-pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.dl-pagination a {
    display: inline-block;
    padding: 5px 10px;
    background: #e8ecf0;
    border: 1px solid #c9d0d9;
    border-radius: 3px;
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    color: #2c3e50;
    text-decoration: none;
}

.dl-pagination a:hover {
    background: #d0d8e0;
}

.dl-pagination a.active {
    background: #5a6c85;
    color: #fff;
    border-color: #5a6c85;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.dl-empty {
    text-align: center;
    padding: 40px;
    color: #888;
    font-family: Verdana, Arial, sans-serif;
}

.dl-empty p {
    font-size: 14px;
    margin-top: 10px;
}

/* ============================================================
   FILE DETAIL PAGE
   ============================================================ */

.dl-file-detail {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.dl-file-preview-col {
    width: 300px;
    flex-shrink: 0;
}

.dl-preview-img {
    width: 100%;
    border: 1px solid #c9d0d9;
    border-radius: 4px;
}

.dl-no-preview {
    width: 100%;
    height: 250px;
    background: #d0d8e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #7a8c9e;
    border-radius: 4px;
    border: 1px solid #c9d0d9;
}

.dl-no-preview i {
    font-size: 60px;
    margin-bottom: 10px;
}

.dl-no-preview span {
    font-size: 16px;
    font-weight: bold;
    font-family: Verdana, Arial, sans-serif;
}

.dl-file-detail-col {
    flex: 1;
}

.dl-file-title {
    font-size: 18px;
    font-family: Verdana, Arial, sans-serif;
    color: #2c3e50;
    margin: 0 0 10px 0;
    border-bottom: 1px solid #dce2e8;
    padding-bottom: 8px;
}

.dl-file-summary {
    font-size: 13px;
    font-family: Verdana, Arial, sans-serif;
    color: #555;
    margin-bottom: 12px;
    font-style: italic;
}

.dl-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
}

.dl-info-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #dce2e8;
}

.dl-info-table td:first-child {
    font-weight: bold;
    color: #555;
    width: 120px;
    background: #f0f3f5;
}

.dl-info-table a {
    color: #0070c0;
    text-decoration: none;
}

.dl-file-desc {
    background: #f0f3f5;
    border: 1px solid #dce2e8;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 15px;
}

.dl-file-desc h3 {
    font-size: 13px;
    font-family: Verdana, Arial, sans-serif;
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.dl-file-desc p {
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    color: #444;
    margin: 0;
    line-height: 1.6;
}

.dl-download-area {
    margin-top: 15px;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-family: Verdana, Arial, sans-serif;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.dl-btn-download {
    background: #27ae60;
    color: #fff;
    flex-direction: column;
    align-items: flex-start;
}

.dl-btn-download:hover {
    background: #219a52;
}

.dl-btn-filename {
    font-size: 10px;
    font-weight: normal;
    opacity: 0.8;
}

.dl-btn-login {
    background: #5a6c85;
    color: #fff;
}

.dl-btn-login:hover {
    background: #4a5c75;
}

.dl-restricted {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-family: Verdana, Arial, sans-serif;
}

.dl-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-family: Verdana, Arial, sans-serif;
    margin-bottom: 15px;
}

.dl-back-link {
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    color: #0070c0;
    text-decoration: none;
}

.dl-back-link:hover {
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    #downloads-layout {
        flex-direction: column;
    }
    #dl-sidebar {
        width: 100%;
    }
    .dl-file-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .dl-file-detail {
        flex-direction: column;
    }
    .dl-file-preview-col {
        width: 100%;
    }
}
