/* Download Report Modal Styles */
.download-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.download-modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.download-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.download-modal-header {
    background: black;
    color: rgb(254, 221, 72);
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.download-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.download-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.download-modal-body {
    padding: 24px 24px;
}

.download-modal-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.download-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.download-form-row .download-form-group {
    flex: 1;
    margin-bottom: 0;
}

.download-form-group {
    margin-bottom: 20px;
}

.download-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.download-form-group label .required {
    color: #e74c3c;
    margin-left: 2px;
}

.download-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    font-family: inherit;
}

.download-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.download-form-group input.error {
    border-color: #e74c3c;
}

.download-form-group .error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.download-form-group input.error + .error-message {
    display: block;
}

.download-modal-footer {
    padding: 0 24px 20px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.download-modal-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.download-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.download-modal-btn-cancel {
    background-color: #f5f5f5;
    color: #666;
}

.download-modal-btn-cancel:hover:not(:disabled) {
    background-color: #e0e0e0;
}

.download-modal-btn-submit {
    background: rgb(254, 221, 72);
    color: rgb(20, 20, 20);
    min-width: 160px;
}

.download-modal-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.download-modal-btn-submit.loading {
    position: relative;
    color: transparent;
}

.download-modal-btn-submit.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .download-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .download-form-row .download-form-group {
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    .download-modal {
        width: 95%;
        margin: 10px;
    }
    
    .download-modal-header {
        padding: 18px;
    }
    
    .download-modal-header h2 {
        font-size: 18px;
    }
    
    .download-modal-body {
        padding: 20px 18px;
    }
    
    .download-modal-footer {
        flex-direction: column;
        padding: 0 18px 18px 18px;
    }
    
    .download-modal-btn {
        width: 100%;
    }
}

