/* Unsaved Changes Modal Styles */

.unsaved-changes-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.unsaved-changes-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    margin: 20px;
    animation: modalSlideIn 0.2s ease-out;
}

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

.unsaved-changes-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.unsaved-changes-icon {
    color: #f59e0b;
    font-size: 24px;
    font-variation-settings: 'FILL' 1;
}

.unsaved-changes-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.unsaved-changes-body {
    padding: 20px 24px;
}

.unsaved-changes-body p {
    margin: 0 0 12px 0;
    color: #4b5563;
    line-height: 1.5;
    font-size: 14px;
}

.unsaved-changes-body p:last-child {
    margin-bottom: 0;
    font-weight: 500;
    color: #374151;
}

.unsaved-changes-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px 24px;
    justify-content: flex-end;
}

.unsaved-changes-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.button-cancel {
    background-color: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.button-cancel:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.button-cancel:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    ring-offset: 2px;
    box-shadow: 0 0 0 2px #3b82f6;
}

.button-leave {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
}

.button-leave:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

.button-leave:focus {
    outline: none;
    box-shadow: 0 0 0 2px #fca5a5;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive design */
@media (max-width: 480px) {
    .unsaved-changes-modal {
        width: 95%;
        margin: 10px;
    }
    
    .unsaved-changes-header,
    .unsaved-changes-body,
    .unsaved-changes-actions {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .unsaved-changes-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .unsaved-changes-actions button {
        width: 100%;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .unsaved-changes-modal {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .unsaved-changes-header {
        border-bottom-color: #374151;
    }
    
    .unsaved-changes-header h3 {
        color: #f9fafb;
    }
    
    .unsaved-changes-body p {
        color: #d1d5db;
    }
    
    .unsaved-changes-body p:last-child {
        color: #e5e7eb;
    }
    
    .button-cancel {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .button-cancel:hover {
        background-color: #4b5563;
        border-color: #6b7280;
    }
}