/* ===================================
   SWEETALERT CUSTOM STYLES
   The Hive Dashboard Theme
   ================================= */

/* ===================================
   SWEETALERT CONTAINER & BACKDROP
   ================================= */

.swal2-container {
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 9999 !important;
    padding: 1rem !important;
}

.swal2-container.swal2-backdrop-show {
    animation: swal2-backdrop-show 0.3s ease !important;
}

.swal2-container.swal2-backdrop-hide {
    animation: swal2-backdrop-hide 0.3s ease !important;
}

/* ===================================
   SWEETALERT POPUP MODAL
   ================================= */

.swal2-popup {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-lg) !important;
    backdrop-filter: blur(20px) !important;
    padding: 2rem !important;
    width: auto !important;
    max-width: 500px !important;
    min-width: 400px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    animation: swal2-popup-show 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.swal2-popup.swal2-show {
    transform: scale(1) !important;
    opacity: 1 !important;
}

.swal2-popup.swal2-hide {
    transform: scale(0.9) !important;
    opacity: 0 !important;
    animation: swal2-popup-hide 0.3s ease !important;
}

/* ===================================
   SWEETALERT HEADER & TITLE
   ================================= */

.swal2-header {
    padding: 0 0 1.5rem 0 !important;
    border-bottom: none !important;
    text-align: center !important;
}

.swal2-title {
    color: var(--text-primary) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

/* ===================================
   SWEETALERT ICONS
   ================================= */

.swal2-icon {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 1.5rem auto !important;
    border: none !important;
    border-radius: 50% !important;
    animation: swal2-icon-show 0.5s ease !important;
}

/* Success Icon */
.swal2-icon.swal2-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3) !important;
}

.swal2-success-circular-line-left,
.swal2-success-circular-line-right {
    background-color: transparent !important;
}

.swal2-success-fix {
    background-color: transparent !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: white !important;
    border-radius: 2px !important;
    height: 4px !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'][class$='tip'] {
    width: 25px !important;
    left: 14px !important;
    top: 46px !important;
    transform: rotate(45deg) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'][class$='long'] {
    width: 47px !important;
    right: 8px !important;
    top: 38px !important;
    transform: rotate(-45deg) !important;
}

/* Error Icon */
.swal2-icon.swal2-error {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3) !important;
}

.swal2-icon.swal2-error .swal2-x-mark {
    position: relative !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: white !important;
    width: 4px !important;
    height: 47px !important;
    border-radius: 2px !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] {
    left: 38px !important;
    top: 17px !important;
    transform: rotate(45deg) !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] {
    right: 38px !important;
    top: 17px !important;
    transform: rotate(-45deg) !important;
}

/* Warning Icon */
.swal2-icon.swal2-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3) !important;
    color: white !important;
    font-size: 60px !important;
    line-height: 80px !important;
}

.swal2-icon.swal2-warning .swal2-icon-content {
    color: white !important;
    font-size: 60px !important;
    font-weight: 700 !important;
}

/* Info Icon */
.swal2-icon.swal2-info {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3) !important;
    color: white !important;
    font-size: 60px !important;
    line-height: 80px !important;
}

.swal2-icon.swal2-info .swal2-icon-content {
    color: white !important;
    font-size: 60px !important;
    font-weight: 700 !important;
}

/* Question Icon */
.swal2-icon.swal2-question {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3) !important;
    color: white !important;
    font-size: 60px !important;
    line-height: 80px !important;
}

.swal2-icon.swal2-question .swal2-icon-content {
    color: white !important;
    font-size: 60px !important;
    font-weight: 700 !important;
}

/* ===================================
   SWEETALERT CONTENT
   ================================= */

.swal2-content {
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

/* ===================================
   SWEETALERT INPUTS
   ================================= */

.swal2-input,
.swal2-textarea {
    width: 100% !important;
    padding: 0.875rem 1rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    margin: 1rem 0 0 0 !important;
    box-sizing: border-box !important;
}

.swal2-input::placeholder,
.swal2-textarea::placeholder {
    color: var(--text-muted) !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    background: var(--bg-primary) !important;
}

.swal2-select {
    width: 100% !important;
    padding: 0.875rem 1rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    margin: 1rem 0 0 0 !important;
}

.swal2-checkbox,
.swal2-radio {
    margin: 1rem 0 0 0 !important;
}

.swal2-checkbox label,
.swal2-radio label {
    color: var(--text-primary) !important;
    font-size: 0.95rem !important;
}

/* ===================================
   SWEETALERT VALIDATION MESSAGE
   ================================= */

.swal2-validation-message {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    border-radius: 6px !important;
    color: #dc2626 !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0.5rem 0 0 0 !important;
    font-size: 0.85rem !important;
    animation: swal2-validation-show 0.3s ease !important;
}

.swal2-validation-message::before {
    content: '\f071' !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    margin-right: 0.5rem !important;
}

/* ===================================
   SWEETALERT ACTIONS (BUTTONS)
   ================================= */

.swal2-actions {
    margin: 2rem 0 0 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
}

.swal2-styled {
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    min-width: 120px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    font-family: inherit !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Confirm Button */
.swal2-confirm {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.swal2-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

.swal2-confirm:active {
    transform: translateY(0) !important;
}

.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

/* Cancel Button */
.swal2-cancel {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.swal2-cancel:hover {
    background: var(--bg-tertiary) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--border-hover) !important;
}

.swal2-cancel:active {
    transform: translateY(0) !important;
}

.swal2-cancel:focus {
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.3) !important;
}

/* Deny Button */
.swal2-deny {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.swal2-deny:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}

.swal2-deny:active {
    transform: translateY(0) !important;
}

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

/* ===================================
   SWEETALERT LOADING STATE
   ================================= */

.swal2-loading .swal2-styled {
    cursor: wait !important;
    opacity: 0.7 !important;
    transform: none !important;
}

.swal2-loading .swal2-styled:hover {
    transform: none !important;
}

/* Loading Spinner */
.swal2-loader {
    color: var(--primary-color) !important;
    border-color: transparent var(--primary-color) var(--primary-color) var(--primary-color) !important;
    animation: swal2-loader-spin 1s linear infinite !important;
}

/* ===================================
   SWEETALERT PROGRESS BAR
   ================================= */

.swal2-progress-steps {
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 0.5rem !important;
}

.swal2-progress-step {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: var(--bg-secondary) !important;
    border: 2px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.swal2-progress-step.swal2-active-progress-step {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
}

/* ===================================
   SWEETALERT TIMER PROGRESS BAR
   ================================= */

.swal2-timer-progress-bar-container {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: var(--bg-tertiary) !important;
    border-radius: 0 0 16px 16px !important;
    overflow: hidden !important;
}

.swal2-timer-progress-bar {
    height: 100% !important;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color)) !important;
    transition: width 0.1s ease !important;
}

/* ===================================
   SWEETALERT TOAST STYLES
   ================================= */

.swal2-toast-shown {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-lg) !important;
    backdrop-filter: blur(20px) !important;
    color: var(--text-primary) !important;
    font-family: inherit !important;
}

.swal2-toast-shown .swal2-title {
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
}

.swal2-toast-shown .swal2-html-container {
    color: var(--text-secondary) !important;
    font-size: 0.9rem !important;
}

.swal2-toast-shown .swal2-icon {
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 32px !important;
}

/* ===================================
   SWEETALERT CLOSE BUTTON
   ================================= */

.swal2-close {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    width: 32px !important;
    height: 32px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    color: var(--text-secondary) !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.swal2-close:hover {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.swal2-close:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.3) !important;
}

/* ===================================
   SWEETALERT ANIMATIONS
   ================================= */

@keyframes swal2-backdrop-show {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes swal2-backdrop-hide {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes swal2-popup-show {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes swal2-popup-hide {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.7) translateY(-20px);
    }
}

@keyframes swal2-icon-show {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes swal2-validation-show {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes swal2-loader-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   SWEETALERT DARK THEME SUPPORT
   ================================= */

[data-theme="dark"] .swal2-popup {
    background: rgba(30, 41, 59, 0.98) !important;
    backdrop-filter: blur(30px) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .swal2-toast-shown {
    background: rgba(30, 41, 59, 0.98) !important;
    backdrop-filter: blur(30px) !important;
}

[data-theme="dark"] .swal2-input,
[data-theme="dark"] .swal2-textarea,
[data-theme="dark"] .swal2-select {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .swal2-input:focus,
[data-theme="dark"] .swal2-textarea:focus,
[data-theme="dark"] .swal2-select:focus {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .swal2-timer-progress-bar-container {
    background: rgba(51, 65, 85, 0.5) !important;
}

/* ===================================
   SWEETALERT RTL SUPPORT
   ================================= */

[dir="rtl"] .swal2-popup {
    text-align: right !important;
}

[dir="rtl"] .swal2-title {
    text-align: center !important;
}

[dir="rtl"] .swal2-html-container {
    text-align: center !important;
}

[dir="rtl"] .swal2-close {
    left: 1rem !important;
    right: auto !important;
}

[dir="rtl"] .swal2-actions {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .swal2-progress-steps {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .swal2-validation-message::before {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* ===================================
   SWEETALERT RESPONSIVE DESIGN
   ================================= */

/* Tablet Styles */
@media (max-width: 1024px) {
    .swal2-popup {
        min-width: 350px !important;
        padding: 1.5rem !important;
    }
    
    .swal2-actions {
        gap: 0.5rem !important;
    }
    
    .swal2-styled {
        min-width: 100px !important;
        padding: 0.625rem 1.25rem !important;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .swal2-container {
        padding: 0.5rem !important;
    }
    
    .swal2-popup {
        min-width: 280px !important;
        max-width: calc(100vw - 2rem) !important;
        padding: 1.25rem !important;
        border-radius: 12px !important;
        margin: 0 !important;
    }
    
    .swal2-title {
        font-size: 1.25rem !important;
    }
    
    .swal2-html-container {
        font-size: 0.9rem !important;
    }
    
    .swal2-icon {
        width: 60px !important;
        height: 60px !important;
        margin: 0 auto 1rem auto !important;
        font-size: 40px !important;
        line-height: 60px !important;
    }
    
    .swal2-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin: 1.5rem 0 0 0 !important;
    }
    
    .swal2-styled {
        width: 100% !important;
        min-width: auto !important;
        padding: 0.75rem 1rem !important;
    }
    
    .swal2-input,
    .swal2-textarea,
    .swal2-select {
        padding: 0.75rem !important;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .swal2-popup {
        min-width: 260px !important;
        padding: 1rem !important;
        border-radius: 8px !important;
    }
    
    .swal2-title {
        font-size: 1.125rem !important;
    }
    
    .swal2-html-container {
        font-size: 0.85rem !important;
    }
    
    .swal2-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 32px !important;
        line-height: 50px !important;
    }
    
    .swal2-close {
        top: 0.75rem !important;
        right: 0.75rem !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 1rem !important;
    }
    
    [dir="rtl"] .swal2-close {
        left: 0.75rem !important;
        right: auto !important;
    }
}

/* ===================================
   SWEETALERT ACCESSIBILITY
   ================================= */

.swal2-popup:focus {
    outline: none !important;
}

.swal2-styled:focus {
    outline: none !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .swal2-popup {
        border-width: 2px !important;
    }
    
    .swal2-styled {
        border-width: 2px !important;
    }
    
    .swal2-input,
    .swal2-textarea,
    .swal2-select {
        border-width: 2px !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .swal2-popup,
    .swal2-container,
    .swal2-icon,
    .swal2-styled,
    .swal2-timer-progress-bar {
        animation: none !important;
        transition: none !important;
    }
}

/* ===================================
   SWEETALERT CUSTOM VARIANTS
   ================================= */

/* Success Variant */
.swal2-popup.swal2-success-variant {
    border-left: 4px solid #10b981 !important;
}

.swal2-popup.swal2-success-variant .swal2-title {
    color: #059669 !important;
}

/* Error Variant */
.swal2-popup.swal2-error-variant {
    border-left: 4px solid #ef4444 !important;
}

.swal2-popup.swal2-error-variant .swal2-title {
    color: #dc2626 !important;
}

/* Warning Variant */
.swal2-popup.swal2-warning-variant {
    border-left: 4px solid #f59e0b !important;
}

.swal2-popup.swal2-warning-variant .swal2-title {
    color: #d97706 !important;
}

/* Info Variant */
.swal2-popup.swal2-info-variant {
    border-left: 4px solid var(--primary-color) !important;
}

.swal2-popup.swal2-info-variant .swal2-title {
    color: var(--primary-color) !important;
}
