/**
 * Larkon-style toasts
 * All toasts (toastr.success/error/warning/info and data-toast buttons) use this style.
 * data-toast: data-toast-text, data-toast-gravity (top), data-toast-position (right|center),
 * data-toast-className (primary|success|warning|danger), data-toast-duration (3000), data-toast-close.
 */

/* Container: top-right by default (gravity=top, position=right) */
#toast-container {
  top: 1.25rem !important;
  right: 1.25rem !important;
  left: auto !important;
  z-index: 2147483647;
  pointer-events: none;
}

#toast-container * {
  box-sizing: border-box;
}

/* Each toast: OZEN card – rounded, subtle shadow, left strip, light bg */
#toast-container > div {
  pointer-events: auto;
  width: 360px;
  max-width: calc(100vw - 2.5rem);
  padding: 18px 44px 18px 24px;
  margin-bottom: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  opacity: 1;
  border: none;
  background-image: none !important;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
  overflow: hidden;
}

#toast-container > div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
}

#toast-container > div.rtl {
  padding-left: 44px;
  padding-right: 24px;
}

#toast-container > div.rtl::before {
  left: auto;
  right: 0;
}

#toast-container > div:hover {
  opacity: 1;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1), 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Hide default progress bar */
#toast-container .toast-progress {
  display: none !important;
}

/* Success – dark green strip, light beige bg */
#toast-container > .toast-success {
  background-color: #FBF9F7 !important;
  color: #2c2c2c;
}

#toast-container > .toast-success::before {
  background-color: #166534;
}

#toast-container > .toast-success .toast-title {
  color: #14532d;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 6px;
}

#toast-container > .toast-success .toast-message {
  color: #6b7280;
  font-size: 0.8125rem;
  line-height: 1.4;
}

#toast-container > .toast-success .toast-close-button {
  color: #14532d;
  opacity: 0.8;
}

#toast-container > .toast-success .toast-close-button:hover {
  color: #166534;
  opacity: 1;
}

/* Warning – orange strip, light beige bg */
#toast-container > .toast-warning {
  background-color: #FBF9F7 !important;
  color: #2c2c2c;
}

#toast-container > .toast-warning::before {
  background-color: #d97706;
}

#toast-container > .toast-warning .toast-title {
  color: #b45309;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 6px;
}

#toast-container > .toast-warning .toast-message {
  color: #6b7280;
  font-size: 0.8125rem;
  line-height: 1.4;
}

#toast-container > .toast-warning .toast-close-button {
  color: #b45309;
  opacity: 0.8;
}

#toast-container > .toast-warning .toast-close-button:hover {
  color: #d97706;
  opacity: 1;
}

/* Error – softer: site primary strip, warm neutral bg (less aggressive) */
#toast-container > .toast-error {
  background-color: #FBF9F7 !important;
  color: #2c2c2c;
}

#toast-container > .toast-error::before {
  background-color: color-mix(in srgb, var(--bs-primary, #AD7B62) 75%, #e8e4e0);
}

#toast-container > .toast-error .toast-title {
  color: var(--bs-primary, #9a7b6a);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 6px;
}

#toast-container > .toast-error .toast-message {
  color: #6b7280;
  font-size: 0.8125rem;
  line-height: 1.4;
}

#toast-container > .toast-error .toast-close-button {
  color: #9ca3af;
  opacity: 0.85;
}

#toast-container > .toast-error .toast-close-button:hover {
  color: var(--bs-primary, #9a7b6a);
  opacity: 1;
}

/* Info / Primary – gray strip, white bg */
#toast-container > .toast-info,
#toast-container > .larkon-toast-primary {
  background-color: #fff !important;
  color: #2c2c2c;
}

#toast-container > .toast-info::before,
#toast-container > .larkon-toast-primary::before {
  background-color: #9ca3af;
}

#toast-container > .toast-info .toast-title,
#toast-container > .larkon-toast-primary .toast-title {
  color: #4b5563;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 6px;
}

#toast-container > .toast-info .toast-message,
#toast-container > .larkon-toast-primary .toast-message {
  color: #6b7280;
  font-size: 0.8125rem;
  line-height: 1.4;
}

#toast-container > .toast-info .toast-close-button,
#toast-container > .larkon-toast-primary .toast-close-button {
  color: #6b7280;
  opacity: 0.8;
}

#toast-container > .toast-info .toast-close-button:hover,
#toast-container > .larkon-toast-primary .toast-close-button:hover {
  color: #4b5563;
  opacity: 1;
}

/* Close button */
#toast-container .toast-close-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

#toast-container .rtl .toast-close-button {
  right: auto;
  left: 12px;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 1rem;
  display: block;
}

.toast-message {
  word-wrap: break-word;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.4;
  display: block;
}

/* data-toast-position="center" */
#toast-container.toast-top-center {
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#toast-container.toast-top-center > div {
  margin-left: 0;
  margin-right: 0;
}

/* Left position */
#toast-container.toast-top-left {
  left: 1.25rem;
  right: auto;
}

/* Bottom positions */
#toast-container.toast-bottom-right {
  top: auto;
  bottom: 1.25rem;
  right: 1.25rem;
  left: auto;
}

#toast-container.toast-bottom-center {
  top: auto;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#toast-container.toast-bottom-left {
  top: auto;
  bottom: 1.25rem;
  left: 1.25rem;
  right: auto;
}

[dir="rtl"] #toast-container {
  right: auto;
  left: 1.25rem;
}

[dir="rtl"] #toast-container.toast-top-left {
  left: auto;
  right: 1.25rem;
}
