/**
 * Ensemble Downloads Add-on - Frontend Styles
 * 
 * Uses CSS variables from Ensemble Design System for consistency
 * Uses --ensemble-* Designer variables directly. Dark/Light mode handled by Designer system.
 * Follows the Tickets Add-on pattern for variable inheritance
 *
 * @package Ensemble
 * @subpackage Addons/Downloads
 * @version 1.0.0
 */


/* =========================================
   CSS Variables Note
   =========================================
   This file uses --ensemble-* Designer variables directly.
   Dark/Light mode is handled by the Designer system.
   See CSS-ARCHITECTURE.md for variable reference.
   ========================================= */

/* =========================================
   Base Container
   ========================================= */
.es-downloads {
    margin: 24px 0;
}

.es-downloads__title {
    font-size: 1.5rem;
    font-weight: var(--ensemble-button-weight, 600);
    margin: 0 0 1.5rem;
    color: var(--ensemble-text, #1a202c);
}

.es-downloads__empty {
    padding: 2rem;
    text-align: center;
    color: var(--ensemble-text-secondary, #718096);
    background: var(--ensemble-bg, #f7fafc);
    border: 1px solid var(--ensemble-card-border, #e2e8f0);
    border-radius: var(--ensemble-card-radius, 12px);
}

/* =========================================
   Grid Layout
   ========================================= */
.es-downloads--grid .es-downloads__grid {
    display: grid;
    gap: 1.5rem;
}

.es-downloads--grid.es-downloads--cols-2 .es-downloads__grid {
    grid-template-columns: repeat(2, 1fr);
}

.es-downloads--grid.es-downloads--cols-3 .es-downloads__grid {
    grid-template-columns: repeat(3, 1fr);
}

.es-downloads--grid.es-downloads--cols-4 .es-downloads__grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .es-downloads--grid.es-downloads--cols-4 .es-downloads__grid,
    .es-downloads--grid.es-downloads--cols-3 .es-downloads__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .es-downloads--grid .es-downloads__grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================
   Download Card (Grid Item)
   ========================================= */
.es-download-card {
    display: flex;
    flex-direction: column;
    background: var(--ensemble-card-bg, #ffffff);
    border: 1px solid var(--ensemble-card-border, #e2e8f0);
    border-radius: var(--ensemble-card-radius, 12px);
    overflow: hidden;
    box-shadow: var(--ensemble-shadow, 0 2px 8px rgba(0, 0, 0, 0.1));
    transition: box-shadow var(--ensemble-transition, all 0.3s ease), transform var(--ensemble-transition, all 0.3s ease);
}

.es-download-card:hover {
    box-shadow: var(--ensemble-shadow-lg, 0 4px 16px rgba(0, 0, 0, 0.15));
    transform: translateY(-2px);
}

.es-download-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    background: var(--ensemble-bg, #f7fafc);
    font-size: var(--ensemble-price-size, 32px);
}

.es-download-card__icon .dashicons {
    width: 48px;
    height: 48px;
    font-size: var(--ensemble-hero-size, 72px);
}

/* Type-specific icon colors */
.es-download-card__icon--presentation { color: var(--ensemble-type-presentation, #3b82f6); }
.es-download-card__icon--cv { color: var(--ensemble-type-cv, #8b5cf6); }
.es-download-card__icon--handout { color: var(--ensemble-type-handout, #10b981); }
.es-download-card__icon--video { color: var(--ensemble-type-video, #ef4444); }
.es-download-card__icon--photo { color: var(--ensemble-type-photo, #f59e0b); }
.es-download-card__icon--package { color: var(--ensemble-type-package, #6366f1); }
.es-download-card__icon--other { color: var(--ensemble-type-other, #6b7280); }

.es-download-card__content {
    flex: 1;
    padding: 1rem 1.25rem;
}

.es-download-card__title {
    font-size: 1rem;
    font-weight: var(--ensemble-button-weight, 600);
    margin: 0 0 0.5rem;
    color: var(--ensemble-text, #1a202c);
    line-height: 1.4;
}

.es-download-card__description {
    font-size: 0.875rem;
    color: var(--ensemble-text-secondary, #718096);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.es-download-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--ensemble-text-secondary, #718096);
}

.es-download-card__type {
    font-weight: var(--ensemble-body-weight, 400);
}

.es-download-card__extension {
    background: var(--ensemble-bg, #f7fafc);
    padding: 0.125rem 0.5rem;
    border-radius: var(--ensemble-badge-radius, 4px);
    font-weight: var(--ensemble-body-weight, 400);
    text-transform: uppercase;
}

.es-download-card__speakers {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--ensemble-text-secondary, #718096);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ensemble-card-border, #e2e8f0);
}

.es-download-card__speakers .dashicons {
    width: 16px;
    height: 16px;
    font-size: var(--ensemble-body-size, 16px);
}

.es-download-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: var(--ensemble-primary, #667eea);
    color: var(--ensemble-button-text, #ffffff) !important;
    text-decoration: none !important;
    font-weight: var(--ensemble-body-weight, 400);
    font-size: 0.875rem;
    transition: background var(--ensemble-transition, all 0.3s ease);
    border: none;
    cursor: pointer;
}

.es-download-card__button:hover {
    background: var(--ensemble-button-hover-bg, #5568d3);
    color: var(--ensemble-button-text, #ffffff) !important;
}

.es-download-card__button .dashicons {
    width: 18px;
    height: 18px;
    font-size: var(--ensemble-lg-size, 18px);
}

/* =========================================
   List Layout
   ========================================= */
.es-downloads--list .es-downloads__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.es-download-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--ensemble-card-bg, #ffffff);
    border: 1px solid var(--ensemble-card-border, #e2e8f0);
    border-radius: var(--ensemble-card-radius, 12px);
    box-shadow: var(--ensemble-shadow, 0 2px 8px rgba(0, 0, 0, 0.1));
    transition: box-shadow var(--ensemble-transition, all 0.3s ease);
}

.es-download-item:hover {
    box-shadow: var(--ensemble-shadow-lg, 0 4px 16px rgba(0, 0, 0, 0.15));
}

.es-download-item__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: calc(var(--ensemble-card-radius, 12px) * 1.25);
    background: var(--ensemble-bg, #f7fafc);
    font-size: var(--ensemble-h3-size, 24px);
}

.es-download-item__icon .dashicons {
    width: 28px;
    height: 28px;
    font-size: var(--ensemble-h2-size, 28px);
}

/* Type-specific icon colors for list */
.es-download-item__icon--presentation { color: var(--ensemble-type-presentation, #3b82f6); }
.es-download-item__icon--cv { color: var(--ensemble-type-cv, #8b5cf6); }
.es-download-item__icon--handout { color: var(--ensemble-type-handout, #10b981); }
.es-download-item__icon--video { color: var(--ensemble-type-video, #ef4444); }
.es-download-item__icon--photo { color: var(--ensemble-type-photo, #f59e0b); }
.es-download-item__icon--package { color: var(--ensemble-type-package, #6366f1); }
.es-download-item__icon--other { color: var(--ensemble-type-other, #6b7280); }

.es-download-item__content {
    flex: 1;
    min-width: 0;
}

.es-download-item__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.es-download-item__title {
    font-size: 1rem;
    font-weight: var(--ensemble-button-weight, 600);
    margin: 0;
    color: var(--ensemble-text, #1a202c);
}

.es-download-item__type {
    font-size: 0.6875rem;
    font-weight: var(--ensemble-body-weight, 400);
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    color: var(--ensemble-button-text, #ffffff);
}

/* Type badge colors */
.es-download-item__type--presentation { background: var(--ensemble-type-presentation, #3b82f6); }
.es-download-item__type--cv { background: var(--ensemble-type-cv, #8b5cf6); }
.es-download-item__type--handout { background: var(--ensemble-type-handout, #10b981); }
.es-download-item__type--video { background: var(--ensemble-type-video, #ef4444); }
.es-download-item__type--photo { background: var(--ensemble-type-photo, #f59e0b); }
.es-download-item__type--package { background: var(--ensemble-type-package, #6366f1); }
.es-download-item__type--other { background: var(--ensemble-type-other, #6b7280); }

.es-download-item__description {
    font-size: 0.875rem;
    color: var(--ensemble-text-secondary, #718096);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.es-download-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--ensemble-text-secondary, #718096);
}

.es-download-item__meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.es-download-item__meta .dashicons {
    width: 14px;
    height: 14px;
    font-size: var(--ensemble-small-size, 14px);
    opacity: 0.7;
}

.es-download-item__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ensemble-card-border, #e2e8f0);
    font-size: 0.8125rem;
}

.es-download-item__links span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.es-download-item__links .dashicons {
    width: 14px;
    height: 14px;
    font-size: var(--ensemble-small-size, 14px);
    opacity: 0.6;
}

.es-download-item__links a {
    color: var(--ensemble-primary, #667eea);
    text-decoration: none;
    transition: color var(--ensemble-transition, all 0.3s ease);
}

.es-download-item__links a:hover {
    color: var(--ensemble-button-hover-bg, #5568d3);
    text-decoration: underline;
}

.es-download-item__button {
    flex-shrink: 0;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--ensemble-primary, #667eea);
    color: var(--ensemble-button-text, #ffffff) !important;
    text-decoration: none !important;
    font-weight: var(--ensemble-body-weight, 400);
    font-size: 0.875rem;
    border-radius: calc(var(--ensemble-card-radius, 12px) * 0.75);
    transition: background var(--ensemble-transition, all 0.3s ease), transform var(--ensemble-transition, all 0.3s ease);
    border: none;
    cursor: pointer;
}

.es-download-item__button:hover {
    background: var(--ensemble-button-hover-bg, #5568d3);
    color: var(--ensemble-button-text, #ffffff) !important;
    transform: translateY(-1px);
}

.es-download-item__button .dashicons {
    width: 16px;
    height: 16px;
    font-size: var(--ensemble-body-size, 16px);
}

@media (max-width: 640px) {
    .es-download-item {
        flex-wrap: wrap;
    }
    
    .es-download-item__button {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
}

/* =========================================
   Compact Layout
   ========================================= */
.es-downloads--compact .es-downloads__title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.es-downloads--compact .es-downloads__compact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.es-download-compact {
    border-bottom: 1px solid var(--ensemble-card-border, #e2e8f0);
}

.es-download-compact:last-child {
    border-bottom: none;
}

.es-download-compact__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0;
    color: inherit;
    text-decoration: none;
    transition: background var(--ensemble-transition, all 0.3s ease);
}

.es-download-compact__link:hover {
    background: var(--ensemble-bg, #f7fafc);
    margin: 0 -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: calc(var(--ensemble-card-radius, 12px) * 0.5);
}

.es-download-compact__icon {
    flex-shrink: 0;
}

.es-download-compact__icon .dashicons {
    width: 20px;
    height: 20px;
    font-size: var(--ensemble-h4-size, 20px);
}

/* Type-specific icon colors for compact */
.es-download-compact__icon--presentation { color: var(--ensemble-type-presentation, #3b82f6); }
.es-download-compact__icon--cv { color: var(--ensemble-type-cv, #8b5cf6); }
.es-download-compact__icon--handout { color: var(--ensemble-type-handout, #10b981); }
.es-download-compact__icon--video { color: var(--ensemble-type-video, #ef4444); }
.es-download-compact__icon--photo { color: var(--ensemble-type-photo, #f59e0b); }
.es-download-compact__icon--package { color: var(--ensemble-type-package, #6366f1); }
.es-download-compact__icon--other { color: var(--ensemble-type-other, #6b7280); }

.es-download-compact__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.es-download-compact__title {
    font-size: 0.875rem;
    font-weight: var(--ensemble-body-weight, 400);
    color: var(--ensemble-text, #1a202c);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.es-download-compact__meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--ensemble-text-secondary, #718096);
}

.es-download-compact__ext {
    background: var(--ensemble-bg, #f7fafc);
    padding: 0 0.375rem;
    border-radius: var(--ensemble-badge-radius, 4px);
    font-weight: var(--ensemble-body-weight, 400);
    text-transform: uppercase;
}

.es-download-compact__arrow {
    flex-shrink: 0;
    color: var(--ensemble-text-secondary, #718096);
    transition: color var(--ensemble-transition, all 0.3s ease), transform var(--ensemble-transition, all 0.3s ease);
}

.es-download-compact__arrow.dashicons {
    width: 18px;
    height: 18px;
    font-size: var(--ensemble-lg-size, 18px);
}

.es-download-compact__link:hover .es-download-compact__arrow {
    color: var(--ensemble-primary, #667eea);
    transform: translateX(2px);
}

/* =========================================
   Section Styles (Auto-display on Event/Artist pages)
   ========================================= */
.es-downloads-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--ensemble-bg, #f7fafc);
    border: 1px solid var(--ensemble-card-border, #e2e8f0);
    border-radius: var(--ensemble-card-radius, 12px);
}

.es-downloads-section__title {
    font-size: 1.25rem;
    font-weight: var(--ensemble-button-weight, 600);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--ensemble-card-border, #e2e8f0);
    color: var(--ensemble-text, #1a202c);
}

.es-downloads-section .es-downloads {
    margin: 0;
}

/* =========================================
   Login Required State
   ========================================= */
.es-download-card__button[data-require-login="true"],
.es-download-item__button[data-require-login="true"] {
    position: relative;
}

.es-download-card__button[data-require-login="true"]::before,
.es-download-item__button[data-require-login="true"]::before {
    content: '\f112';
    font-family: dashicons;
    margin-right: 0.375rem;
}

.es-download-compact__link[data-require-login="true"] {
    opacity: 0.7;
}

.es-download-compact__link[data-require-login="true"]:hover {
    opacity: 1;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 768px) {
    .es-downloads-section {
        padding: 1rem;
    }
    
    .es-download-card__icon {
        height: 60px;
    }
    
    .es-download-card__icon .dashicons {
        width: 36px;
        height: 36px;
        font-size: var(--ensemble-h1-size, 36px);
    }
}

/* =========================================
   Print Styles
   ========================================= */
@media print {
    .es-downloads {
    
    .es-download-card,
    .es-download-item {
        box-shadow: none;
        break-inside: avoid;
    }
    
    .es-download-card__button,
    .es-download-item__button,
    .es-download-compact__arrow {
        display: none;
    }
}

/* =========================================
   ARCHIVE STYLES - Grouped Downloads
   ========================================= */

/* Archive Container */
.es-downloads-archive {
}

.es-downloads-archive__title {
    font-size: 1.5em;
    font-weight: var(--ensemble-button-weight, 600);
    margin: 0 0 1.5em;
    color: var(--ensemble-text, #1a202c);
}

/* =========================================
   TABS STYLE
   ========================================= */
.es-downloads-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    border-bottom: 2px solid var(--ensemble-card-border, #e2e8f0);
    margin-bottom: 1.5em;
    padding-bottom: 0;
}

.es-downloads-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 1.25em;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--ensemble-text-muted, #a0aec0);
    font-size: 0.95em;
    font-weight: var(--ensemble-body-weight, 400);
    cursor: pointer;
    transition: var(--ensemble-transition, all 0.3s ease);
}

.es-downloads-tabs__tab:hover {
    color: var(--ensemble-text, #1a202c);
}

.es-downloads-tabs__tab.is-active {
    color: var(--ensemble-primary, #667eea);
    border-bottom-color: var(--ensemble-primary, #667eea);
}

.es-downloads-tabs__tab .dashicons {
    font-size: var(--ensemble-lg-size, 18px);
    width: 18px;
    height: 18px;
}

.es-downloads-tabs__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    padding: 0.1em 0.4em;
    background: var(--ensemble-card-border, #e2e8f0);
    border-radius: var(--ensemble-radius, 8px);
    font-size: 0.8em;
    font-weight: var(--ensemble-button-weight, 600);
}

.es-downloads-tabs__tab.is-active .es-downloads-tabs__count {
    background: var(--ensemble-primary, #667eea);
    color: var(--ensemble-button-text, #ffffff);
}

.es-downloads-tabs__panel {
    display: none;
}

.es-downloads-tabs__panel.is-active {
    display: block;
}

/* =========================================
   ACCORDION STYLE
   ========================================= */
.es-downloads-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.es-downloads-accordion__item {
    background: var(--ensemble-card-bg, #ffffff);
    border: 1px solid var(--ensemble-card-border, #e2e8f0);
    border-radius: var(--ensemble-radius, 8px);
    overflow: hidden;
}

.es-downloads-accordion__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1em 1.25em;
    background: transparent;
    border: none;
    color: var(--ensemble-text, #1a202c);
    font-size: 1em;
    text-align: left;
    cursor: pointer;
    transition: var(--ensemble-transition, all 0.3s ease);
}

.es-downloads-accordion__header:hover {
    background: var(--ensemble-bg, #f7fafc);
}

.es-downloads-accordion__header-content {
    display: flex;
    align-items: center;
    gap: 0.75em;
    flex: 1;
}

.es-downloads-accordion__thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.es-downloads-accordion__icon {
    font-size: var(--ensemble-h3-size, 24px);
    width: 24px;
    height: 24px;
}

.es-downloads-accordion__title {
    font-weight: var(--ensemble-button-weight, 600);
    flex: 1;
}

.es-downloads-accordion__count {
    font-size: 0.85em;
    color: var(--ensemble-text-muted, #a0aec0);
    font-weight: var(--ensemble-body-weight, 400);
}

.es-downloads-accordion__toggle {
    transition: var(--ensemble-transition, all 0.3s ease);
    color: var(--ensemble-text-muted, #a0aec0);
}

.es-downloads-accordion__item.is-open .es-downloads-accordion__toggle {
    transform: rotate(180deg);
}

.es-downloads-accordion__panel {
    display: none;
}

.es-downloads-accordion__item.is-open .es-downloads-accordion__panel {
    display: block;
}

.es-downloads-accordion__content {
    padding: 0 1.25em 1.25em;
    border-top: 1px solid var(--ensemble-card-border, #e2e8f0);
}

/* =========================================
   GROUPED LIST STYLE
   ========================================= */
.es-downloads-grouped-list {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.es-downloads-group__header {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding-bottom: 0.75em;
    border-bottom: 2px solid var(--ensemble-card-border, #e2e8f0);
    margin-bottom: 1em;
}

.es-downloads-group__thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.es-downloads-group__icon {
    font-size: var(--ensemble-h2-size, 28px);
    width: 28px;
    height: 28px;
}

.es-downloads-group__title {
    flex: 1;
    margin: 0;
    font-size: 1.1em;
    font-weight: var(--ensemble-button-weight, 600);
    color: var(--ensemble-text, #1a202c);
}

.es-downloads-group__title a {
    color: inherit;
    text-decoration: none;
}

.es-downloads-group__title a:hover {
    color: var(--ensemble-primary, #667eea);
}

.es-downloads-group__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2em;
    padding: 0.25em 0.6em;
    background: var(--ensemble-card-border, #e2e8f0);
    border-radius: var(--ensemble-card-radius, 12px);
    font-size: 0.85em;
    font-weight: var(--ensemble-button-weight, 600);
    color: var(--ensemble-text-muted, #a0aec0);
}

/* =========================================
   GROUPED GRID STYLE
   ========================================= */
.es-downloads-grouped-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5em;
}

.es-downloads-group__grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    gap: 1em;
}

@media (max-width: 900px) {
    .es-downloads-group__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .es-downloads-group__grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   DOWNLOAD ITEMS (within groups)
   ========================================= */
.es-downloads-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.es-downloads-item {
    margin: 0;
    padding: 0;
}

.es-downloads-item__link {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 0.75em 1em;
    background: var(--ensemble-bg, #f7fafc);
    border-radius: var(--ensemble-radius, 8px);
    color: var(--ensemble-text, #1a202c);
    text-decoration: none;
    transition: var(--ensemble-transition, all 0.3s ease);
}

.es-downloads-item__link:hover {
    background: var(--ensemble-card-border, #e2e8f0);
    transform: translateX(4px);
}

.es-downloads-item__icon {
    font-size: var(--ensemble-h4-size, 20px);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.es-downloads-item__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15em;
    min-width: 0;
}

.es-downloads-item__title {
    font-weight: var(--ensemble-body-weight, 400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.es-downloads-item__meta {
    font-size: 0.8em;
    color: var(--ensemble-text-muted, #a0aec0);
}

.es-downloads-item__action {
    flex-shrink: 0;
    color: var(--ensemble-text-muted, #a0aec0);
    transition: var(--ensemble-transition, all 0.3s ease);
}

.es-downloads-item__link:hover .es-downloads-item__action {
    color: var(--ensemble-primary, #667eea);
}

/* =========================================
   DOWNLOAD CARDS (Grid within groups)
   ========================================= */
.es-download-card {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1em;
    background: var(--ensemble-bg, #f7fafc);
    border: 1px solid var(--ensemble-card-border, #e2e8f0);
    border-radius: var(--ensemble-radius, 8px);
    color: var(--ensemble-text, #1a202c);
    text-decoration: none;
    transition: var(--ensemble-transition, all 0.3s ease);
}

.es-download-card:hover {
    border-color: var(--ensemble-primary, #667eea);
    transform: translateY(-2px);
    box-shadow: var(--ensemble-shadow-lg, 0 4px 16px rgba(0, 0, 0, 0.15));
}

.es-download-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--ensemble-radius, 8px);
    flex-shrink: 0;
}

.es-download-card__icon .dashicons {
    font-size: var(--ensemble-h3-size, 24px);
    width: 24px;
    height: 24px;
}

.es-download-card__content {
    flex: 1;
    min-width: 0;
}

.es-download-card__title {
    margin: 0 0 0.25em;
    font-size: 0.95em;
    font-weight: var(--ensemble-button-weight, 600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.es-download-card__meta {
    display: flex;
    gap: 0.75em;
    font-size: 0.8em;
    color: var(--ensemble-text-muted, #a0aec0);
}

.es-download-card__action {
    flex-shrink: 0;
    color: var(--ensemble-text-muted, #a0aec0);
    transition: var(--ensemble-transition, all 0.3s ease);
}

.es-download-card:hover .es-download-card__action {
    color: var(--ensemble-primary, #667eea);
}

/* =========================================
   EMPTY STATE
   ========================================= */
.es-downloads-empty {
    padding: 2em;
    text-align: center;
    color: var(--ensemble-text-muted, #a0aec0);
    font-style: italic;
}

/* =========================================
   ARCHIVE RESPONSIVE
   ========================================= */
@media (max-width: 600px) {
    .es-downloads-tabs__nav {
        flex-direction: column;
        border-bottom: none;
        gap: 0.25em;
    }
    
    .es-downloads-tabs__tab {
        width: 100%;
        border: 1px solid var(--ensemble-card-border, #e2e8f0);
        border-radius: var(--ensemble-radius, 8px);
        margin-bottom: 0;
    }
    
    .es-downloads-tabs__tab.is-active {
        background: var(--ensemble-primary, #667eea);
        color: var(--ensemble-button-text, #ffffff);
        border-color: var(--ensemble-primary, #667eea);
    }
    
    .es-downloads-accordion__header {
        padding: 0.75em 1em;
    }
    
    .es-downloads-accordion__content {
        padding: 0 1em 1em;
    }
}

