/* SweetAlert2 Custom Theme - Tailwind Indigo */
/* Customized to match website's Tailwind CSS theme */

/* Override popup styling - ONLY for modal dialogs (excluding toasts) */
.swal2-popup:not(.swal2-toast) {
    border-radius: 0.5rem !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    padding: 2rem !important;
}

/* Title styling */
.swal2-popup:not(.swal2-toast) .swal2-title {
    color: #111827 !important; /* gray-900 */
    font-size: 1.25rem !important; /* text-xl */
    font-weight: 600 !important; /* font-semibold */
    margin-bottom: 1rem !important;
}

/* Content/text styling */
.swal2-popup:not(.swal2-toast) .swal2-html-container,
.swal2-popup:not(.swal2-toast) .swal2-content {
    color: #6b7280 !important; /* gray-500 */
    font-size: 0.875rem !important; /* text-sm */
    line-height: 1.5 !important;
}

/* Icon customization */
.swal2-popup:not(.swal2-toast) .swal2-icon.swal2-success {
    border-color: #4f46e5 !important; /* indigo-600 */
}

.swal2-popup:not(.swal2-toast) .swal2-icon.swal2-success [class^=swal2-success-line] {
    background-color: #4f46e5 !important; /* indigo-600 */
}

.swal2-popup:not(.swal2-toast) .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(79, 70, 229, 0.3) !important; /* indigo-600 with opacity */
}

.swal2-popup:not(.swal2-toast) .swal2-icon.swal2-error {
    border-color: #ef4444 !important; /* red-500 */
}

.swal2-popup:not(.swal2-toast) .swal2-icon.swal2-error [class^=swal2-x-mark-line] {
    background-color: #ef4444 !important; /* red-500 */
}

.swal2-popup:not(.swal2-toast) .swal2-icon.swal2-warning {
    border-color: #f59e0b !important; /* amber-500 */
    color: #f59e0b !important;
}

.swal2-popup:not(.swal2-toast) .swal2-icon.swal2-info {
    border-color: #3b82f6 !important; /* blue-500 */
    color: #3b82f6 !important;
}

.swal2-popup:not(.swal2-toast) .swal2-icon.swal2-question {
    border-color: #4f46e5 !important; /* indigo-600 */
    color: #4f46e5 !important;
}

/* Button styling - Tailwind style */
.swal2-styled {
    border-radius: 0.375rem !important; /* rounded-md */
    padding: 0.5rem 1rem !important; /* px-4 py-2 */
    font-size: 0.875rem !important; /* text-sm */
    font-weight: 500 !important; /* font-medium */
    border: none !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.15s ease-in-out !important;
    margin: 0.25rem !important;
}

/* Confirm button - Indigo primary */
.swal2-styled.swal2-confirm {
    background-color: #4f46e5 !important; /* indigo-600 */
    color: white !important;
}

.swal2-styled.swal2-confirm:hover {
    background-color: #4338ca !important; /* indigo-700 */
}

.swal2-styled.swal2-confirm:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4) !important; /* ring-indigo-500 */
}

/* Deny button - Red */
.swal2-styled.swal2-deny {
    background-color: #ef4444 !important; /* red-500 */
    color: white !important;
}

.swal2-styled.swal2-deny:hover {
    background-color: #dc2626 !important; /* red-600 */
}

.swal2-styled.swal2-deny:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4) !important;
}

/* Cancel button - Gray */
.swal2-styled.swal2-cancel {
    background-color: white !important;
    color: #374151 !important; /* gray-700 */
    border: 1px solid #d1d5db !important; /* gray-300 */
}

.swal2-styled.swal2-cancel:hover {
    background-color: #f9fafb !important; /* gray-50 */
}

.swal2-styled.swal2-cancel:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(209, 213, 219, 0.4) !important;
}

/* Actions container */
.swal2-popup:not(.swal2-toast) .swal2-actions {
    gap: 0.5rem !important;
    margin-top: 1.5rem !important;
}

/* Input fields */
.swal2-popup:not(.swal2-toast) .swal2-input,
.swal2-popup:not(.swal2-toast) .swal2-textarea,
.swal2-popup:not(.swal2-toast) .swal2-select,
.swal2-popup:not(.swal2-toast) .swal2-file {
    border: 1px solid #d1d5db !important; /* gray-300 */
    border-radius: 0.375rem !important; /* rounded-md */
    padding: 0.5rem 0.75rem !important; /* py-2 px-3 */
    font-size: 0.875rem !important; /* text-sm */
    color: #111827 !important; /* gray-900 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.swal2-popup:not(.swal2-toast) .swal2-input:focus,
.swal2-popup:not(.swal2-toast) .swal2-textarea:focus,
.swal2-popup:not(.swal2-toast) .swal2-select:focus,
.swal2-popup:not(.swal2-toast) .swal2-file:focus {
    outline: none !important;
    border-color: #4f46e5 !important; /* indigo-500 */
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

.swal2-popup:not(.swal2-toast) .swal2-input::placeholder,
.swal2-popup:not(.swal2-toast) .swal2-textarea::placeholder {
    color: #9ca3af !important; /* gray-400 */
}

/* Validation message */
.swal2-popup:not(.swal2-toast) .swal2-validation-message {
    background-color: #fef2f2 !important; /* red-50 */
    color: #991b1b !important; /* red-800 */
    border-radius: 0.375rem !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
}

/* Close button */
.swal2-popup:not(.swal2-toast) .swal2-close {
    color: #9ca3af !important; /* gray-400 */
    font-size: 1.5rem !important;
    transition: color 0.15s ease-in-out !important;
}

.swal2-popup:not(.swal2-toast) .swal2-close:hover {
    color: #6b7280 !important; /* gray-500 */
}

.swal2-popup:not(.swal2-toast) .swal2-close:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Backdrop */
.swal2-container.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.4) !important;
}

/* Loading spinner */
.swal2-popup:not(.swal2-toast) .swal2-loader {
    border-color: #4f46e5 transparent #4f46e5 transparent !important; /* indigo-600 */
}

/* Timer progress bar */
.swal2-popup:not(.swal2-toast) .swal2-timer-progress-bar {
    background: #4f46e5 !important; /* indigo-600 */
}

/* Progress steps */
.swal2-popup:not(.swal2-toast) .swal2-progress-steps .swal2-progress-step {
    background: #4f46e5 !important; /* indigo-600 */
}

.swal2-popup:not(.swal2-toast) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step {
    background: #4338ca !important; /* indigo-700 */
}

.swal2-popup:not(.swal2-toast) .swal2-progress-steps .swal2-progress-step-line {
    background: #d1d5db !important; /* gray-300 */
}

/* Footer */
.swal2-popup:not(.swal2-toast) .swal2-footer {
    border-top: 1px solid #e5e7eb !important; /* gray-200 */
    color: #6b7280 !important; /* gray-500 */
    font-size: 0.75rem !important; /* text-xs */
    padding-top: 1rem !important;
    margin-top: 1rem !important;
}

/* Animations */
.swal2-popup:not(.swal2-toast).swal2-show {
    animation: swal2-show 0.2s ease-out !important;
}

.swal2-popup:not(.swal2-toast).swal2-hide {
    animation: swal2-hide 0.15s ease-in !important;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .swal2-popup:not(.swal2-toast) {
        padding: 1.5rem !important;
        width: 90% !important;
    }
    
    .swal2-popup:not(.swal2-toast) .swal2-title {
        font-size: 1.125rem !important;
    }
    
    .swal2-popup:not(.swal2-toast) .swal2-actions {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .swal2-popup:not(.swal2-toast) .swal2-styled {
        width: 100% !important;
        margin: 0.25rem 0 !important;
    }
}
