/**
 * Modern toastr for ecommerce (home_eight + home_thirteen).
 * Always pinned top-right under the sticky header — never over product / ATC.
 */

#toast-container {
  position: fixed !important;
  z-index: 2147483000 !important;
  pointer-events: none !important;
  display: block !important;
  width: auto !important;
  max-width: min(400px, calc(100vw - 28px)) !important;
  margin: 0 !important;
  padding: 0 !important;
  inset: auto !important;
}

/* Keep clear of sticky header + header icons; stay off the product buy block */
#toast-container.toast-top-right,
#toast-container.toast-top-left,
#toast-container.toast-top-center,
#toast-container.toast-bottom-right,
#toast-container.toast-bottom-left,
#toast-container.toast-bottom-center,
#toast-container.toast-top-full-width,
#toast-container.toast-bottom-full-width {
  top: 100px !important;
  right: 20px !important;
  left: auto !important;
  bottom: auto !important;
  width: auto !important;
  max-width: min(400px, calc(100vw - 28px)) !important;
  margin: 0 !important;
  transform: none !important;
}

#toast-container > div,
#toast-container > div.toast-success,
#toast-container > div.toast-error,
#toast-container > div.toast-warning,
#toast-container > div.toast-info {
  pointer-events: auto !important;
  position: relative !important;
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 52px;
  margin: 0 0 10px !important;
  padding: 13px 44px 13px 54px !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.06) !important;
  color: #111827 !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  opacity: 1 !important;
  overflow: hidden;
  float: none !important;
  animation: bznEcToastIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Status icon — vertically centered, never overlaps text */
#toast-container > div::before {
  content: '' !important;
  position: absolute !important;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  margin: 0 !important;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px 15px;
}

#toast-container > div::after {
  content: none !important;
  display: none !important;
}

#toast-container > .toast-success {
  border-color: rgba(16, 185, 129, 0.28) !important;
  background: #ffffff !important;
}

#toast-container > .toast-success::before {
  background-color: #ecfdf5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

#toast-container > .toast-error {
  border-color: rgba(239, 68, 68, 0.28) !important;
  background: #ffffff !important;
}

#toast-container > .toast-error::before {
  background-color: #fef2f2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

#toast-container > .toast-warning {
  border-color: rgba(245, 158, 11, 0.32) !important;
  background: #ffffff !important;
}

#toast-container > .toast-warning::before {
  background-color: #fffbeb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3C/svg%3E");
}

#toast-container > .toast-info {
  border-color: rgba(59, 130, 246, 0.28) !important;
  background: #ffffff !important;
}

#toast-container > .toast-info::before {
  background-color: #eff6ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8h.01'/%3E%3Cpath d='M11 12h1v4h1'/%3E%3C/svg%3E");
}

#toast-container .toast-title {
  font-weight: 650;
  font-size: 14px;
  margin: 0 0 2px;
  color: #111827 !important;
}

#toast-container .toast-message {
  margin: 0 !important;
  padding: 0 !important;
  color: #374151 !important;
  text-shadow: none !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

#toast-container .toast-message a,
#toast-container .toast-message label {
  color: #111827 !important;
}

#toast-container .toast-close-button {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  left: auto !important;
  float: none !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.05) !important;
  color: #6b7280 !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-shadow: none !important;
  opacity: 1 !important;
  cursor: pointer;
}

#toast-container .toast-close-button:hover,
#toast-container .toast-close-button:focus {
  background: rgba(15, 23, 42, 0.1) !important;
  color: #111827 !important;
  opacity: 1 !important;
}

.rtl #toast-container.toast-top-right,
.rtl #toast-container.toast-top-center,
.rtl #toast-container.toast-top-left {
  right: auto !important;
  left: 20px !important;
}

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

#toast-container .toast-progress {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  height: 2px !important;
  opacity: 1 !important;
  border-radius: 0 0 12px 12px;
}

#toast-container > .toast-success .toast-progress {
  background: #10b981 !important;
}

#toast-container > .toast-error .toast-progress {
  background: #ef4444 !important;
}

#toast-container > .toast-warning .toast-progress {
  background: #f59e0b !important;
}

#toast-container > .toast-info .toast-progress {
  background: #3b82f6 !important;
}

@keyframes bznEcToastIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767.98px) {
  #toast-container.toast-top-right,
  #toast-container.toast-top-left,
  #toast-container.toast-top-center,
  #toast-container.toast-bottom-right,
  #toast-container.toast-bottom-left,
  #toast-container.toast-bottom-center {
    top: 76px !important;
    right: 12px !important;
    left: auto !important;
    max-width: min(360px, calc(100vw - 24px)) !important;
  }
}
