/* ========================================================
   GIZA CMS - TOAST NOTIFICATION STYLES
   ======================================================== */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 400px;
  width: calc(100vw - 40px);
}

.toast-item {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ffffff;
  color: #1e293b;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
  font-family: inherit;
}

.toast-item.toast-closing {
  animation: toastSlideOut 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Accent border line */
.toast-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

/* Toast types */
.toast-item.toast-success::before {
  background: #10b981;
}
.toast-item.toast-success .toast-icon {
  background: #ecfdf5;
  color: #10b981;
}

.toast-item.toast-error::before {
  background: #ef4444;
}
.toast-item.toast-error .toast-icon {
  background: #fef2f2;
  color: #ef4444;
}

.toast-item.toast-warning::before {
  background: #f59e0b;
}
.toast-item.toast-warning .toast-icon {
  background: #fffbeb;
  color: #f59e0b;
}

.toast-item.toast-info::before {
  background: #3b82f6;
}
.toast-item.toast-info .toast-icon {
  background: #eff6ff;
  color: #3b82f6;
}

/* Toast Icon */
.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

/* Toast Content */
.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  line-height: 1.3;
}

.toast-message {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
}

/* Toast Close Button */
.toast-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  margin-top: -2px;
  margin-right: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* Progress countdown bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  opacity: 0.8;
  transform-origin: left;
}

.toast-item.toast-success .toast-progress {
  background: #10b981;
}
.toast-item.toast-error .toast-progress {
  background: #ef4444;
}
.toast-item.toast-warning .toast-progress {
  background: #f59e0b;
}
.toast-item.toast-info .toast-progress {
  background: #3b82f6;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
    max-height: 120px;
    margin-bottom: 0;
  }
  to {
    opacity: 0;
    transform: translateX(110%);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: -12px;
    border-width: 0;
  }
}

@media (max-width: 640px) {
  .toast-container {
    top: 14px;
    right: 14px;
    left: 14px;
    width: auto;
    max-width: none;
  }
}
