/**
 * Premium Toast Design (jQuery toast plugin by Kamran Ahmed, MIT)
 * Styled to match the Dashboard theme (indigo/violet accent, glass card, Hind Siliguri)
 */
.jq-toast-wrap {
  --t-text: #1e293b;
  --t-muted: #94a3b8;
  --t-line: #eceef5;
  --t-bg: #ffffff;
  --t-shadow: 0 18px 40px rgba(30, 41, 59, .16), 0 4px 12px rgba(30, 41, 59, .08);
  display: block;
  position: fixed;
  width: 380px;
  max-width: calc(100vw - 24px);
  min-width: 0;
  pointer-events: none !important;
  margin: 0;
  padding: 0;
  letter-spacing: normal;
  z-index: 99999 !important;
}
.jq-toast-wrap * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.jq-toast-wrap.bottom-left  { bottom: 20px; left: 20px; }
.jq-toast-wrap.bottom-right { bottom: 20px; right: 20px; }
.jq-toast-wrap.top-left     { top: 20px; left: 20px; }
.jq-toast-wrap.top-right    { top: calc(env(safe-area-inset-top, 0px) + 18px); right: 20px; }

/* ===== Toast card ===== */
.jq-toast-single {
  --c: #6366f1;
  --c2: #8b5cf6;
  display: block;
  width: 100%;
  min-height: 62px;
  padding: 15px 44px 17px 66px;
  margin: 0 0 12px;
  border-radius: 16px;
  border: 1px solid var(--t-line);
  font-size: 14.5px;
  font-weight: 600;
  font-family: 'Hind Siliguri', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
  pointer-events: all !important;
  color: var(--t-text);
  background-color: var(--t-bg);
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, #fff) 0%, #fff 62%);
  box-shadow: var(--t-shadow);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: jqToastIn .5s cubic-bezier(.2, .9, .3, 1.15) backwards;
}

/* Left accent edge */
.jq-toast-single::after {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--c), var(--c2));
}

/* Icon tile */
.jq-toast-single::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border-radius: 12px;
  background-color: var(--c);
  background-image:
    var(--ico, none),
    linear-gradient(145deg, var(--c), var(--c2));
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: 20px 20px, 100% 100%;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 38%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .28);
}

.jq-toast-single h2 {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 3px;
  background: none;
  color: var(--t-text);
  line-height: 1.35;
  letter-spacing: normal;
}
.jq-toast-single a {
  color: var(--c);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px dashed currentColor;
  padding-bottom: 1px;
  font-size: 13px;
}
.jq-toast-single ul {
  margin: 0;
  background: none;
  padding: 0;
}
.jq-toast-single ul li {
  list-style-type: none !important;
  line-height: 1.5;
  background: none;
  margin: 0;
  padding: 0;
  letter-spacing: normal;
}

/* ===== Close button ===== */
.close-jq-toast-single {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  line-height: 25px;
  text-align: center;
  font-size: 18px;
  font-weight: 400;
  border-radius: 50%;
  color: var(--t-muted);
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.close-jq-toast-single:hover {
  background: color-mix(in srgb, var(--c) 12%, transparent);
  color: var(--c);
  transform: rotate(90deg);
}

/* ===== Progress loader (bottom) ===== */
.jq-toast-loader {
  display: block;
  position: absolute;
  top: auto;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  border-radius: 0 3px 3px 0;
  background-image: linear-gradient(90deg, var(--c), var(--c2), #ec4899);
}
.jq-toast-loaded {
  width: 100%;
}

/* ===== Types ===== */
.jq-has-icon {
  background-repeat: no-repeat;
}
.jq-icon-success {
  --c: #10b981;
  --c2: #059669;
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.jq-icon-info {
  --c: #6366f1;
  --c2: #8b5cf6;
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 11v6'/%3E%3Ccircle cx='12' cy='7' r='.6' fill='%23fff'/%3E%3C/svg%3E");
}
.jq-icon-warning,
.jq-icon-error {
  --c: #e11d48;
  --c2: #f43f5e;
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5v7'/%3E%3Ccircle cx='12' cy='17.6' r='.6' fill='%23fff'/%3E%3C/svg%3E");
}

/* ===== Dark mode (dashboard .dark) ===== */
.dark .jq-toast-wrap {
  --t-text: #e2e8f0;
  --t-muted: #7c889c;
  --t-line: #2a3342;
  --t-bg: #151b26;
  --t-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 4px 12px rgba(0, 0, 0, .3);
}
.dark .jq-toast-single {
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, #151b26) 0%, #151b26 62%);
}

/* ===== Mobile ===== */
@media (max-width: 575px) {
  .jq-toast-wrap,
  .jq-toast-wrap.top-right,
  .jq-toast-wrap.top-left {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
  .jq-toast-wrap.bottom-left,
  .jq-toast-wrap.bottom-right {
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  }
  .jq-toast-single {
    padding-left: 62px;
    font-size: 14px;
  }
}

/* ===== Animation ===== */
@keyframes jqToastIn {
  0%   { transform: translateX(28px) scale(.96); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .jq-toast-single { animation: none; }
  .close-jq-toast-single:hover { transform: none; }
}
