.toast-title {
  font-weight: 600;
}
.toast-message {
  -ms-word-wrap: break-word;
  word-wrap: break-word;
}
.toast-message a,
.toast-message label {
  color: inherit;
  text-decoration: underline;
}
.toast-message a:hover {
  opacity: 0.8;
  text-decoration: none;
}
.toast-close-button {
  position: absolute;
  right: 8px;
  top: 8px;
  float: none;
  font-size: 18px;
  font-weight: 500;
  color: #1a1c21;
  opacity: 0.7;
  line-height: 1;
  cursor: pointer;
  text-shadow: none;
  padding: 6px;
}
.toast-close-button:hover,
.toast-close-button:focus {
  color: #1a1c21;
  text-decoration: none;
  cursor: pointer;
  opacity: 1;
}
.rtl .toast-close-button {
  left: 8px;
  right: auto;
  float: none;
}
button.toast-close-button {
  padding: 6px;
  cursor: pointer;
  background: transparent;
  border: 0;
  -webkit-appearance: none;
}
.toast-top-center {
  top: 0;
  right: 0;
  width: 100%;
}
.toast-bottom-center {
  bottom: 0;
  right: 0;
  width: 100%;
}
.toast-top-full-width {
  top: 0;
  right: 0;
  width: 100%;
}
.toast-bottom-full-width {
  bottom: 0;
  right: 0;
  width: 100%;
}
.toast-top-left {
  top: 16px;
  left: 16px;
}
.toast-top-right {
  top: 16px;
  right: 16px;
}
.toast-bottom-right {
  right: 16px;
  bottom: 16px;
}
.toast-bottom-left {
  bottom: 16px;
  left: 16px;
}
#toast-container {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
}

#toast-container * {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

/*
  HappyPay / Members React toast parity
  - default (success / info / warning): white bordered card, dark Poppins text
  - error (destructive): solid red card, light text
  Matches dashboard-flow-revamp-redux shadcn toast + notify.ts variants.
*/
#toast-container > div {
  position: relative;
  pointer-events: auto;
  overflow: hidden;
  margin: 0 0 8px;
  padding: 16px 40px 16px 48px !important;
  width: 380px;
  max-width: calc(100vw - 32px);
  border-radius: 10px !important;
  border: 1px solid #ede9d9;
  background-color: #ffffff !important;
  background-position: 14px 16px !important;
  background-size: 20px 20px !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1) !important;
  color: #1a1c21 !important;
  opacity: 1;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#toast-container > div.rtl {
  direction: rtl;
  padding: 16px 48px 16px 40px !important;
  background-position: right 14px top 16px !important;
}

#toast-container > div:hover {
  opacity: 1;
  cursor: default;
  transform: none;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1) !important;
}

#toast-container .toast-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 4px;
  color: inherit;
}

#toast-container .toast-message {
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  margin-bottom: 0;
  color: inherit;
  opacity: 0.9;
}

#toast-container > .toast-info,
#toast-container > .toast-success,
#toast-container > .toast-warning {
  background-color: #ffffff !important;
  color: #1a1c21 !important;
  border-color: #ede9d9;
}

#toast-container > .toast-error {
  background-color: #ef4444 !important;
  color: #f8fafc !important;
  border-color: #ef4444;
}

#toast-container > .toast-error .toast-close-button {
  color: #f8fafc;
  opacity: 0.7;
}
#toast-container > .toast-error .toast-close-button:hover,
#toast-container > .toast-error .toast-close-button:focus {
  color: #ffffff;
  opacity: 1;
}

#toast-container > .toast-info {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231a1c21' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='16' x2='12' y2='12'/><line x1='12' y1='8' x2='12.01' y2='8'/></svg>") !important;
}
#toast-container > .toast-success {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232c8d56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/><polyline points='22 4 12 14.01 9 11.01'/></svg>") !important;
}
#toast-container > .toast-warning {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.29 3.86 1.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'/><line x1='12' y1='9' x2='12' y2='13'/><line x1='12' y1='17' x2='12.01' y2='17'/></svg>") !important;
}
#toast-container > .toast-error {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f8fafc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='12'/><line x1='12' y1='16' x2='12.01' y2='16'/></svg>") !important;
}

#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div {
  width: 300px;
  margin-left: auto;
  margin-right: auto;
}
#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div {
  width: 96%;
  margin-left: auto;
  margin-right: auto;
}

.toast,
.toast-success,
.toast-error,
.toast-info,
.toast-warning {
  background-color: #fff;
}

.toast-progress {
  display: none;
}

@media (max-width: 767px) {
  #toast-container.toast-top-right,
  #toast-container.toast-top-left {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: 16px;
    left: 16px;
  }
  #toast-container.toast-top-right > div,
  #toast-container.toast-top-left > div {
    width: 100% !important;
    max-width: none;
    margin: 0 0 8px 0;
  }
}
