/* DGA Saudi-style Toast Notifications — Global Component */

.oneclick-toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  width: 100%;
  pointer-events: none;
}

[dir="rtl"] .oneclick-toast-container {
  right: auto;
  left: 2rem;
}

.oneclick-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: var(--oc-space-5);
  background: var(--oc-neutral-0);
  border: none;
  border-radius: var(--oc-radius-lg);
  box-shadow: var(--oc-shadow-lg);
  min-width: 320px;
  max-width: 420px;
  animation: toast-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  pointer-events: auto;
}

.oneclick-toast.error {
  border-left: 3px solid var(--oc-error-500);
}

.oneclick-toast.success {
  border-left: 3px solid var(--oc-success-500);
}

[dir="rtl"] .oneclick-toast.error,
[dir="rtl"] .oneclick-toast.success {
  border-left: none;
  border-right: 3px solid var(--oc-error-500);
}

[dir="rtl"] .oneclick-toast.success {
  border-right-color: var(--oc-success-500);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.oneclick-toast-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}

.oneclick-toast.error .oneclick-toast-icon {
  background: var(--oc-error-50);
  color: var(--oc-error-500);
}

.oneclick-toast.success .oneclick-toast-icon {
  background: var(--oc-success-50);
  color: var(--oc-success-500);
}

.oneclick-toast-content {
  flex: 1;
  min-width: 0;
}

.oneclick-toast-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--oc-neutral-800);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.oneclick-toast-message {
  font-size: 0.875rem;
  color: var(--oc-neutral-500);
  line-height: 1.5;
}

.oneclick-toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--oc-neutral-400);
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  margin-top: -0.25rem;
  margin-right: -0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--oc-radius-sm);
  transition: all 0.15s;
}

.oneclick-toast-close:hover {
  color: var(--oc-neutral-600);
  background: var(--oc-neutral-100);
}

/* Responsive toast */
@media (max-width: 600px) {
  .oneclick-toast-container {
    left: 1rem;
    right: 1rem;
    top: 1rem;
    max-width: none;
  }

  .oneclick-toast {
    min-width: auto;
    max-width: none;
  }
}

@media (max-width: 576px) {
  .oneclick-toast-container {
    left: 0.5rem;
    right: 0.5rem;
    top: 0.5rem;
  }
}
