/* ==========================================================================
   DOWNLOAD CENTER PAGE STYLES (support3.css)
   ========================================================================== */

.download-center-section {
    background-color: #f7f9fa;
    padding: 50px 0 100px;
    min-height: calc(100vh - 120px);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    font-family: var(--font-family, 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.download-layout-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* ==========================================================================
   Sidebar: Product Categories
   ========================================================================== */
.download-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e8ec;
}

.download-sidebar-header {
    background-color: #eef1f5;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 700;
    color: #222222;
    text-transform: uppercase;
    /* letter-spacing: 0.3px; */
    border-bottom: 1px solid #e1e5ea;
}

.download-sidebar-list {
    list-style: none;
    padding: 12px 14px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 720px;
    overflow-y: auto;
}

.download-category-item label {
    display: flex;
    align-items: top;
    gap: 8px;
    font-size: 13.5px;
    color: #444444;
    cursor: pointer;
    user-select: none;
    padding: 3px 0;
    transition: color 0.15s ease;
}

.download-category-item:hover {
    color: #0070e0;
}

.download-category-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    border: 1px solid #ccd2db;
    border-radius: 3px;
    cursor: pointer;
    accent-color: #0070e0;
    margin: 0;
    transform: translateY(2px);
}

/* ==========================================================================
   Main Download Area (Tabs & Table)
   ========================================================================== */
.download-main-area {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    /* border: 1px solid #e5e8ec; */
    overflow: hidden;
    box-sizing: border-box;
}

/* Top Tabs */
.download-tabs-nav {
    display: flex;
    align-items: flex-end;
    background-color: #f7f9fa;
    border-bottom: 1px solid #d0d7de;
    padding-top: 10px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.download-tab-btn {
    flex: 1;
    background-color: #f2f4f7;
    border: none;
    border-right: 1px solid #d0d7de;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #444444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
    border-radius: 0;
    border: 1px solid #d0d7de;
    border-bottom: 0;
}

/* .download-tab-btn:last-child {
    border-right: none;
} */

.download-tab-btn:hover {
    background-color: #e8ecf1;
    color: #111111;
}

.download-tab-btn.active {
    background-color: #0091ff;
    color: #ffffff;
    padding: 16px 20px;
    margin-top: -10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-right-color: transparent;
    z-index: 2;
}

.download-tab-badge {
    background-color: #0091ff;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.2;
}

.download-tab-btn.active .download-tab-badge {
    background-color: #ffffff;
    color: #0091ff;
}

/* ==========================================================================
   Data Table
   ========================================================================== */
.download-tab-content {
    display: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.download-tab-content.active {
    display: block;
}

.download-table-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    background: #ffffff;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.download-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    border: 1px solid #d0d7de;
    border-top: 0;
}

.download-table th {
    background-color: #eef1f5;
    color: #333333;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 14px 16px;
    border-right: 1px solid #d0d7de;
    border-bottom: 1px solid #d0d7de;
    white-space: nowrap;
}

.download-table th:last-child {
    border-right: none;
}

.download-table td {
    padding: 14px 16px;
    font-size: 13.5px;
    color: #555555;
    border-right: 1px solid #e8ecf1;
    border-bottom: 1px solid #e8ecf1;
    vertical-align: middle;
}

.download-table td:last-child {
    border-right: none;
}

.download-table tbody tr:last-child td {
    border-bottom: 1px solid #d0d7de;
}

.download-table tbody tr:hover td {
    background-color: #f8fafc;
}

.download-file-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #444444;
    cursor: pointer;
}

.download-file-name:hover {
    color: #0091ff;
}

.download-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #888888;
    color: #777777;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    cursor: help;
    user-select: none;
    margin-left: 4px;
}

.download-format-badge {
    text-transform: lowercase;
    color: #555555;
    font-size: 13.5px;
    font-weight: 400;
}

.download-btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #555555;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.download-btn-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.download-btn-link:hover {
    color: #0091ff;
}

/* ==========================================================================
   Shared Download Details Modal
   ========================================================================== */
.download-file-name {
    cursor: pointer;
    transition: color 0.15s ease;
}

.download-file-name:hover {
    color: #0088ff;
}

.download-help-icon {
    cursor: pointer;
    transition: all 0.15s ease;
}

.download-file-name:hover .download-help-icon,
.download-help-icon:hover {
    background-color: #0088ff;
    border-color: #0088ff;
    color: #ffffff;
}

.download-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
    box-sizing: border-box;
}

.download-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.download-modal-box {
    background-color: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(-20px) scale(0.96);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.download-modal-overlay.active .download-modal-box {
    transform: translateY(0) scale(1);
}

.download-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.download-modal-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.download-modal-close {
    background: transparent;
    border: none;
    font-size: 26px;
    font-weight: 300;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.download-modal-close:hover {
    color: #ef4444;
}

.download-modal-body {
    padding: 24px 20px;
    font-size: 14.5px;
    color: #334155;
    line-height: 1.65;
    max-height: 420px;
    overflow-y: auto;
}

.download-modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background-color: #f1f5f9;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.download-modal-meta-item {
    display: flex;
    flex-direction: column;
}

.download-modal-meta-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.download-modal-meta-val {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

.download-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.download-modal-btn-close {
    background-color: #0088ff;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.download-modal-btn-close:hover {
    background-color: #0070e0;
    box-shadow: 0 4px 12px rgba(0, 112, 224, 0.3);
}

/* ==========================================================================
   Responsive Adjustments (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 991px) {
    .download-center-section {
        padding: 30px 0 60px;
    }

    .download-layout-grid {
        flex-direction: column;
        gap: 20px;
    }

    .download-sidebar {
        width: 100%;
    }

    .download-sidebar-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 6px 12px;
        max-height: 220px;
        overflow-y: auto;
    }

    .download-tabs-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .download-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .download-tab-btn {
        flex: 1 0 auto;
        min-width: 130px;
        padding: 12px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    .download-tab-btn.active {
        padding: 15px 14px;
    }
}

@media (max-width: 768px) {


    .download-sidebar-header {
        padding: 10px 14px;
        font-size: 14.5px;
    }

    .download-sidebar-list {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        padding: 10px;
    }

    .download-category-item label {
        font-size: 12.5px;
    }

    .download-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .download-table {
        min-width: 620px;
    }

    .download-table th,
    .download-table td {
        padding: 10px 12px;
        font-size: 12.5px;
    }

    .download-tab-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .download-tab-btn.active {
        padding: 13px 12px;
    }

    .download-modal-body {
        padding: 16px 14px;
    }

    .download-modal-meta-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
