/* Modern SweetAlert2 Theme */

/* Popup container */
.swal2-modern-popup {
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    padding: 2rem !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Title styling */
.swal2-modern-title {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-bottom: 0.5rem !important;
}

/* Text content */
.swal2-modern-text {
    font-size: 1rem !important;
    color: #6b7280 !important;
    line-height: 1.6 !important;
}

/* Icon styling */
.swal2-icon {
    margin: 1.5rem auto 1rem !important;
    border-width: 3px !important;
}

.swal2-icon.swal2-success {
    border-color: #10b981 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.swal2-icon.swal2-error {
    border-color: #ef4444 !important;
}

.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
}

.swal2-icon.swal2-info {
    border-color: #3b82f6 !important;
}

.swal2-icon.swal2-question {
    border-color: #667eea !important;
}

/* Modern button styling */
.swal2-modern-confirm,
.swal2-modern-cancel,
.swal2-modern-deny {
    border-radius: 8px !important;
    padding: 0.75rem 2rem !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    border: none !important;
    cursor: pointer !important;
    min-width: 120px !important;
}

.swal2-modern-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.swal2-modern-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.swal2-modern-confirm:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
}

/* Success variant */
.swal2-modern-confirm.swal2-success-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
}

.swal2-modern-confirm.swal2-success-btn:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}

/* Danger variant */
.swal2-modern-confirm.swal2-danger-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
}

.swal2-modern-confirm.swal2-danger-btn:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}

/* Warning variant */
.swal2-modern-confirm.swal2-warning-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
}

.swal2-modern-confirm.swal2-warning-btn:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4) !important;
}

/* Cancel button */
.swal2-modern-cancel {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    margin-left: 0.5rem !important;
}

.swal2-modern-cancel:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
}

/* Deny button */
.swal2-modern-deny {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    margin-right: 0.5rem !important;
}

.swal2-modern-deny:hover {
    background: #fecaca !important;
    color: #b91c1c !important;
}

/* Timer progress bar */
.swal2-timer-progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;
    height: 4px !important;
}

/* Input fields */
.swal2-input,
.swal2-textarea {
    border-radius: 8px !important;
    border: 2px solid #e5e7eb !important;
    padding: 0.75rem !important;
    font-size: 1rem !important;
    transition: border-color 0.2s ease !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

/* Validation message */
.swal2-validation-message {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border-radius: 8px !important;
    padding: 0.75rem !important;
    font-size: 0.875rem !important;
}

/* Loader */
.swal2-loader {
    border-color: #667eea transparent #667eea transparent !important;
}

/* Actions container */
.swal2-actions {
    margin-top: 1.5rem !important;
    gap: 0.5rem !important;
}

/* Close button */
.swal2-close {
    color: #9ca3af !important;
    font-size: 2rem !important;
    transition: color 0.2s ease !important;
}

.swal2-close:hover {
    color: #374151 !important;
}

/* Backdrop - only for modal dialogs, not toasts */
.swal2-container:not(.swal2-toast-shown) {
    backdrop-filter: blur(4px) !important;
}

/* Toast containers should have no backdrop blur */
.swal2-container.swal2-toast-shown {
    backdrop-filter: none !important;
    background: transparent !important;
}

/* Toast position adjustments */
.swal2-toast {
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Dark mode support - matches application theme with dark cards and cyan accents */
.swal2-popup {
    background: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

.swal2-title {
    color: #17a2b8 !important;
    font-weight: 600 !important;
}

.swal2-html-container {
    color: #e0e0e0 !important;
}

.swal2-icon {
    border-color: #17a2b8 !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #17a2b8 !important;
}

.swal2-icon.swal2-warning {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}

.swal2-icon.swal2-info {
    border-color: #0d6efd !important;
    color: #0d6efd !important;
}

.swal2-icon.swal2-question {
    border-color: #17a2b8 !important;
    color: #17a2b8 !important;
}

/* Confirm button - cyan theme */
.swal2-confirm {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.15) 0%, rgba(23, 162, 184, 0.08) 100%) !important;
    color: #17a2b8 !important;
    border: 2px solid rgba(23, 162, 184, 0.4) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
    transition: all 0.3s ease !important;
}

.swal2-confirm:hover {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.2) 0%, rgba(23, 162, 184, 0.12) 100%) !important;
    border-color: rgba(23, 162, 184, 0.5) !important;
    box-shadow: 0 4px 16px rgba(23, 162, 184, 0.2) !important;
    transform: translateY(-1px) !important;
}

/* Cancel button - dark theme */
.swal2-cancel {
    background: linear-gradient(145deg, #3a3a3a 0%, #2a2a2a 100%) !important;
    color: #e0e0e0 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    transition: all 0.2s ease !important;
}

.swal2-cancel:hover {
    background: linear-gradient(145deg, #4a4a4a 0%, #3a3a3a 100%) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.swal2-input,
.swal2-textarea {
    background: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
    border-color: rgba(23, 162, 184, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1) !important;
}

.swal2-close {
    color: #b8b8b8 !important;
}

.swal2-close:hover {
    color: #ffffff !important;
}

/* Form elements inside modals - ensure readability */
.swal2-popup .form-label {
    color: #e0e0e0 !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
}

.swal2-popup small {
    color: #b0b0b0 !important;
    font-size: 0.875rem !important;
    display: block !important;
    margin-top: 0.25rem !important;
}

.swal2-popup .text-start p {
    color: #e0e0e0 !important;
}

/* Helper/hint text in modals */
.swal2-html-container small,
.swal2-html-container .text-muted,
.swal2-html-container .form-text {
    color: #b0b0b0 !important;
}

/* Ensure spans in labels are visible */
.swal2-popup .form-label span {
    color: #a0a0a0 !important;
}

/* Icons in helper text */
.swal2-popup small i,
.swal2-popup .form-label i {
    color: inherit !important;
}

/* Bootstrap Modal z-index fixes - ensure modals appear above all content */
.modal {
    z-index: 99999 !important;
}

.modal-backdrop {
    z-index: 99998 !important;
}

.modal-dialog {
    z-index: 99999 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .swal2-modern-popup {
        width: 90% !important;
        padding: 1.5rem !important;
    }
    
    .swal2-modern-title {
        font-size: 1.5rem !important;
    }
    
    .swal2-modern-confirm,
    .swal2-modern-cancel,
    .swal2-modern-deny {
        padding: 0.65rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
}
