/* ==========================================================================
   REACT-TOASTIFY REPLICA - Iqra College LMS Modern Notification System
   Authentic React-Toastify Design, Animation, Colors & Stacking Architecture
   ========================================================================== */

:root {
  --toastify-color-light: #ffffff;
  --toastify-color-dark: #1e293b;
  --toastify-color-info: #3b82f6;
  --toastify-color-success: #10b981;
  --toastify-color-warning: #f59e0b;
  --toastify-color-error: #ef4444;
  --toastify-color-transparent: rgba(255, 255, 255, 0.7);

  --toastify-icon-color-info: var(--toastify-color-info);
  --toastify-icon-color-success: var(--toastify-color-success);
  --toastify-icon-color-warning: var(--toastify-color-warning);
  --toastify-icon-color-error: var(--toastify-color-error);

  --toastify-toast-width: 360px;
  --toastify-toast-background: #ffffff;
  --toastify-toast-min-height: 64px;
  --toastify-toast-max-height: 800px;
  --toastify-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --toastify-z-index: 9999999;

  --toastify-text-color-light: #334155;
  --toastify-text-color-dark: #f8fafc;
}

/* Toast Container */
.Toastify__toast-container {
  z-index: var(--toastify-z-index);
  -webkit-transform: translate3d(0, 0, var(--toastify-z-index));
  position: fixed;
  padding: 6px;
  width: var(--toastify-toast-width);
  box-sizing: border-box;
  color: #fff;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.Toastify__toast-container--top-right {
  top: 1.25em;
  right: 1.25em;
}

.Toastify__toast-container--top-left {
  top: 1.25em;
  left: 1.25em;
}

.Toastify__toast-container--top-center {
  top: 1.25em;
  left: 50%;
  transform: translateX(-50%);
}

.Toastify__toast-container--bottom-right {
  bottom: 1.25em;
  right: 1.25em;
}

.Toastify__toast-container--bottom-left {
  bottom: 1.25em;
  left: 1.25em;
}

.Toastify__toast-container--bottom-center {
  bottom: 1.25em;
  left: 50%;
  transform: translateX(-50%);
}

/* Individual Toast Card */
.Toastify__toast {
  position: relative;
  min-height: var(--toastify-toast-min-height);
  box-sizing: border-box;
  margin-bottom: 0.85rem;
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-height: var(--toastify-toast-max-height);
  overflow: hidden;
  font-family: var(--toastify-font-family);
  cursor: pointer;
  direction: ltr;
  pointer-events: auto;
  background: #ffffff;
  color: var(--toastify-text-color-light);
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 500;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease, margin 0.25s ease, max-height 0.25s ease;
  user-select: none;
}

.Toastify__toast:hover {
  box-shadow: 0 16px 32px -6px rgba(15, 23, 42, 0.18), 0 12px 14px -6px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.Toastify__toast-body {
  margin: auto 0;
  flex: 1 1 auto;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  word-break: break-word;
}

.Toastify__toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.Toastify__toast-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.Toastify__toast-message {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}

/* Toast Icon */
.Toastify__toast-icon {
  flex-shrink: 0;
  display: flex;
  width: 24px;
  height: 24px;
  font-size: 22px;
  align-items: center;
  justify-content: center;
}

.Toastify__toast--success .Toastify__toast-icon {
  color: var(--toastify-icon-color-success);
}
.Toastify__toast--error .Toastify__toast-icon {
  color: var(--toastify-icon-color-error);
}
.Toastify__toast--warning .Toastify__toast-icon {
  color: var(--toastify-icon-color-warning);
}
.Toastify__toast--info .Toastify__toast-icon {
  color: var(--toastify-icon-color-info);
}
.Toastify__toast--default .Toastify__toast-icon {
  color: #64748b;
}

/* Close Button */
.Toastify__close-button {
  color: #94a3b8;
  background: transparent;
  outline: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
  align-self: flex-start;
  margin-left: 6px;
  margin-top: -4px;
  margin-right: -4px;
  font-size: 15px;
  line-height: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.Toastify__close-button:hover {
  color: #0f172a;
  opacity: 1;
  background: #f1f5f9;
}

/* Animated Progress Bar */
.Toastify__progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  z-index: var(--toastify-z-index);
  opacity: 0.9;
  transform-origin: left;
}

.Toastify__progress-bar--success {
  background: var(--toastify-color-success);
}
.Toastify__progress-bar--error {
  background: var(--toastify-color-error);
}
.Toastify__progress-bar--warning {
  background: var(--toastify-color-warning);
}
.Toastify__progress-bar--info {
  background: var(--toastify-color-info);
}
.Toastify__progress-bar--default {
  background: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);
}

/* Subtle Left Accent Border matching React-Toastify Colored Border variant */
.Toastify__toast--success {
  border-left: 4.5px solid var(--toastify-color-success);
}
.Toastify__toast--error {
  border-left: 4.5px solid var(--toastify-color-error);
}
.Toastify__toast--warning {
  border-left: 4.5px solid var(--toastify-color-warning);
}
.Toastify__toast--info {
  border-left: 4.5px solid var(--toastify-color-info);
}
.Toastify__toast--default {
  border-left: 4.5px solid #64748b;
}

/* Animations (Authentic React-Toastify Transitions) */
@keyframes Toastify__slideInRight {
  from {
    transform: translate3d(115%, 0, 0);
    visibility: visible;
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes Toastify__slideOutRight {
  from {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
  to {
    visibility: hidden;
    transform: translate3d(115%, 0, 0);
    opacity: 0;
  }
}

@keyframes Toastify__zoomIn {
  from {
    opacity: 0;
    transform: scale3d(0.6, 0.6, 0.6);
  }
  50% {
    opacity: 1;
  }
}

.Toastify__slide-enter--top-right {
  animation: Toastify__slideInRight 0.32s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.Toastify__slide-exit--top-right {
  animation: Toastify__slideOutRight 0.28s cubic-bezier(0.06, 0.71, 0.55, 1) forwards;
}

.Toastify--animate-icon {
  animation: Toastify__zoomIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1);
}

/* Mobile Responsiveness */
@media only screen and (max-width: 480px) {
  .Toastify__toast-container {
    width: 100vw;
    padding: 0;
    left: 0;
    margin: 0;
  }
  .Toastify__toast-container--top-right,
  .Toastify__toast-container--top-left,
  .Toastify__toast-container--top-center {
    top: 0;
  }
  .Toastify__toast {
    margin-bottom: 0;
    border-radius: 0;
    border-left-width: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }
}

/* ==========================================================================
   CUSTOM CONFIRMATION & PROMPT MODAL STYLES (SWEET DIALOG REPLACEMENT)
   ========================================================================== */
.custom-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
  box-sizing: border-box;
}

.custom-confirm-overlay.active {
  opacity: 1;
}

.custom-confirm-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08);
  width: min(440px, 100%);
  padding: 22px 24px 20px;
  transform: scale(0.92) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
  box-sizing: border-box;
}

.custom-confirm-overlay.active .custom-confirm-card {
  transform: scale(1) translateY(0);
}

.confirm-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.confirm-modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.confirm-modal-icon.primary {
  background: #eff6ff;
  color: #2563eb;
}

.confirm-modal-icon.danger {
  background: #fef2f2;
  color: #ef4444;
}

.confirm-modal-icon.warning {
  background: #fffbeb;
  color: #f59e0b;
}

.confirm-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.confirm-modal-body {
  margin-bottom: 20px;
  color: #475569;
  font-size: 13.5px;
  line-height: 1.55;
}

.confirm-modal-p {
  margin: 0 0 8px;
}

.confirm-modal-p:last-child {
  margin-bottom: 0;
}

.prompt-modal-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.prompt-modal-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.confirm-btn-cancel {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.confirm-btn-cancel:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.confirm-btn-action.primary {
  background: #2563eb;
  color: #ffffff;
}

.confirm-btn-action.primary:hover {
  background: #1d4ed8;
}

.confirm-btn-action.danger {
  background: #ef4444;
  color: #ffffff;
}

.confirm-btn-action.danger:hover {
  background: #dc2626;
}

.confirm-btn-action.warning {
  background: #f59e0b;
  color: #ffffff;
}

.confirm-btn-action.warning:hover {
  background: #d97706;
}
