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

.basalam-toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 14px 16px;
  border-right: 4px solid var(--basalam-primary-color, #ff5c35);
  font-family: PelakFA, "Tahoma", sans-serif;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.basalam-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.basalam-toast.is-leaving {
  opacity: 0;
  transform: translateX(40px);
}

.basalam-toast__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.basalam-toast__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.basalam-toast__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.basalam-toast__title {
  font-family: Morabba, PelakFA, "Tahoma", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--basalam-gray-800, #2d3748);
  margin: 0;
  line-height: 1.4;
}

.basalam-toast__message {
  font-family: PelakFA, "Tahoma", sans-serif;
  font-size: 0.85rem;
  color: var(--basalam-gray-700, #4a5568);
  margin: 0;
  line-height: 1.6;
  word-break: break-word;
}

.basalam-toast__close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin: -4px -4px 0 0;
  color: var(--basalam-gray-500, #a0aec0);
  font-size: 18px;
  line-height: 1;
  border-radius: 4px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.basalam-toast__close:hover {
  background: var(--basalam-gray-200, #edf2f7);
  color: var(--basalam-gray-700, #4a5568);
}

.basalam-toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.basalam-toast__progress-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  background: var(--basalam-primary-color, #ff5c35);
  width: 100%;
  transform-origin: right center;
  animation: basalam-toast-progress linear forwards;
}

@keyframes basalam-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.basalam-toast--success {
  border-right-color: var(--basalam-success-color, #28a745);
}
.basalam-toast--success .basalam-toast__icon { color: var(--basalam-success-color, #28a745); }
.basalam-toast--success .basalam-toast__progress-bar { background: var(--basalam-success-color, #28a745); }

.basalam-toast--error {
  border-right-color: var(--basalam-danger-color, #dc3545);
}
.basalam-toast--error .basalam-toast__icon { color: var(--basalam-danger-color, #dc3545); }
.basalam-toast--error .basalam-toast__progress-bar { background: var(--basalam-danger-color, #dc3545); }

.basalam-toast--warning {
  border-right-color: #f0a500;
}
.basalam-toast--warning .basalam-toast__icon { color: #f0a500; }
.basalam-toast--warning .basalam-toast__progress-bar { background: #f0a500; }

.basalam-toast--info {
  border-right-color: var(--basalam-primary-color, #ff5c35);
}
.basalam-toast--info .basalam-toast__icon { color: var(--basalam-primary-color, #ff5c35); }
.basalam-toast--info .basalam-toast__progress-bar { background: var(--basalam-primary-color, #ff5c35); }

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