/* Body no-scroll class */
body.modal-open {
    overflow: hidden;
}

.download-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.download-modal-overlay.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Download Modal Container */
.download-modal-container {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Download Modal Overlay */
.download-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.download-modal-overlay.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Download Modal Container */
.download-modal-container {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Download Modal Header */
.download-modal-header {
    padding: 32px 40px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    border-bottom: none;
}

.download-modal-title {
    color: #191818;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 28px;

    margin: 0 0 0 18px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-align: left;
}

.download-modal-back {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 24px;
    transition: opacity 0.2s ease;
}

.download-modal-back:hover {
    opacity: 0.7;
}

.download-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 24px;
    transition: opacity 0.2s ease;
}

.download-modal-close:hover {
    opacity: 0.7;
}

.download-modal-back svg,
.download-modal-close svg {
    width: 20px;
    height: 20px;
}

/* Download Modal Body */
.download-modal-body {
    padding: 0 40px 40px;
    overflow-y: auto;
    flex: 1;
}

/* File List */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* File Item Button */
.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    border: 1px solid #DCDBDA;
    border-radius: 16px;
    background: #FAF9F8;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    min-height: 88px;
    position: relative;
}

.file-item:hover {
    background: #F0F0F0;
    border-color: #D0D0D0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Download Icon Circle */
.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.file-icon svg {
    width: 24px;
    height: 24px;
}

/* File Text */
.file-text {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.file-name {
    color: #191818;
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 300;
    line-height: 26px;

    margin: 0;
}

.file-details {
    font-size: 16px;
    color: #25211F;
    font-weight: 300;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .download-modal-container {
        max-width: calc(100% - 32px);
    }

    .download-modal-header {
        padding: 28px 32px;
    }

    .download-modal-title {
        font-size: 22px;
    }

    .download-modal-body {
        padding: 0 32px 32px;
    }

    .file-item {
        padding: 28px 20px;
    }

    .file-name {
        font-size: 17px;
    }

    .file-details {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .download-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .download-modal-container {
        border-radius: 24px 24px 0 0;
        margin: 0;
        max-height: 85vh;
        width: 100%;
        max-width: 100%;
        animation: slideUpMobile 0.3s ease;
    }

    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .download-modal-header {
        padding: 24px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        border-radius: 24px 24px 0 0;
    }

    .download-modal-title {
        font-size: 20px;
    }

    .download-modal-body {
        padding: 0 20px 24px;
    }

    .file-item {
        padding: 24px 16px;
        min-height: 100px;
    }

    .file-icon {
        width: 36px;
        height: 36px;
    }

    .file-icon svg {
        width: 16px;
        height: 16px;
    }

    .file-name {
        font-size: 16px;
    }

    .file-details {
        font-size: 14px;
    }
}

/* Body no-scroll */
body.download-modal-open {
    overflow: hidden;
}