/* ============================================
   Flowly  - Modal Styles
   Export and Load dialogs
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
}

/* Export Options */
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
}

.export-option {
    background: var(--surface-hover);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    text-align: center;
}

.export-option:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.export-option i {
    font-size: 36px;
    margin-bottom: var(--spacing-xs);
}

.export-option span {
    font-size: 16px;
    font-weight: 600;
}

.export-option small {
    font-size: 12px;
    opacity: 0.8;
}

/* Saved Projects */
.saved-projects {
    margin-bottom: var(--spacing-lg);
}

.project-item {
    background: var(--surface-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.project-info {
    flex: 1;
}

.project-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: var(--spacing-xs);
}

.project-date {
    font-size: 12px;
    opacity: 0.7;
}

.project-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.project-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.project-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.project-item:hover .project-btn {
    background: rgba(255, 255, 255, 0.2);
}

.project-item:hover .project-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.no-projects {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.no-projects i {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
    opacity: 0.3;
}

.no-projects p {
    font-size: 14px;
}

/* Load File Section */
.load-file-section {
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.load-file-section p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive Modal */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .export-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
}
