/* ==========================================================
   WHALE OS — Unified Notification System CSS (Dark Mode Only)
   ========================================================== */

/* Toast Container */
#whale-toast-container {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

/* Toast Notification Card */
.whale-toast {
  pointer-events: auto;
  width: 360px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 93, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  gap: 12px;
  position: relative;
  overflow: hidden;
  direction: rtl;
  text-align: right;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.whale-toast.dismissing {
  animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(-50px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(-100px) scale(0.9); }
}

/* Toast Icon & Color Schemes */
.whale-toast-icon {
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.whale-toast-success .whale-toast-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.whale-toast-error .whale-toast-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.whale-toast-warning .whale-toast-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.whale-toast-info .whale-toast-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.whale-toast-loading .whale-toast-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  animation: toastSpin 1.2s linear infinite;
}

@keyframes toastSpin {
  to { transform: rotate(-360deg); }
}

/* Toast Content */
.whale-toast-content {
  flex: 1;
}

.whale-toast-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
  font-family: 'Cairo', sans-serif;
}

.whale-toast-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.4;
  font-family: 'Cairo', sans-serif;
}

/* Toast Close Button */
.whale-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  margin: -4px 0 0 0;
  align-self: flex-start;
  transition: color 0.2s;
}

.whale-toast-close:hover {
  color: #ffffff;
}

/* Dynamic Progress Bar (visual auto dismiss track) */
.whale-toast-progress {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.35;
  width: 100%;
}

/* ==========================================================
   Global Confirm & Prompt Modals (Glassmorphism Modal System)
   ========================================================== */
.whale-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
  direction: rtl;
}

.whale-dialog-card {
  width: 90%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: dialogPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

@keyframes dialogPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.whale-dialog-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: rgba(0, 93, 255, 0.1);
  border-radius: 50%;
  color: var(--blue-500);
}

.whale-dialog-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
  font-family: 'Cairo', sans-serif;
}

.whale-dialog-message {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 20px 0;
  line-height: 1.6;
  font-family: 'Cairo', sans-serif;
}

/* Prompt Input Field */
.whale-dialog-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 14px;
  font-family: 'Cairo', sans-serif;
  margin-bottom: 20px;
  outline: none;
  box-sizing: border-box;
  text-align: right;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.whale-dialog-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 10px rgba(0, 93, 255, 0.2);
}

/* Dialog Action Buttons */
.whale-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.whale-dialog-btn {
  flex: 1;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  outline: none;
}

.whale-dialog-btn.confirm {
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-700) 100%);
  color: #ffffff;
}

.whale-dialog-btn.confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 93, 255, 0.3);
}

.whale-dialog-btn.cancel {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.whale-dialog-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* ==========================================================
   Full-screen Global Loading Overlay
   ========================================================== */
.whale-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 22, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  color: #ffffff;
  direction: rtl;
}

.whale-loading-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(0, 93, 255, 0.1);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: loadingSpin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  margin-bottom: 24px;
}

@keyframes loadingSpin {
  to { transform: rotate(360deg); }
}

.whale-loading-text {
  font-size: 16px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  margin-bottom: 8px;
}

.whale-loading-subtext {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Cairo', sans-serif;
}
