/* SweetAlert2 Custom Styles for KTARSYS */
/* Brand Colors:
   Primary: #c480ff
   Secondary: #4539e5
   Tertiary: #ddb6ff
   Registered: #d83500
   Text: #161b21
   Input Background: #f4e8ff
*/

/* Main container styling */

.swal2-container {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(6px);
}

.swal2-popup {
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(69, 57, 229, 0.15) !important;
  border: 2px solid #ddb6ff !important;
  background-color: #ffffff !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  padding: 2rem;
  box-sizing: border-box;
}

.ktarsys-swal,
.swal2-popup.ktarsys-swal {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid rgba(196, 128, 255, 0.2) !important;
  box-shadow: 0 18px 48px rgba(196, 128, 255, 0.22) !important;
}

.ktarsys-swal .swal2-title {
  color: #c480ff !important;
}

.ktarsys-swal .swal2-html-container {
  color: #333333 !important;
}

/* Header styling */
.swal2-title {
  color: #4539e5 !important;
  font-weight: 600 !important;
  font-size: 1.5rem !important;
  margin-bottom: 1rem !important;
}

/* Content text */
.swal2-html-container {
  color: #333333 !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

.swal2-popup.ktarsys-fullsize {
  width: min(920px, 92vw) !important;
  max-width: 92vw !important;
  max-height: 92vh;
}

.swal2-popup.ktarsys-fullsize .swal2-html-container {
  max-height: calc(92vh - 200px);
  overflow-y: auto;
}

.swal2-html-container .optional_question {
  display: block;
  margin-top: 1.5rem;
  font-weight: 600;
  text-align: center;
  font-size: 1rem;
}

.swal2-actions {
  display: flex !important;
  flex-direction: row !important;
  gap: 1rem !important;
  justify-content: center;
  width: 100%;
}

.swal2-actions button {
  min-width: 140px;
}

/* Icon styling */
.swal2-icon.swal2-success {
  border-color: #c480ff !important;
  color: #c480ff !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
  background-color: #c480ff !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: #c480ff !important;
}

.swal2-icon.swal2-error {
  border-color: #d83500 !important;
  color: #d83500 !important;
}

.swal2-icon.swal2-error .swal2-x-mark {
  color: #d83500 !important;
}

.swal2-icon.swal2-warning {
  border-color: #c480ff !important;
  color: #c480ff !important;
}

.swal2-icon.swal2-info {
  border-color: #c480ff !important;
  color: #c480ff !important;
}

.swal2-icon.swal2-question {
  border-color: #c480ff !important;
  color: #c480ff !important;
}

/* Primary button (Confirm) */
.swal2-confirm {
  background: #c480ff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  color: white !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(196, 128, 255, 0.3) !important;
}

.swal2-confirm:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(196, 128, 255, 0.38) !important;
}

.swal2-confirm:focus {
  box-shadow: 0 0 0 3px rgba(196, 128, 255, 0.4) !important;
}

/* Secondary button (Cancel/Deny) */
.swal2-cancel,
.swal2-deny {
  background: #ffffff !important;
  border: 2px solid #c480ff !important;
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  color: #c480ff !important;
  transition: all 0.3s ease !important;
}

.swal2-cancel:hover,
.swal2-deny:hover {
  background: rgba(196, 128, 255, 0.16) !important;
  color: #c480ff !important;
  transform: translateY(-1px) !important;
}

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

/* Input fields */
.swal2-input,
.swal2-textarea {
  background: #f4e8ff !important;
  border: 2px solid #ddb6ff !important;
  border-radius: 8px !important;
  color: #161b21 !important;
  font-size: 1rem !important;
  padding: 12px 16px !important;
  transition: all 0.3s ease !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
  border-color: #c480ff !important;
  box-shadow: 0 0 0 3px rgba(196, 128, 255, 0.2) !important;
  outline: none !important;
}

.swal2-input::placeholder,
.swal2-textarea::placeholder {
  color: #8b7aa8 !important;
}

/* Select dropdown */
.swal2-select {
  background: #f4e8ff !important;
  border: 2px solid #ddb6ff !important;
  border-radius: 8px !important;
  color: #161b21 !important;
  font-size: 1rem !important;
  padding: 12px 16px !important;
}

.swal2-select:focus {
  border-color: #c480ff !important;
  box-shadow: 0 0 0 3px rgba(196, 128, 255, 0.2) !important;
  outline: none !important;
}

/* Checkbox and radio */
.swal2-checkbox,
.swal2-radio {
  color: #161b21 !important;
}

.swal2-checkbox input,
.swal2-radio input {
  accent-color: #c480ff !important;
}

/* Progress bar */
.swal2-progress-bar {
  background: linear-gradient(135deg, #c480ff 0%, #4539e5 100%) !important;
}

/* Close button */
.swal2-close {
  color: #8b7aa8 !important;
  font-size: 1.5rem !important;
  transition: all 0.3s ease !important;
}

.swal2-close:hover {
  color: #d83500 !important;
  transform: scale(1.1) !important;
}

/* Footer */
.swal2-footer {
  color: #8b7aa8 !important;
  font-size: 0.875rem !important;
  border-top: 1px solid #ddb6ff !important;
  margin-top: 1rem !important;
  padding-top: 1rem !important;
}

/* Loading spinner */
.swal2-loader {
  border-color: #c480ff transparent #c480ff transparent !important;
}

/* Toast notifications */
.swal2-toast {
  border-radius: 12px !important;
  box-shadow: 0 8px 25px rgba(69, 57, 229, 0.15) !important;
}

.swal2-toast .swal2-title {
  color: #161b21 !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
}

.swal2-toast .swal2-content {
  color: #161b21 !important;
  font-size: 0.875rem !important;
}

/* Animation enhancements */
.swal2-show {
  animation: swal2-show-ktarsys 0.3s ease-out !important;
}

.swal2-hide {
  animation: swal2-hide-ktarsys 0.15s ease-in !important;
}

@keyframes swal2-show-ktarsys {
  0% {
    transform: scale(0.7) translateY(20px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes swal2-hide-ktarsys {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  100% {
    transform: scale(0.8) translateY(-10px);
    opacity: 0;
  }
}

div:where(.swal2-container) div:where(.swal2-popup) {
  width: 50% !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .swal2-popup {
    background: #1a1a2e !important;
    border-color: #4539e5 !important;
  }

  .swal2-title,
  .swal2-html-container {
    color: #ffffff !important;
  }

  .swal2-input,
  .swal2-textarea,
  .swal2-select {
    background: #16213e !important;
    color: #ffffff !important;
    border-color: #4539e5 !important;
  }

  .swal2-input::placeholder,
  .swal2-textarea::placeholder {
    color: #8b7aa8 !important;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .swal2-popup {
    margin: 1rem !important;
    max-width: calc(100vw - 2rem) !important;
  }

  .swal2-title {
    font-size: 1.25rem !important;
  }

  .swal2-html-container {
    font-size: 0.875rem !important;
  }

  .swal2-confirm,
  .swal2-cancel,
  .swal2-deny {
    padding: 10px 20px !important;
    font-size: 0.875rem !important;
  }
}

@media only screen and (max-width: 576px) {
  .swal2-popup {
    width: 90% !important;
  }
}

/* Accessibility improvements */
.swal2-popup:focus {
  outline: 2px solid #c480ff !important;
  outline-offset: 2px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .swal2-popup {
    border-width: 3px !important;
  }

  .swal2-confirm {
    border: 2px solid #ffffff !important;
  }

  .swal2-cancel,
  .swal2-deny {
    border-width: 3px !important;
  }
}