/* ============================================
   SweetAlert2 Custom Styles
   ============================================ */

/* Gradient buttons for Swal */
.swal-btn-gradient-green {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border: none !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
}

.swal-btn-gradient-green:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

.swal-btn-gradient-red {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
    border: none !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
}

.swal-btn-gradient-red:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}

.swal-btn-gradient-gray {
    background: linear-gradient(135deg, #9ca3af, #6b7280) !important;
    color: white !important;
    border: none !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
}

.swal-btn-gradient-gray:hover {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4) !important;
}

.swal-btn-gradient-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
    border: none !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
}

.swal-btn-gradient-blue:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4) !important;
}

.swal-popup-rounded {
    border-radius: 1rem !important;
    padding: 1.5rem !important;
}

/* Toast notifications styling */
.swal-toast-rounded {
    border-radius: 0.75rem !important;
}

/* ============================================
   Dark Mode Support
   ============================================ */

[data-bs-theme="dark"] .swal2-popup {
    background: #1f2937 !important;
    color: #f9fafb !important;
}

[data-bs-theme="dark"] .swal2-title {
    color: #f9fafb !important;
}

[data-bs-theme="dark"] .swal2-html-container {
    color: #d1d5db !important;
}

[data-bs-theme="dark"] .swal2-input,
[data-bs-theme="dark"] .swal2-textarea,
[data-bs-theme="dark"] .swal2-select {
    background: #374151 !important;
    color: #f9fafb !important;
    border: 1px solid #4b5563 !important;
}

[data-bs-theme="dark"] .swal2-input:focus,
[data-bs-theme="dark"] .swal2-textarea:focus,
[data-bs-theme="dark"] .swal2-select:focus {
    border-color: #6b7280 !important;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1) !important;
}

[data-bs-theme="dark"] .swal2-validation-message {
    background: #374151 !important;
    color: #fca5a5 !important;
}

[data-bs-theme="dark"] .swal2-close {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .swal2-close:hover {
    color: #f9fafb !important;
}

[data-bs-theme="dark"] .swal2-html-container .form-control,
[data-bs-theme="dark"] .swal2-html-container .form-select {
    background: #374151 !important;
    color: #f9fafb !important;
    border: 1px solid #4b5563 !important;
}

[data-bs-theme="dark"] .swal2-html-container .form-control:focus,
[data-bs-theme="dark"] .swal2-html-container .form-select:focus {
    border-color: #6b7280 !important;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1) !important;
}

[data-bs-theme="dark"] .swal2-html-container .form-label {
    color: #d1d5db !important;
}

/* Toast in dark mode */
[data-bs-theme="dark"] .swal2-toast {
    background: #1f2937 !important;
    color: #f9fafb !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

/* ============================================
   Mobile Responsive Styles
   ============================================ */

@media (max-width: 768px) {
    .swal2-popup {
        width: calc(100vw - 2rem) !important;
        max-width: calc(100vw - 2rem) !important;
        margin: 0 1rem !important;
        padding: 1.25rem !important;
    }
    
    /* Toast notifications on mobile */
    .swal2-toast {
        width: calc(100vw - 2rem) !important;
        max-width: calc(100vw - 2rem) !important;
        margin: 0.5rem 1rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    .swal2-toast .swal2-icon {
        margin: 0 0.5rem 0 0 !important;
    }
    
    .swal-popup-rounded {
        padding: 1.25rem !important;
    }
    
    .swal2-title {
        font-size: 1.25rem !important;
        padding: 0 0 1rem 0 !important;
    }
    
    .swal2-html-container {
        font-size: 0.9rem !important;
        padding: 0 !important;
    }
    
    .swal2-actions {
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }
    
    .swal-btn-gradient-green,
    .swal-btn-gradient-red,
    .swal-btn-gradient-gray,
    .swal-btn-gradient-blue {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
        flex: 1 1 auto !important;
        min-width: 100px !important;
    }
}

@media (max-width: 576px) {
    .swal2-popup {
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
        margin: 0 0.5rem !important;
        padding: 1rem !important;
    }
    
    .swal-popup-rounded {
        padding: 1rem !important;
    }
    
    /* Toast notifications on small mobile */
    .swal2-toast {
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
        margin: 0.5rem 0.5rem !important;
        padding: 0.75rem 0.875rem !important;
        font-size: 0.875rem !important;
    }
    
    .swal2-toast .swal2-title {
        font-size: 0.875rem !important;
        margin: 0 !important;
    }
    
    .swal2-toast .swal2-icon {
        width: 1.5rem !important;
        height: 1.5rem !important;
        margin: 0 0.375rem 0 0 !important;
    }
    
    .swal2-title {
        font-size: 1.125rem !important;
        padding: 0 0 0.75rem 0 !important;
    }
    
    .swal2-html-container {
        font-size: 0.85rem !important;
    }
    
    .swal2-html-container .form-control,
    .swal2-html-container .form-select {
        font-size: 0.875rem !important;
        padding: 0.5rem !important;
    }
    
    .swal2-html-container .form-label {
        font-size: 0.875rem !important;
        margin-bottom: 0.375rem !important;
    }
    
    .swal2-actions {
        gap: 0.5rem !important;
        margin-top: 1rem !important;
        flex-direction: row !important;
    }
    
    .swal-btn-gradient-green,
    .swal-btn-gradient-red,
    .swal-btn-gradient-gray,
    .swal-btn-gradient-blue {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: auto !important;
    }
}
