/* Download Album Modal Styles – glass (matches dashboard / extend modal) */

#downloadAlbumModal.modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

#downloadAlbumModal.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

#downloadAlbumModal .modal-content {
    margin: auto;
    padding: 0;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

/* modalSlideIn animation provided by styles.css */

#downloadAlbumModal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#downloadAlbumModal .modal-header h2 {
    font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

#downloadAlbumModal .close-modal-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

#downloadAlbumModal .close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#downloadAlbumModal .close-modal-btn img {
    filter: brightness(0) invert(1);
}

#downloadAlbumModal .modal-body {
    padding: 24px;
    font-family: var(--font-secondary, 'Inter', sans-serif);
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

#downloadAlbumModal .modal-body > div > p {
    margin-bottom: 20px;
}

/* Pricing Section – glass */
.download-pricing {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

#downloadAlbumModal .pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-family: var(--font-secondary, 'Inter', sans-serif);
    font-size: 14px;
}

#downloadAlbumModal .pricing-row.total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
}

#downloadAlbumModal .pricing-row.available {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    color: rgba(200, 180, 255, 0.95);
}

#downloadAlbumModal .pricing-label {
    color: rgba(255, 255, 255, 0.75);
}

#downloadAlbumModal .pricing-value {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

/* Warning Message */
#downloadAlbumModal .warning-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(211, 47, 47, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    font-size: 14px;
    font-family: var(--font-secondary, 'Inter', sans-serif);
}

#downloadAlbumModal .warning-message img {
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

#downloadAlbumModal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

#downloadAlbumModal .modal-footer .btn-icon {
    background: rgba(255, 255, 255, 0.95);
    color: #1D1B20;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#downloadAlbumModal .modal-footer .btn-icon:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#downloadAlbumModal .modal-footer .btn-icon img,
#downloadAlbumModal .modal-footer .btn-icon svg {
    filter: brightness(0);
}

#downloadAlbumModal .btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    #downloadAlbumModal .modal-content {
        width: 95%;
        max-width: none;
    }

    #downloadAlbumModal .modal-header h2 {
        font-size: 20px;
    }

    #downloadAlbumModal .modal-body {
        font-size: 14px;
        padding: 20px;
    }

    #downloadAlbumModal .modal-footer {
        padding: 16px 20px 20px 20px;
    }

    #downloadAlbumModal .pricing-row {
        font-size: 13px;
    }

    #downloadAlbumModal .pricing-row.total {
        font-size: 15px;
    }
}

/* A big album in parts: one row per ZIP, a button once it is packed. */
.download-parts { display: grid; gap: 8px; margin-top: 14px; }
.download-parts p { margin: 0 0 4px; font-size: 13px; opacity: 0.75; }
.download-part { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }
.download-part__info { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.download-part__info small { font-size: 12px; opacity: 0.65; }
.download-part a.btn-icon { flex-shrink: 0; text-decoration: none; }
.download-part__status { flex-shrink: 0; font-size: 12px; opacity: 0.7; white-space: nowrap; }
