/* ========================================================
   Silicon Radon Modern Dialogs & Toast Notification System
   ======================================================== */

/* --- Toast Container --- */
#srToastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100% - 40px);
}

.sr-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: srToastIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.25s ease, transform 0.25s ease;
  cursor: pointer;
  user-select: none;
}

.sr-toast.hiding {
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
}

.sr-toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.sr-toast-msg {
  flex: 1;
  word-break: break-word;
}

.sr-toast-close {
  flex-shrink: 0;
  opacity: 0.5;
  cursor: pointer;
  background: none;
  border: none;
  color: #94a3b8;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, color 0.15s;
}
.sr-toast-close:hover {
  opacity: 1;
  color: #ffffff;
}

/* Toast Variants */
.sr-toast.success {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(16, 185, 129, 0.15);
}
.sr-toast.success .sr-toast-icon {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}

.sr-toast.error {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(239, 68, 68, 0.18);
}
.sr-toast.error .sr-toast-icon {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.sr-toast.warning {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(245, 158, 11, 0.15);
}
.sr-toast.warning .sr-toast-icon {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

.sr-toast.info {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(6, 182, 212, 0.15);
}
.sr-toast.info .sr-toast-icon {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.15);
}

@keyframes srToastIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Modal Overlay & Dialog --- */
.sr-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(4, 7, 13, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: srFadeIn 0.2s ease-out forwards;
}

.sr-dialog-card {
  width: 100%;
  max-width: 440px;
  background: #0f1624;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: #f8fafc;
  animation: srPopIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sr-dialog-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sr-dialog-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sr-dialog-header-icon.danger {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.sr-dialog-header-icon.primary {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.sr-dialog-header-icon.info {
  background: rgba(6, 182, 212, 0.16);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.sr-dialog-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.sr-dialog-body {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
}

.sr-dialog-input {
  width: 100%;
  padding: 11px 14px;
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sr-dialog-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.sr-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.sr-dialog-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.15s, opacity 0.15s, background 0.15s;
}
.sr-dialog-btn:active {
  transform: scale(0.97);
}

.sr-dialog-btn-cancel {
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.sr-dialog-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sr-dialog-btn-confirm {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #07090e;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.sr-dialog-btn-confirm:hover {
  opacity: 0.92;
}

.sr-dialog-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.sr-dialog-btn-danger:hover {
  opacity: 0.92;
}

@keyframes srFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes srPopIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
