/* SndCore Player - Downloads Styles */

.product-downloads::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px; /* match neon player accent */
    background: linear-gradient(90deg, #00ffff, #ff00ff, #ffff00, #00ffff);
    background-size: 200% 100%;
    animation: neon-flow 3s linear infinite;
}

/* match the neon player accent animation */
@keyframes neon-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.product-downloads {
    margin-bottom: 2em;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(25, 25, 25, 0.95));
    color: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

.product-downloads h3.bluu-text {
    margin: 0; /* flush with image top */
    color: #ffffff !important; /* title in white */
    font-size: 2.15em; /* bigger title */
}

.product-downloads h3.bluu-text a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.product-downloads h3.bluu-text a:hover,
.product-downloads h3.bluu-text a:focus-visible {
    color: #00ffff !important; /* subtle neon hint on hover/focus */
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
    text-decoration: underline !important; /* clear affordance */
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.product-downloads h3.bluu-text a:focus-visible {
    outline: 2px solid rgba(0, 255, 255, 0.6);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Layout for top row */
.downloads-row {
    display: flex;
    align-items: stretch; /* left column matches art height */
    justify-content: space-between;
}

.download-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.download-art {
    max-width: 140px;
    max-height: 140px;
    margin-left: 1.5em;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    object-fit: cover;
    align-self: flex-start;
}

/* Flex row spacing */
.product-downloads > div:first-child { /* the row with image/buttons */
    margin-bottom: 8px;
}

.download-info {
    margin: 8px 0 0 0;
    font-size: 0.9em;
    color: #999;
    display: flex;
    gap: 1.5em;
}

.download-all-wrapper {
    margin-top: auto; /* push controls to bottom to align with artwork */
    padding-top: 8px; /* visual separation from title */
    padding: 0;
    border-bottom: 0;
    display: flex;
    align-items: flex-end; /* bottom-align dropdown and folder icon */
    gap: 15px;
    flex-wrap: wrap;
}

.download-all-wrapper > div {
    flex: 1;
    min-width: 200px;
}

.download-dropdown {
    position: relative;
    display: inline-block;
}

.download-all-files {
    cursor: pointer;
    background: #2271b1 !important;
    color: #fff !important;
    border: none !important;
}

.download-all-files:hover {
    background: #135e96 !important;
}

.download-format-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 10;
    background: #181818;
    border: 1px solid #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    min-width: 180px;
    margin-top: 0;
    padding: 0.5em 0;
}

.download-dropdown.open .download-format-menu,
.download-dropdown:hover .download-format-menu,
.download-dropdown:focus-within .download-format-menu {
    display: block;
}

.download-format-menu a,
.format-option {
    text-decoration: none !important;
}

.download-format-menu a {
    display: block;
    padding: 0.5em 1em;
    color: #f5f5f5;
    white-space: nowrap;
   
}

.download-format-menu a.alacti-text {
    font-family: 'Alacti', sans-serif !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
}

.download-format-menu a:hover {
    background: #222;
    color: #ffd700;
}

.format-option {
    display: block;
    padding: 8px 15px;
    color: #e0e0e0;
    transition: all 0.2s ease;
}

.format-option:hover {
    background: #252525;
    color: #fff;
}

.download-all-files .spinner {
    display: none; /* hidden by default; shown when loading */
    border: 2px solid #f3f3f3;
    border-top: 2px solid #555;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

.download-all-files.loading .spinner,
.download-all-files[aria-busy="true"] .spinner {
    display: inline-block;
}

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


.expand-button{
    padding: 8px 12px;
    margin: 0;
    background: transparent;
    border: 2px solid rgba(0, 0, 0, 0);
    color: #ccc;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
    align-self: flex-end; /* match bottom alignment to divider */
    order: -1;
}

/* Divider below the row */
.product-downloads .download-divider {
    border-bottom: 1px solid #333;
    margin: 0 0 6px 0;
}

.expand-button:hover {
    border: 2px solid #7F54B3;
    color: #7F54B3;
    background: rgba(127, 84, 179, 0.1);
}



.download-files {
    list-style: none;
    margin: 1em 0 0 0;
    padding: 0;
    display: grid;
    gap: 0.5em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.download-file a {
    display: block;
    padding: 0.5em;
    background: #252525;
    border-radius: 3px;
    color: #ccc;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 1px solid #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    min-width: 0;
}

.download-file a:hover {
    background: #333;
    color: #fff;
    border-color: #444;
}

.download-file a.converting {
    background: #2271b1;
    color: #fff;
    cursor: wait;
}

.download-file a.error {
    background: #dc3232;
    color: #fff;
    cursor: pointer;
}

.download-file a.error:hover {
    background: #b32d2d;
}

.download-file a.success {
    background: #46b450;
    color: #fff;
    cursor: default;
}

.product-content {
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.3s;
}

.product-content.expanded {
    max-height: none;
}

/* Format generation states */
.format-option.format-generating {
    opacity: 0.7;
    color: #ffa500 !important;
}

.generating-indicator {
    font-style: italic;
    color: #ffa500;
    font-size: 0.85em;
}

.format-option.format-generating:hover {
    background: #2a2a1a !important;
    cursor: wait;
}

/* Mobile tweaks: clamp title size and lines to avoid wrapping over controls */
@media (max-width: 768px) {
    .product-downloads h3.bluu-text {
        font-size: clamp(1.1rem, 4.5vw, 1.6rem);
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2; /* show up to 2 lines on mobile */
        line-clamp: 2;
        overflow: hidden;
    }
}
