/* Download Page Styles */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--dark-bg-2);
    border-radius: var(--border-radius);
    border: 1px solid var(--dark-border);
}

.info-item .material-icons-outlined {
    color: var(--dark-accent-primary);
}

.file-list {
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.file-item {
    padding: 1rem;
    background: var(--dark-bg-2);
    border-bottom: 1px solid var(--dark-border);
    transition: all 0.3s ease;
}

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

.file-item:hover {
    background: var(--dark-bg-3);
}

.file-item h6 {
    color: var(--dark-text-primary);
    font-weight: 500;
}

/* E2E Encryption Support */

/* Password Prompt */
#passwordPrompt {
    background: var(--dark-bg-2);
    border: 2px solid var(--dark-accent-primary);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    animation: slideDown 0.3s ease-out;
}

#passwordPrompt h4 {
    color: var(--dark-text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#passwordPrompt h4 .material-icons-outlined {
    color: var(--dark-accent-primary);
}

#passwordPrompt .form-control {
    background: var(--dark-bg-1);
    border: 1px solid var(--dark-border);
    color: var(--dark-text-primary);
    padding: 0.75rem 1rem;
    font-family: 'Courier New', monospace;
}

#passwordPrompt .form-control:focus {
    border-color: var(--dark-accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#passwordPrompt .btn {
    padding: 0.75rem 2rem;
    font-weight: 500;
}

/* Decryption Progress */
#decryptionProgress {
    background: var(--dark-bg-2);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    animation: slideDown 0.3s ease-out;
}

#decryptionProgress h4 {
    color: var(--dark-text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#decryptionProgress h4 .material-icons-outlined {
    color: var(--dark-accent-primary);
    animation: spin 2s linear infinite;
}

#decryptionProgress .progress {
    height: 30px;
    background: var(--dark-bg-1);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

#decryptionProgress .progress-bar {
    background: linear-gradient(90deg,
        var(--dark-accent-primary),
        var(--dark-accent-success)
    );
    background-size: 200% 100%;
    animation: progressGradient 2s ease-in-out infinite;
    transition: width 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes progressGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

#decryptStatus {
    color: var(--dark-text-secondary);
    font-size: 0.95rem;
}

/* Encrypted File Badge */
.file-item .badge.bg-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.file-item .badge.bg-success .material-icons-outlined {
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* Decrypted filename styling */
.file-item .decrypted {
    animation: fadeIn 0.5s ease-out;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Alert container */
#e2e-alerts {
    margin-bottom: 1rem;
}

#e2e-alerts .alert {
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

/* Crypto not supported warning */
.crypto-not-supported {
    background: var(--dark-bg-2);
    border: 2px solid var(--dark-accent-danger);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
}

.crypto-not-supported h4 {
    color: var(--dark-accent-danger);
    margin-bottom: 1rem;
}

.crypto-not-supported p {
    color: var(--dark-text-secondary);
    margin-bottom: 0.5rem;
}

/* Loading spinner for unlock button */
.btn .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
    margin-right: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #passwordPrompt,
    #decryptionProgress {
        padding: 1.5rem;
    }

    #passwordPrompt .btn {
        width: 100%;
    }
}