/* SWEPAC Downloads Styles */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

.swepac-downloads-wrapper {
    font-family: 'Open Sans', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
}

.swepac-downloads-title{
    color: var(--navy, #2D353E);
font-family: "Open Sans";
font-size: 24px!important;
font-style: normal;
font-weight: 600!important;
line-height: 32px; /* 133.333% */
margin-bottom:20px;
}
/* Filtry - sticky */
.swepac-downloads-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 16px 0 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.filter-button {
    padding: 8px 16px !important;
    background-color: #ffffff !important;
    border: 2px solid #e5e7eb !important;
    color: #333333 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border-radius: 33554400px !important;
}

.filter-button:hover {
    background-color: #f5f5f5 !important;
    border-color: #D1D5DC !important;
}

.filter-button.active {
    background-color: #d32f2f !important;
    border-color: #d32f2f !important;
    color: #ffffff !important;
}

/* Loading */
.swepac-downloads-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 40px;
    font-size: 14px;
    color: #666666;
}

.swepac-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #d32f2f;
    border-radius: 50%;
    animation: swepac-spin 0.8s linear infinite;
}

@keyframes swepac-spin {
    to { transform: rotate(360deg); }
}

/* Lista - typ i kategoria bez accordionu, tylko subkategoria ma accordion */
.swepac-downloads-list {
    width: 100%;
}

/* Sekcja Typ (np. Karta produktu) */
.section-filter {
    margin-bottom: 24px;
}

.section-filter-header {
    background-color: #2D353E;
    color: #ffffff;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    margin-bottom:20px;
}

.section-icon {
    display: flex;
    align-items: center;
    color: #d32f2f;
}

.section-icon svg {
    flex-shrink: 0;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    text-transform: none;
}

.section-filter-content {
    
}

/* Sekcja Kategoria */
.section-category {
    margin-bottom: 20px;
}

.section-category:last-child {
    margin-bottom: 0;
}

.section-category-header {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 6px;
}

.section-category-content {
    padding-left: 0;
}

/* Accordion TYLKO na subkategoriach – bez numeracji (numeracja tylko na parentach) */
.accordion-tertiary {
    padding: 16px;
    background-color: #f5f5f5;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    list-style: none;
    counter-increment: none;
    margin-bottom:15px;
}
.accordion-tertiary.expanded, .accordion-tertiary:hover {
    background-color: #f5f5f5;
}

.accordion-tertiary:last-child {
    margin-bottom: 0;
}

.accordion-tertiary.expanded {
    border-color: #d32f2f;
}

.accordion-tertiary-header {
    
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

.accordion-tertiary-header:hover {
    
}

.tertiary-title {
    font-size: 18px;
    font-weight: 400;
}

.tertiary-icon {
    display: flex;
    align-items: center;
    color: #666;
}

.tertiary-icon svg {
    flex-shrink: 0;
}

.accordion-tertiary-content {
    background-color: transparent;
}

.accordion-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 14px;
}

/* Lista plików w kategorii – nazwa na górze, pliki/flagi w jednej linii poniżej */
.download-item-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 12px;
}

.download-item-row:last-child {
    border-bottom: none;
}

.download-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #333333;
}

.download-item-files {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.download-file-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: #fff;
    border: 1px solid #d1d5dc;
    color: #333333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    width: fit-content;
}

.download-file-button:hover {
    background-color: #d32f2f;
    border-color: #d32f2f;
    color: #ffffff;
    text-decoration: none;
}

.file-language-flag {
    font-size: 18px;
}

.file-language-name {
    font-weight: 500;
    font-size: 13px;
}

.no-files-text {
    color: #999999;
    font-style: italic;
    font-size: 14px;
}

/* Empty state */
.swepac-downloads-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999999;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .swepac-downloads-wrapper {
        padding: 15px;
    }
    
    .swepac-downloads-filters {
        gap: 8px;
    }
    
    .filter-button {
        padding: 8px 15px !important;
        font-size: 12px !important;
    }
    
    .section-filter-header {
        padding: 14px 16px;
    }
    
    .section-title,
    .section-category-header {
        font-size: 14px;
    }
    
    .accordion-tertiary-header {
        padding: 10px 14px;
    }
    
    .download-item-row {
        padding: 12px 15px;
    }
    
    .download-item-files {
        flex-wrap: wrap;
    }
    
    .download-file-button {
        flex-shrink: 0;
    }
}
