/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none; /* Allow clicking through container area */
}

.toast {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid #e5e7eb;
    font-weight: 500;
    color: #374151;
    pointer-events: auto;
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast i { font-size: 18px; }

.toast-success { border-left-color: #10b981; }
.toast-success i { color: #10b981; }

.toast-error { border-left-color: #ef4444; }
.toast-error i { color: #ef4444; }

.toast-warning { border-left-color: #f59e0b; }
.toast-warning i { color: #f59e0b; }

.toast-info { border-left-color: #3b82f6; }
.toast-info i { color: #3b82f6; }

/* Button Feedback */
.btn-success-feedback {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
    transition: all 0.3s ease !important;
}

/* Modal Overlay (Modern Backdrop) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4); /* Softer dark overlay */
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease-out;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Content (Clean Card Style) */
.modal-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.95) translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

/* Icon Styling */
.modal-icon-wrapper {
    margin-bottom: 20px;
}

.modal-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal-icon-circle {
    transform: scale(1);
    animation: iconPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes iconPop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Icon Colors */
.modal-icon-circle.success { background: #dcfce7; color: #16a34a; }
.modal-icon-circle.warning { background: #fef3c7; color: #d97706; }
.modal-icon-circle.danger { background: #fee2e2; color: #dc2626; }
.modal-icon-circle.info { background: #dbeafe; color: #2563eb; }

/* Text Content */
.modal-text-content {
    margin-bottom: 28px;
    width: 100%;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.modal-message {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Action Buttons */
.modal-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-btn.primary {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.modal-btn.primary:hover {
    background: #2563eb;
    box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.modal-btn.secondary {
    background: white;
    color: #374151;
    border-color: #d1d5db;
}

.modal-btn.secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

/* Specific button colors based on modal type context - optional override */
[data-type="danger"] .modal-btn.primary {
    background: #ef4444;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}
[data-type="danger"] .modal-btn.primary:hover {
    background: #dc2626;
    box-shadow: 0 6px 8px -1px rgba(239, 68, 68, 0.3);
}

[data-type="success"] .modal-btn.primary {
    background: #10b981;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}
[data-type="success"] .modal-btn.primary:hover {
    background: #059669;
}

/* Loading Spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .modal-content {
        width: 85%;
        padding: 24px;
    }
    
    .modal-buttons {
        flex-direction: column-reverse; /* Put cancel button at bottom on mobile */
    }
    
    .modal-btn {
        width: 100%;
        padding: 12px;
    }
}
