/* SE Downloads Listing Styles */

.se-downloads-listing {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 20px 0;
}

.se-downloads-container {
    display: flex;
    gap: 2rem;
    /* max-width: 1200px; */
    margin: 0 auto;
    flex-direction: column;
}

/* Filters Column */
.se-downloads-filters-column {
    height: fit-content;
    top: 20px;
    color: white;
    max-width: 800px;
    margin: auto;
}

.se-downloads-filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.se-downloads-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-basis: calc(50% - 1rem);
}

.se-downloads-filter-group label {
    font-weight: 500;
    color: #34495e;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.se-downloads-search-input,
.se-downloads-product-line-select {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 25px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    height: 50px;
}

.se-downloads-search-input:focus,
.se-downloads-product-line-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* File Types Multi-select */
.se-downloads-file-types-multiselect {
    position: relative;
}

.se-downloads-file-types-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    /* height: 40px; */
}

.se-downloads-file-types-input {
    padding: 10px 35px 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    background: white;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 25px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    /* line-height: 1; */
    /* height: 1px; */
}

.se-downloads-file-types-dropdown-arrow {
    position: absolute;
    right: 12px;
    color: #6c757d;
    pointer-events: none;
    transition: transform 0.2s;
}

.se-downloads-file-types-multiselect.open .se-downloads-file-types-dropdown-arrow {
    transform: rotate(180deg);
}

.se-downloads-file-types-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.se-downloads-file-types-multiselect.open .se-downloads-file-types-dropdown {
    display: block !important;
}

.se-downloads-file-types-group {
    padding: 0;
}

.se-downloads-file-types-section-title {
    font-weight: 600;
    font-size: 0.85em;
    color: #495057;
    padding: 10px 12px 5px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.se-downloads-file-type-option {
    display: flex;
    align-items: center;
    padding: 2px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9em;
    border: none;
    background: none;
    margin: 0;
    font-weight: normal;
}

.se-downloads-file-type-option:hover {
    background-color: #f8f9fa;
}

.se-downloads-file-type-option input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 0;
    min-height: unset;
}

.se-downloads-reset-filters {
    background: #5cb039;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}


/* Results Column */
.se-downloads-results-column {
    flex: 1;
}

.se-downloads-results-column.full-width {
    flex: none;
    width: 100%;
}

.se-downloads-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.se-downloads-count-text {
    /* color: #6c757d; */
    font-size: 0.9em;
}

/* Downloads Grid */
.se-downloads-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.se-downloads-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.se-downloads-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.se-downloads-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

/* Product Tiles */
.se-downloads-product-tile {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s, transform 0.2s;
}

.se-downloads-product-tile:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.se-downloads-product-header {
    padding: 20px 20px 15px;
    background: #000;
    color: white;
}

.se-downloads-product-title {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.3;
}

.se-downloads-product-line {
    font-size: 0.85em;
    font-weight: 400;
}

/* Files Table */
.se-downloads-files-table-wrapper {
    overflow-x: auto;
}

.se-downloads-files-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.se-downloads-files-table th {
    background: #f8f9fa;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.85em;
}

.se-downloads-files-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.se-downloads-files-table tr:hover {
    background-color: #f8f9fa;
}

.se-downloads-file-label {
    font-weight: 500;
    color: #2c3e50;
}

.se-downloads-file-size,
.se-downloads-file-date {
    color: #6c757d;
    font-size: 0.85em;
}

.se-downloads-file-type {
    font-size: 0.85em;
    color: #495057;
}

.se-downloads-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #5cb039;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 25px;
    font-size: 0.8em;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
}

.se-downloads-download-btn:hover {
    background: #218838;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.se-downloads-download-icon {
    font-size: 1em;
}

/* Pagination */
.se-downloads-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px 0;
}

.se-downloads-pagination-btn {
    background: white;
    border: 1px solid #ced4da;
    color: #495057;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 40px;
}

.se-downloads-pagination-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.se-downloads-pagination-btn.se-downloads-pagination-active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.se-downloads-pagination-dots {
    color: #6c757d;
    padding: 0 5px;
}

/* Loading States */
.se-downloads-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.se-downloads-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.se-downloads-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 1.1em;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.se-downloads-filters-header {
    text-align: center;
}

.se-downloads-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;

}

.se-downloads-filter-group.se-downloads-search-group {
    flex-basis: 100%;
}

/* Responsive Design */
@media (max-width: 992px) {
    .se-downloads-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .se-downloads-filters-column {
        flex: none;
        position: static;
    }
    
    .se-downloads-grid[data-columns="2"],
    .se-downloads-grid[data-columns="3"] {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .se-downloads-container {
        margin: 0 10px;
    }
    
    .se-downloads-filters-column {
        padding: 15px;
    }
    
    .se-downloads-product-header {
        padding: 15px;
    }
    
    .se-downloads-files-table {
        font-size: 0.8em;
    }
    
    .se-downloads-files-table th,
    .se-downloads-files-table td {
        padding: 8px 6px;
    }
    
    .se-downloads-download-btn {
        padding: 4px 8px;
        font-size: 0.75em;
    }
}

@media (max-width: 576px) {
    .se-downloads-files-table-wrapper {
        margin: 0 -15px;
    }
    
    .se-downloads-files-table {
        font-size: 0.75em;
    }
    
    .se-downloads-pagination-wrapper {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .se-downloads-pagination-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 35px;
    }
}

/* Focus States for Accessibility */
.se-downloads-search-input:focus,
.se-downloads-product-line-select:focus,
.se-downloads-file-types-input:focus,
.se-downloads-reset-filters:focus,
.se-downloads-download-btn:focus,
.se-downloads-pagination-btn:focus {
    outline: 2px solid #5cb039;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .se-downloads-filters-column,
    .se-downloads-pagination-wrapper {
        display: none;
    }
    
    .se-downloads-container {
        flex-direction: column;
    }
    
    .se-downloads-product-tile {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .se-downloads-download-btn {
        background: transparent;
        color: #000;
        border: 1px solid #000;
    }
} 

/* Highlighted file rows when file type filter is applied */
.se-downloads-highlighted-file {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
}

.se-downloads-highlighted-file td {
    background-color: #fff3cd !important;
    font-weight: 500;
}

.se-downloads-highlighted-file .se-downloads-download-btn {
    background-color: #ffc107;
    color: #212529;
    border-color: #ffc107;
} 