/**
 * =====================================================================
 * SKENDA HUB — ENTERPRISE MODAL & DIALOG SYSTEM
 * =====================================================================
 * Professional, modern UI replacement for native browser alert & confirm.
 */

:root {
  --sk-primary: #0F2952;
  --sk-primary-hover: #163E75;
  --sk-gold: #FBBF24;
  --sk-success: #10B981;
  --sk-warning: #F59E0B;
  --sk-danger: #EF4444;
  --sk-text-main: #0F172A;
  --sk-text-sub: #475569;
}

/* Modal Overlay */
.skenda-dialog-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.skenda-dialog-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container Box */
.skenda-dialog-box {
  background: #FFFFFF;
  width: 100%;
  max-width: 440px;
  border-radius: 22px;
  padding: 28px 24px 22px 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  text-align: center;
  position: relative;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.skenda-dialog-overlay.active .skenda-dialog-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Modal Icon Circle */
.skenda-dialog-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform 0.3s ease;
}

.skenda-dialog-overlay.active .skenda-dialog-icon {
  animation: skendaIconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes skendaIconPop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.skenda-dialog-icon.success {
  background: #ECFDF5;
  color: #10B981;
  box-shadow: 0 0 0 5px #D1FAE5;
}

.skenda-dialog-icon.warning {
  background: #FFFBEB;
  color: #F59E0B;
  box-shadow: 0 0 0 5px #FEF3C7;
}

.skenda-dialog-icon.error,
.skenda-dialog-icon.danger {
  background: #FEF2F2;
  color: #EF4444;
  box-shadow: 0 0 0 5px #FEE2E2;
}

.skenda-dialog-icon.info {
  background: #EFF6FF;
  color: #2563EB;
  box-shadow: 0 0 0 5px #DBEAFE;
}

.skenda-dialog-icon.question {
  background: #F8FAFC;
  color: #0F2952;
  box-shadow: 0 0 0 5px #E2E8F0;
}

/* Title & Content */
.skenda-dialog-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--sk-text-main);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.skenda-dialog-text {
  font-size: 13.5px;
  color: var(--sk-text-sub);
  line-height: 1.55;
  margin-bottom: 24px;
  word-break: break-word;
}

/* Actions Footer */
.skenda-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.skenda-dialog-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.skenda-dialog-btn:hover {
  transform: translateY(-1px);
}

.skenda-dialog-btn:active {
  transform: translateY(0);
}

.skenda-dialog-btn-primary {
  background: linear-gradient(135deg, #0B2245 0%, #0F2952 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(15, 41, 82, 0.25);
}

.skenda-dialog-btn-primary:hover {
  box-shadow: 0 6px 18px rgba(15, 41, 82, 0.35);
  filter: brightness(1.1);
}

.skenda-dialog-btn-danger {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}

.skenda-dialog-btn-danger:hover {
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
  filter: brightness(1.1);
}

.skenda-dialog-btn-secondary {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}

.skenda-dialog-btn-secondary:hover {
  background: #E2E8F0;
  color: #1E293B;
}

/* ===================================================================
   FLOATING TOAST NOTIFICATIONS
   =================================================================== */
.skenda-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 360px;
  width: calc(100% - 40px);
}

.skenda-toast-item {
  pointer-events: auto;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skenda-toast-item.show {
  transform: translateX(0);
  opacity: 1;
}

.skenda-toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.skenda-toast-item.success .skenda-toast-icon { background: #ECFDF5; color: #10B981; }
.skenda-toast-item.error .skenda-toast-icon { background: #FEF2F2; color: #EF4444; }
.skenda-toast-item.warning .skenda-toast-icon { background: #FFFBEB; color: #F59E0B; }
.skenda-toast-item.info .skenda-toast-icon { background: #EFF6FF; color: #2563EB; }

.skenda-toast-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--sk-text-main);
  line-height: 1.4;
  flex: 1;
}
