/* SweetAlert Glassmorphism Theme */
:root {
  --swal2-primary: #f7941d;
  --swal2-success: #4caf50;
  --swal2-error: #b52b22;
  --swal2-warning: #ff9800;
  --swal2-info: #f7941d;
}

/* Main popup glassmorphism effect */
.swal2-popup {
  background: #ffffff7a !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-radius: 12px !important;
  border: none !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
  font-family: inherit !important;
  overflow: hidden !important;
}

/* Title styling */
.swal2-title {
  color: #000000 !important;
  font-weight: 600 !important;
}

/* Content text */
.swal2-html-container {
  color: #727272 !important;
}

/* Confirm button colors (default) */
.swal2-styled.swal2-confirm {
  background: rgba(247, 148, 29, 0.9) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(247, 148, 29, 0.3) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

.swal2-styled.swal2-confirm:hover {
  background: rgba(230, 133, 26, 1) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(247, 148, 29, 0.3) !important;
}

/* Warning dialog confirm buttons */
.swal2-popup .swal2-icon.swal2-warning ~ * .swal2-styled.swal2-confirm,
.swal2-popup:has(.swal2-icon.swal2-warning) .swal2-styled.swal2-confirm,
.swal2-popup[data-swal2-type="warning"] .swal2-styled.swal2-confirm {
  background: rgba(220, 38, 38, 0.9) !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
}

.swal2-popup .swal2-icon.swal2-warning ~ * .swal2-styled.swal2-confirm:hover,
.swal2-popup:has(.swal2-icon.swal2-warning) .swal2-styled.swal2-confirm:hover,
.swal2-popup[data-swal2-type="warning"] .swal2-styled.swal2-confirm:hover {
  background: rgba(185, 28, 28, 1) !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

/* Cancel button with glassmorphism */
.swal2-styled.swal2-cancel {
  background: rgba(185, 185, 185, 0.7) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(185, 185, 185, 0.3) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

.swal2-styled.swal2-cancel:hover {
  background: rgba(113, 113, 113, 0.9) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(113, 113, 113, 0.3) !important;
}

/* Success icon styling - completely remove all backgrounds and lines */
.swal2-icon.swal2-success {
  background: transparent !important;
  border: none !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: var(--swal2-success) !important;
  background: transparent !important;
}

.swal2-icon.swal2-success .swal2-success-line-tip,
.swal2-icon.swal2-success .swal2-success-line-long {
  background-color: var(--swal2-success) !important;
}

.swal2-icon.swal2-success:before,
.swal2-icon.swal2-success:after {
  background: transparent !important;
}

/* Remove any circular line backgrounds that cause white lines */
.swal2-icon.swal2-success .swal2-success-circular-line-left,
.swal2-icon.swal2-success .swal2-success-circular-line-right {
  background: transparent !important;
}

/* Ensure all success icon elements are transparent */
.swal2-icon.swal2-success * {
  background: transparent !important;
}

/* Only keep the actual checkmark lines colored */
.swal2-icon.swal2-success .swal2-success-line-tip,
.swal2-icon.swal2-success .swal2-success-line-long {
  background-color: var(--swal2-success) !important;
}

/* Warning icon */
.swal2-icon.swal2-warning {
  background: transparent !important;
  border-color: var(--swal2-warning) !important;
  color: var(--swal2-warning) !important;
}

/* Error icon */
.swal2-icon.swal2-error {
  background: transparent !important;
  border-color: var(--swal2-error) !important;
}

.swal2-icon.swal2-error .swal2-x-mark-line-left,
.swal2-icon.swal2-error .swal2-x-mark-line-right {
  background-color: var(--swal2-error) !important;
}

/* Info icon */
.swal2-icon.swal2-info {
  background: transparent !important;
  border-color: var(--swal2-info) !important;
  color: var(--swal2-info) !important;
}

/* Question icon */
.swal2-icon.swal2-question {
  background: transparent !important;
  border-color: var(--swal2-info) !important;
  color: var(--swal2-info) !important;
}

/* Progress bar with glassmorphism */
.swal2-timer-progress-bar {
  background: linear-gradient(90deg, 
    rgba(247, 148, 29, 0.8), 
    rgba(247, 148, 29, 1)) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* Input fields with glassmorphism */
.swal2-input,
.swal2-textarea {
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 8px !important;
  color: #222 !important;
  transition: all 0.3s ease !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
  background: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(247, 148, 29, 0.5) !important;
  box-shadow: 0 0 0 0.125rem rgba(247, 148, 29, 0.25) !important;
  outline: none !important;
}

.swal2-input::placeholder,
.swal2-textarea::placeholder {
  color: rgba(102, 102, 102, 0.7) !important;
}

/* Select dropdown */
.swal2-select {
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 8px !important;
  color: #222 !important;
}

/* Loading spinner */
.swal2-loader {
  border-color: rgba(247, 148, 29, 0.3) transparent rgba(247, 148, 29, 0.8) transparent !important;
}

/* Validation message */
.swal2-validation-message {
  background: rgba(220, 38, 38, 0.1) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #b52b22 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  border-radius: 6px !important;
}

/* Close button */
.swal2-close {
  color: #666 !important;
  transition: all 0.3s ease !important;
}

.swal2-close:hover {
  color: #222 !important;
  background: rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* Footer */
.swal2-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #666 !important;
}

/* Toast notifications with glassmorphism */
.swal2-toast {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

/* Range slider */
.swal2-range {
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-radius: 8px !important;
}

.swal2-range::-webkit-slider-track {
  background: rgba(247, 148, 29, 0.3) !important;
  border-radius: 4px !important;
}

.swal2-range::-webkit-slider-thumb {
  background: rgba(247, 148, 29, 0.9) !important;
  border: 2px solid rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* File input */
.swal2-file {
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 8px !important;
  color: #222 !important;
}

/* DARK MODE GLASSMORPHISM */
@media (prefers-color-scheme: dark) {
  .swal2-popup {
    background: #2d2d2d5a  !important;
    border: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4) !important;
  }

  .swal2-title {
    color: #f1f1f1 !important;
  }

  .swal2-html-container {
    color: #bbb !important;
  }

  .swal2-input,
  .swal2-textarea,
  .swal2-select,
  .swal2-file {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f1f1f1 !important;
  }

  .swal2-input::placeholder,
  .swal2-textarea::placeholder {
    color: rgba(187, 187, 187, 0.7) !important;
  }

  .swal2-close {
    color: #bbb !important;
  }

  .swal2-close:hover {
    color: #f1f1f1 !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

  .swal2-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #bbb !important;
  }

  .swal2-validation-message {
    background: rgba(181, 43, 34, 0.2) !important;
    color: #ff6b6b !important;
    border: 1px solid rgba(181, 43, 34, 0.3) !important;
  }

  .swal2-toast {
    background: transparent !important;
    border: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4) !important;
  }
}

/* Manual dark theme overrides */
[data-bs-theme="dark"] .swal2-popup {
  background: transparent!important;
  border: none !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4) !important;
}



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

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

[data-bs-theme="dark"] .swal2-input,
[data-bs-theme="dark"] .swal2-textarea,
[data-bs-theme="dark"] .swal2-select,
[data-bs-theme="dark"] .swal2-file {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .swal2-input:focus,
[data-bs-theme="dark"] .swal2-textarea:focus {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(247, 148, 29, 0.5) !important;
  box-shadow: 0 0 0 0.125rem rgba(247, 148, 29, 0.25) !important;
}

[data-bs-theme="dark"] .swal2-input::placeholder,
[data-bs-theme="dark"] .swal2-textarea::placeholder {
  color: rgba(219, 219, 219, 0.5) !important;
}

[data-bs-theme="dark"] .swal2-styled.swal2-cancel {
  background: rgba(113, 113, 113, 0.7) !important;
  border: 1px solid rgba(113, 113, 113, 0.3) !important;
}

[data-bs-theme="dark"] .swal2-styled.swal2-cancel:hover {
  background: rgba(26, 26, 26, 0.9) !important;
  box-shadow: 0 4px 12px rgba(26, 26, 26, 0.3) !important;
}

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

[data-bs-theme="dark"] .swal2-close:hover {
  color: #f1f1f1 !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .swal2-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #dbdbdb !important;
}

[data-bs-theme="dark"] .swal2-validation-message {
  background: rgba(181, 43, 34, 0.2) !important;
  color: #ff6b6b !important;
  border: 1px solid rgba(181, 43, 34, 0.3) !important;
}

[data-bs-theme="dark"] .swal2-toast {
  background: rgba(40, 40, 40, 0.6) !important;
  border: none !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .swal2-range {
  background: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .swal2-range::-webkit-slider-track {
  background: rgba(247, 148, 29, 0.3) !important;
}

[data-bs-theme="dark"] .swal2-range::-webkit-slider-thumb {
  background: rgba(247, 148, 29, 0.9) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
}