/* Tokens live on the container only so .vyrn-toast inherits dark values under html.dark */
.vyrn-toast-container {
  --vyrn-bg: #ffffff;
  --vyrn-border: #e5e7eb;
  --vyrn-text: #0f172a;
  --vyrn-description: rgba(15, 23, 42, 0.7);
  --vyrn-close: #64748b;
  --vyrn-close-hover: #334155;
  --vyrn-radius: 12px;
  --vyrn-padding: 16px;
  --vyrn-gap: 12px;
  --vyrn-message-size: 14px;
  --vyrn-description-size: 13px;
  --vyrn-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);

  --vyrn-bg-default: #f8fafc;
  --vyrn-bg-success: #ecfdf3;
  --vyrn-bg-error: #fef2f2;
  --vyrn-bg-info: #eff6ff;
  --vyrn-bg-warning: #fffbeb;

  --vyrn-icon-default: #475569;
  --vyrn-icon-success: #16a34a;
  --vyrn-icon-error: #dc2626;
  --vyrn-icon-info: #2563eb;
  --vyrn-icon-warning: #d97706;

  --vyrn-progress-success-base: #10b981;
  --vyrn-progress-success-highlight: #34d399;
  --vyrn-progress-success-glow: rgba(16, 185, 129, 0.4);
  --vyrn-progress-error-base: #ef4444;
  --vyrn-progress-error-highlight: #f87171;
  --vyrn-progress-error-glow: rgba(239, 68, 68, 0.4);
  --vyrn-progress-warning-base: #f59e0b;
  --vyrn-progress-warning-highlight: #fbbf24;
  --vyrn-progress-warning-glow: rgba(245, 158, 11, 0.4);
  --vyrn-progress-info-base: #3b82f6;
  --vyrn-progress-info-highlight: #60a5fa;
  --vyrn-progress-info-glow: rgba(59, 130, 246, 0.4);
  --vyrn-progress-default-base: #6366f1;
  --vyrn-progress-default-highlight: #818cf8;
  --vyrn-progress-default-glow: rgba(99, 102, 241, 0.4);
}

.dark .vyrn-toast-container,
[data-theme='dark'] .vyrn-toast-container {
  --vyrn-bg: #0f1115;
  --vyrn-border: #2d333b;
  --vyrn-text: #e2e8f0;
  --vyrn-description: rgba(226, 232, 240, 0.75);
  --vyrn-close: #94a3b8;
  --vyrn-close-hover: #e2e8f0;
  --vyrn-shadow: 0 8px 20px rgba(2, 6, 23, 0.45);

  /* Rich semantic tints (visible on dark pages; not overridden after removing .dark .vyrn-toast bg) */
  --vyrn-bg-default: #121212;
  --vyrn-bg-success: #166534;
  --vyrn-bg-error: #991b1b;
  --vyrn-bg-info: #1d4ed8;
  --vyrn-bg-warning: #b45309;

  --vyrn-icon-default: #cbd5e1;
  --vyrn-icon-success: #4ade80;
  --vyrn-icon-error: #fb7185;
  --vyrn-icon-info: #60a5fa;
  --vyrn-icon-warning: #fbbf24;
}

.vyrn-toast-container {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  max-width: 356px;
  width: calc(100% - 24px);
  offset: 32px;
  pointer-events: none;
  padding: 0;
  bottom: 0;
  right: 0;
  gap: 0;
}

/* Ensure container doesn't overflow on small screens */
@media (max-width: 640px) {
  .vyrn-toast-container {
    max-width: calc(100% - 1rem);
    width: calc(100% - 1rem);
  }
}

.vyrn-toast {
  display: flex;
  overflow: hidden;
  position: relative;
  pointer-events: auto;
  border-radius: var(--vyrn-radius);
  border: 1px solid var(--vyrn-border);
  box-shadow: var(--vyrn-shadow);
  background-color: var(--vyrn-bg);
  color: var(--vyrn-text);
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  will-change: transform, opacity, height;
  backface-visibility: hidden;
  transform: translateZ(0);
  /* Touch-friendly on mobile */
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.vyrn-toast-clickable {
  cursor: pointer;
}

.vyrn-toast-clickable:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.vyrn-toast-loading {
  border-left: 3px solid #3b82f6;
}

.vyrn-toast-priority-high {
  border-left-width: 3px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.vyrn-toast-priority-low {
  opacity: 0.9;
}

.vyrn-toast-expandable {
  cursor: pointer;
}

.vyrn-toast-expanded {
  max-height: none;
}
/* Do not set background here: it beats .vyrn-toast-rich-* (one class) and strips rich colors in dark mode.
   Base .vyrn-toast already uses var(--vyrn-bg) / var(--vyrn-border); rich + type rules supply their own surfaces. */

.vyrn-toast-stacked {
  height: 60px;
  cursor: pointer;
  transform-origin: top;
  margin-bottom: 0;
  overflow: hidden;
}

.vyrn-toast-stacked .vyrn-toast-content {
  overflow: hidden;
}

.vyrn-toast-stacked .vyrn-toast-message-wrapper {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vyrn-toast-stacked .vyrn-toast-message {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.vyrn-toast-stacked .vyrn-toast-message > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: block;
}

/* Custom toast specific styling for stacked state */
.vyrn-toast-stacked .vyrn-toast-message-stacked-custom {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 20px;
  max-height: 40px;
  word-break: break-word;
  text-overflow: ellipsis;
}

.vyrn-toast-stacked .vyrn-toast-message-stacked-custom * {
  margin: 0;
  padding: 0;
  display: inline;
  line-height: inherit;
  font-size: inherit;
}

.vyrn-toast-stacked .vyrn-toast-message-stacked-custom p,
.vyrn-toast-stacked .vyrn-toast-message-stacked-custom div,
.vyrn-toast-stacked .vyrn-toast-message-stacked-custom span {
  display: inline;
  margin: 0;
  padding: 0;
}

.vyrn-toast-stacked .vyrn-toast-message-stacked-custom strong,
.vyrn-toast-stacked .vyrn-toast-message-stacked-custom b {
  font-weight: 600;
  display: inline;
}

.vyrn-toast-content {
  display: flex;
  align-items: flex-start;
  padding: var(--vyrn-padding);
  min-height: 48px;
  width: 100%;
  gap: var(--vyrn-gap);
}

.vyrn-toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.vyrn-toast-icon-loading {
  animation: vyrn-spin 1s linear infinite;
}

/* Density modes */
.vyrn-toast-size-sm {
  --vyrn-padding: 12px;
  --vyrn-gap: 10px;
  --vyrn-radius: 10px;
  --vyrn-message-size: 13px;
  --vyrn-description-size: 12px;
}

.vyrn-toast-size-md {
  --vyrn-padding: 16px;
  --vyrn-gap: 12px;
  --vyrn-radius: 12px;
  --vyrn-message-size: 14px;
  --vyrn-description-size: 13px;
}

.vyrn-toast-size-lg {
  --vyrn-padding: 18px;
  --vyrn-gap: 14px;
  --vyrn-radius: 14px;
  --vyrn-message-size: 15px;
  --vyrn-description-size: 14px;
}

/* Micro interactions */
.vyrn-toast-success-state .vyrn-toast-icon,
.vyrn-toast-error-state .vyrn-toast-icon {
  animation: vyrn-icon-pulse 320ms ease-out;
}

@keyframes vyrn-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes vyrn-icon-pulse {
  0% {
    transform: scale(0.92);
    filter: brightness(0.95);
  }
  60% {
    transform: scale(1.08);
    filter: brightness(1.08);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.vyrn-toast-message-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  /* Ensure proper text wrapping on all screen sizes */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.vyrn-toast-message {
  font-size: var(--vyrn-message-size);
  line-height: 1.4;
  font-weight: 500;
  color: inherit;
  margin: 0;
  padding: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Prevent text overflow on small screens when not expanded */
@media (max-width: 640px) {
  .vyrn-toast:not(.vyrn-toast-expanded) .vyrn-toast-message {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  
  /* Allow full text when expanded */
  .vyrn-toast-expanded .vyrn-toast-message {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    text-overflow: unset;
  }
}

.vyrn-toast-description {
  font-size: var(--vyrn-description-size);
  line-height: 1.4;
  font-weight: 400;
  color: var(--vyrn-description);
  margin: 0;
  padding: 0;
}

.dark .vyrn-toast-description,
[data-theme='dark'] .vyrn-toast-description {
  color: var(--vyrn-description);
}

.vyrn-toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.vyrn-toast-action {
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  /* Ensure touch-friendly on mobile */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px; /* Minimum touch target */
}

.vyrn-toast-action-default {
  background-color: #f1f3f5;
  color: #495057;
}

.vyrn-toast-action-primary {
  background-color: #339af0;
  color: #ffffff;
}

.vyrn-toast-action-secondary {
  background-color: #868e96;
  color: #ffffff;
}

.vyrn-toast-action-danger {
  background-color: #fa5252;
  color: #ffffff;
}

.vyrn-toast-input-form {
  display: flex;
  padding: 0 16px 12px;
}

.vyrn-toast-input {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 13px;
}

.vyrn-toast-input-submit {
  cursor: pointer;
  padding: 8px 16px;
  background-color: #339af0;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  margin-left: 8px;
  min-height: 36px; /* Minimum touch target */
  /* Touch-friendly on mobile */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.vyrn-toast-close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px; /* Add padding for larger touch target */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vyrn-close);
  transition: color 0.2s ease;
  min-width: 32px;
  min-height: 32px;
  /* Ensure touch-friendly on mobile */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.vyrn-toast-close:hover {
  color: var(--vyrn-close-hover);
}

.vyrn-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background-color: rgba(51, 154, 240, 0.5);
}

/* -----------------------start Color Styles from here --------------------------------------*/
/* Light Mode */
.vyrn-toast-success {
  border: 1.5px solid #00b894; /* Mint green */
  background-color: #e6fff7;
}

.vyrn-toast-error {
  border: 1.5px solid #e74c3c; /* Coral red */
  background-color: #fff5f5;
}

.vyrn-toast-info {
  border: 1.5px solid #3498db; /* Ocean blue */
  background-color: #f0f7ff;
}

.vyrn-toast-warning {
  border: 1.5px solid #f1c40f; /* Sunflower yellow */
  background-color: #fffbeb;
}

/* Dark Mode */
.dark .vyrn-toast-success,
[data-theme='dark'] .vyrn-toast-success {
  border: 1.5px solid #00d1a1; /* Luminous mint */
  background-color: #0c3830; /* Deep forest */
}

.dark .vyrn-toast-error,
[data-theme='dark'] .vyrn-toast-error {
  border: 1.5px solid #ff6b6b; /* Bright coral */
  background-color: #2d1717; /* Dark burgundy */
}

.dark .vyrn-toast-info,
[data-theme='dark'] .vyrn-toast-info {
  border: 1.5px solid #74b9ff; /* Galaxy blue */
  background-color: #15314a; /* Night sky */
}

.dark .vyrn-toast-warning,
[data-theme='dark'] .vyrn-toast-warning {
  border: 1.5px solid #ffd43b; /* Star yellow */
  background-color: #332b00; /* Dark amber */
}

/* Icons */
.vyrn-toast-success .vyrn-toast-icon {
  color: #00b894;
}

.vyrn-toast-error .vyrn-toast-icon {
  color: #e74c3c;
}

.vyrn-toast-info .vyrn-toast-icon {
  color: #3498db;
}

.vyrn-toast-warning .vyrn-toast-icon {
  color: #f1c40f;
}

/* Dark Mode Icons */
.dark .vyrn-toast-success .vyrn-toast-icon,
[data-theme='dark'] .vyrn-toast-success .vyrn-toast-icon {
  color: #00d1a1;
}

.dark .vyrn-toast-error .vyrn-toast-icon,
[data-theme='dark'] .vyrn-toast-error .vyrn-toast-icon {
  color: #ff6b6b;
}

.dark .vyrn-toast-info .vyrn-toast-icon,
[data-theme='dark'] .vyrn-toast-info .vyrn-toast-icon {
  color: #74b9ff;
}

.dark .vyrn-toast-warning .vyrn-toast-icon,
[data-theme='dark'] .vyrn-toast-warning .vyrn-toast-icon {
  color: #ffd43b;
}

/* Messages */
.vyrn-toast-success .vyrn-toast-message {
  color: #006c55;
}

.vyrn-toast-error .vyrn-toast-message {
  color: #c0392b;
}

.vyrn-toast-info .vyrn-toast-message {
  color: #2874a6;
}

.vyrn-toast-warning .vyrn-toast-message {
  color: #b7950b;
}

/* Dark Mode Messages */
.dark .vyrn-toast-success .vyrn-toast-message,
[data-theme='dark'] .vyrn-toast-success .vyrn-toast-message {
  color: #9ffff0;
}

.dark .vyrn-toast-error .vyrn-toast-message,
[data-theme='dark'] .vyrn-toast-error .vyrn-toast-message {
  color: #ffcece;
}

.dark .vyrn-toast-info .vyrn-toast-message,
[data-theme='dark'] .vyrn-toast-info .vyrn-toast-message {
  color: #bae1ff;
}

.dark .vyrn-toast-warning .vyrn-toast-message,
[data-theme='dark'] .vyrn-toast-warning .vyrn-toast-message {
  color: #fff3bf;
}

/* Color Message End */

/* Rich Colors V2 */
.vyrn-toast-rich-default,
.vyrn-toast-rich-custom {
  background-color: var(--vyrn-bg-default);
}

.vyrn-toast-rich-success {
  background-color: var(--vyrn-bg-success);
}

.vyrn-toast-rich-error {
  background-color: var(--vyrn-bg-error);
}

.vyrn-toast-rich-info {
  background-color: var(--vyrn-bg-info);
}

.vyrn-toast-rich-warning {
  background-color: var(--vyrn-bg-warning);
}

/* -------- richColors: minimal vs soft vs solid -------- */

/* Minimal: airy, no semantic stroke (light). Dark: neutral hairline only — no colored rim (differs from soft). */
.vyrn-toast-rich-mode-minimal {
  border-color: transparent;
  box-shadow: var(--vyrn-shadow);
}

.dark .vyrn-toast-rich-mode-minimal,
[data-theme='dark'] .vyrn-toast-rich-mode-minimal {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Dark minimal: deepest tints (clearly dimmer than soft/solid — same hue family, lower key) */
.dark .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-default,
.dark .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-custom,
[data-theme='dark'] .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-default,
[data-theme='dark'] .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-custom {
  background-color: #0f1115;
}

.dark .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-success,
[data-theme='dark'] .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-success {
  background-color: #0f2918;
}

.dark .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-error,
[data-theme='dark'] .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-error {
  background-color: #2a0c0c;
}

.dark .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-info,
[data-theme='dark'] .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-info {
  background-color: #152042;
}

.dark .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-warning,
[data-theme='dark'] .vyrn-toast-rich-mode-minimal.vyrn-toast-rich-warning {
  background-color: #3d2604;
}

/* Soft: semantic-tinted border + soft ring so it never reads like minimal (light + dark). */
.vyrn-toast-rich-mode-soft {
  border-width: 1px;
  border-style: solid;
}

.vyrn-toast-rich-mode-soft.vyrn-toast-rich-default,
.vyrn-toast-rich-mode-soft.vyrn-toast-rich-custom {
  border-color: rgba(71, 85, 105, 0.45);
  box-shadow:
    0 2px 10px rgba(15, 23, 42, 0.07),
    0 0 0 1px rgba(148, 163, 184, 0.25);
}

.vyrn-toast-rich-mode-soft.vyrn-toast-rich-success {
  border-color: rgba(22, 163, 74, 0.45);
  box-shadow:
    0 2px 10px rgba(22, 163, 74, 0.12),
    0 0 0 1px rgba(22, 163, 74, 0.18);
}

.vyrn-toast-rich-mode-soft.vyrn-toast-rich-error {
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow:
    0 2px 10px rgba(220, 38, 38, 0.1),
    0 0 0 1px rgba(220, 38, 38, 0.16);
}

.vyrn-toast-rich-mode-soft.vyrn-toast-rich-info {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow:
    0 2px 10px rgba(37, 99, 235, 0.1),
    0 0 0 1px rgba(37, 99, 235, 0.16);
}

.vyrn-toast-rich-mode-soft.vyrn-toast-rich-warning {
  border-color: rgba(217, 119, 6, 0.5);
  box-shadow:
    0 2px 10px rgba(217, 119, 6, 0.12),
    0 0 0 1px rgba(217, 119, 6, 0.2);
}

.dark .vyrn-toast-rich-mode-soft.vyrn-toast-rich-default,
.dark .vyrn-toast-rich-mode-soft.vyrn-toast-rich-custom,
[data-theme='dark'] .vyrn-toast-rich-mode-soft.vyrn-toast-rich-default,
[data-theme='dark'] .vyrn-toast-rich-mode-soft.vyrn-toast-rich-custom {
  background-color: #141414;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 24px rgba(255, 255, 255, 0.04),
    0 8px 26px rgba(0, 0, 0, 0.55);
}

.dark .vyrn-toast-rich-mode-soft.vyrn-toast-rich-success,
[data-theme='dark'] .vyrn-toast-rich-mode-soft.vyrn-toast-rich-success {
  background-color: #166534;
  border-width: 2px;
  border-color: rgba(134, 239, 172, 0.65);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.28),
    0 0 28px rgba(74, 222, 128, 0.18),
    0 8px 26px rgba(0, 0, 0, 0.5);
}

.dark .vyrn-toast-rich-mode-soft.vyrn-toast-rich-error,
[data-theme='dark'] .vyrn-toast-rich-mode-soft.vyrn-toast-rich-error {
  background-color: #991b1b;
  border-width: 2px;
  border-color: rgba(254, 202, 202, 0.55);
  box-shadow:
    0 0 0 1px rgba(251, 113, 133, 0.25),
    0 0 28px rgba(251, 113, 133, 0.14),
    0 8px 26px rgba(0, 0, 0, 0.5);
}

.dark .vyrn-toast-rich-mode-soft.vyrn-toast-rich-info,
[data-theme='dark'] .vyrn-toast-rich-mode-soft.vyrn-toast-rich-info {
  background-color: #1d4ed8;
  border-width: 2px;
  border-color: rgba(147, 197, 253, 0.55);
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.25),
    0 0 28px rgba(59, 130, 246, 0.18),
    0 8px 26px rgba(0, 0, 0, 0.5);
}

.dark .vyrn-toast-rich-mode-soft.vyrn-toast-rich-warning,
[data-theme='dark'] .vyrn-toast-rich-mode-soft.vyrn-toast-rich-warning {
  background-color: #b45309;
  border-width: 2px;
  border-color: rgba(253, 230, 138, 0.55);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.22),
    0 0 28px rgba(251, 191, 36, 0.12),
    0 8px 26px rgba(0, 0, 0, 0.5);
}

/* solid => stronger color surfaces + hidden border */
.vyrn-toast-rich-mode-solid.vyrn-toast-rich-default,
.vyrn-toast-rich-mode-solid.vyrn-toast-rich-custom {
  background-color: #e2e8f0;
}

.vyrn-toast-rich-mode-solid.vyrn-toast-rich-success {
  background-color: #bbf7d0;
}

.vyrn-toast-rich-mode-solid.vyrn-toast-rich-error {
  background-color: #fecaca;
}

.vyrn-toast-rich-mode-solid.vyrn-toast-rich-info {
  background-color: #bfdbfe;
}

.vyrn-toast-rich-mode-solid.vyrn-toast-rich-warning {
  background-color: #fde68a;
}

.vyrn-toast-rich-mode-solid {
  border-color: transparent;
}

/* Solid in dark: full-strength semantic fills (not grey slabs) — mirrors light “solid” intent */
.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-default,
.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-custom,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-default,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-custom {
  background-color: #1a1a1a;
  border-width: 1px;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 14px 36px rgba(0, 0, 0, 0.6);
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-success,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-success {
  background-color: #22c55e;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(21, 128, 61, 0.35),
    0 14px 40px rgba(34, 197, 94, 0.35);
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-error,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-error {
  background-color: #ef4444;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(185, 28, 28, 0.4),
    0 14px 40px rgba(239, 68, 68, 0.35);
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-info,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-info {
  background-color: #3b82f6;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(29, 78, 216, 0.4),
    0 14px 40px rgba(59, 130, 246, 0.35);
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-warning,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-warning {
  background-color: #f59e0b;
  border-color: rgba(120, 53, 15, 0.35);
  box-shadow:
    0 0 0 1px rgba(194, 65, 12, 0.35),
    0 14px 40px rgba(245, 158, 11, 0.3);
}

/* Dark solid: dark text on bright fills for contrast */
.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-success .vyrn-toast-message,
.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-success .vyrn-toast-description,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-success .vyrn-toast-message,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-success .vyrn-toast-description {
  color: #052e16;
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-error .vyrn-toast-message,
.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-error .vyrn-toast-description,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-error .vyrn-toast-message,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-error .vyrn-toast-description {
  color: #450a0a;
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-info .vyrn-toast-message,
.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-info .vyrn-toast-description,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-info .vyrn-toast-message,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-info .vyrn-toast-description {
  color: #0f172a;
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-warning .vyrn-toast-message,
.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-warning .vyrn-toast-description,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-warning .vyrn-toast-message,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-warning .vyrn-toast-description {
  color: #422006;
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-default .vyrn-toast-message,
.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-custom .vyrn-toast-message,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-default .vyrn-toast-message,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-custom .vyrn-toast-message {
  color: #e2e8f0;
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-default .vyrn-toast-description,
.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-custom .vyrn-toast-description,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-default .vyrn-toast-description,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-custom .vyrn-toast-description {
  color: rgba(226, 232, 240, 0.78);
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-success .vyrn-toast-icon,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-success .vyrn-toast-icon {
  color: #052e16;
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-error .vyrn-toast-icon,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-error .vyrn-toast-icon {
  color: #450a0a;
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-info .vyrn-toast-icon,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-info .vyrn-toast-icon {
  color: #0f172a;
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-warning .vyrn-toast-icon,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-warning .vyrn-toast-icon {
  color: #422006;
}

.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-default .vyrn-toast-icon,
.dark .vyrn-toast-rich-mode-solid.vyrn-toast-rich-custom .vyrn-toast-icon,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-default .vyrn-toast-icon,
[data-theme='dark'] .vyrn-toast-rich-mode-solid.vyrn-toast-rich-custom .vyrn-toast-icon {
  color: #e2e8f0;
}

/* Rich Colors - icon accents */
.vyrn-toast-rich-success .vyrn-toast-icon {
  color: var(--vyrn-icon-success);
}

.vyrn-toast-rich-error .vyrn-toast-icon {
  color: var(--vyrn-icon-error);
}

.vyrn-toast-rich-info .vyrn-toast-icon {
  color: var(--vyrn-icon-info);
}

.vyrn-toast-rich-warning .vyrn-toast-icon {
  color: var(--vyrn-icon-warning);
}

.vyrn-toast-rich-default .vyrn-toast-icon,
.vyrn-toast-rich-custom .vyrn-toast-icon {
  color: var(--vyrn-icon-default);
}

/* Rich Colors - close button tone */
.vyrn-toast-rich-default .vyrn-toast-close,
.vyrn-toast-rich-custom .vyrn-toast-close,
.vyrn-toast-rich-success .vyrn-toast-close,
.vyrn-toast-rich-error .vyrn-toast-close,
.vyrn-toast-rich-info .vyrn-toast-close,
.vyrn-toast-rich-warning .vyrn-toast-close {
  color: var(--vyrn-close);
}

.vyrn-toast-rich-default .vyrn-toast-close:hover,
.vyrn-toast-rich-custom .vyrn-toast-close:hover,
.vyrn-toast-rich-success .vyrn-toast-close:hover,
.vyrn-toast-rich-error .vyrn-toast-close:hover,
.vyrn-toast-rich-info .vyrn-toast-close:hover,
.vyrn-toast-rich-warning .vyrn-toast-close:hover {
  color: var(--vyrn-close-hover);
}

/* Close  Icon Css Start */
/* Add these styles to your CSS */
.vyrn-toast-success .vyrn-toast-close {
  color: #2b8a3e;
}

.vyrn-toast-error .vyrn-toast-close {
  color: #c92a2a;
}

.vyrn-toast-info .vyrn-toast-close {
  color: #1864ab;
}

.vyrn-toast-warning .vyrn-toast-close {
  color: #e67700;
}

/* Dark mode adjustments */
.dark .vyrn-toast-success .vyrn-toast-close,
[data-theme='dark'] .vyrn-toast-success .vyrn-toast-close {
  color: #69db7c;
}

.dark .vyrn-toast-error .vyrn-toast-close,
[data-theme='dark'] .vyrn-toast-error .vyrn-toast-close {
  color: #ff6b6b;
}

.dark .vyrn-toast-info .vyrn-toast-close,
[data-theme='dark'] .vyrn-toast-info .vyrn-toast-close {
  color: #4dabf7;
}

.dark .vyrn-toast-warning .vyrn-toast-close,
[data-theme='dark'] .vyrn-toast-warning .vyrn-toast-close {
  color: #ffd43b;
}

/* Update existing close button styles */
.vyrn-toast-close {
  color: #666666; /* Default color when color=false */
}

.dark .vyrn-toast-close,
[data-theme='dark'] .vyrn-toast-close {
  color: #adb5bd; /* Dark mode default */
}

.vyrn-toast-close:hover {
  color: var(--hover-color, #495057); /* Fallback for default */
}

/* Add hover states for colored versions */
.vyrn-toast-success .vyrn-toast-close:hover {
  color: #2f9e44;
}

.vyrn-toast-error .vyrn-toast-close:hover {
  color: #e03131;
}

.vyrn-toast-info .vyrn-toast-close:hover {
  color: #1c7ed6;
}

.vyrn-toast-warning .vyrn-toast-close:hover {
  color: #f59f00;
}

/* Dark mode hover states */
.dark .vyrn-toast-success .vyrn-toast-close:hover,
[data-theme='dark'] .vyrn-toast-success .vyrn-toast-close:hover {
  color: #8ce99a;
}

.dark .vyrn-toast-error .vyrn-toast-close:hover,
[data-theme='dark'] .vyrn-toast-error .vyrn-toast-close:hover {
  color: #ff8787;
}

.dark .vyrn-toast-info .vyrn-toast-close:hover,
[data-theme='dark'] .vyrn-toast-info .vyrn-toast-close:hover {
  color: #74c0fc;
}

.dark .vyrn-toast-warning .vyrn-toast-close:hover,
[data-theme='dark'] .vyrn-toast-warning .vyrn-toast-close:hover {
  color: #ffe066;
}

/* Cancel Button */
.vyrn-toast-cancel {
  padding: 0 16px 12px;
  margin-top: 8px;
}

.vyrn-toast-cancel-button {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background-color: rgba(0, 0, 0, 0.05);
  color: #666;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  min-height: 44px; /* Minimum touch target */
  /* Touch-friendly on mobile */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.vyrn-toast-cancel-button:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.dark .vyrn-toast-cancel-button,
[data-theme='dark'] .vyrn-toast-cancel-button {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e9ecef;
  border-color: rgba(255, 255, 255, 0.2);
}

.dark .vyrn-toast-cancel-button:hover,
[data-theme='dark'] .vyrn-toast-cancel-button:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Close   Icon Css End  */

/* -----------------------End Color Styles from here --------------------------------------*/

/* Dark mode */
/* Dark mode - Only apply to default toasts */
.dark .vyrn-toast:not([class*='vyrn-toast-']),
[data-theme='dark'] .vyrn-toast:not([class*='vyrn-toast-']) {
  background-color: black;
  border: 1px solid #2d2d2d;
}

.dark
  .vyrn-toast:not(.vyrn-toast-success):not(.vyrn-toast-error):not(.vyrn-toast-info):not(
    .vyrn-toast-warning
  ):not([class*='dark:'])
  .vyrn-toast-message,
[data-theme='dark']
  .vyrn-toast:not(.vyrn-toast-success):not(.vyrn-toast-error):not(.vyrn-toast-info):not(
    .vyrn-toast-warning
  ):not([class*='dark:'])
  .vyrn-toast-message {
  color: #e9ecef;
}

.dark .vyrn-toast-action-default,
[data-theme='dark'] .vyrn-toast-action-default {
  background-color: #343a40;
  color: #f1f3f5;
}

.dark .vyrn-toast-input,
[data-theme='dark'] .vyrn-toast-input {
  background-color: #343a40;
  border-color: #495057;
  color: #e9ecef;
}

.dark .vyrn-toast-close,
[data-theme='dark'] .vyrn-toast-close {
  color: #adb5bd;
}

.dark .vyrn-toast-close:hover,
[data-theme='dark'] .vyrn-toast-close:hover {
  color: #e9ecef;
}

/* Animations */
@keyframes vyrn-toast-enter {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes vyrn-toast-exit {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.vyrn-toast-enter {
  animation: vyrn-toast-enter 0.3s ease-out;
}

.vyrn-toast-exit {
  animation: vyrn-toast-exit 0.3s ease-in;
}

/* Responsive styles */
@media (max-width: 640px) {
  .vyrn-toast-container {
    width: calc(100% - 1rem);
    max-width: calc(100% - 1rem);
    padding: 0;
    /* Position adjustments handled in component */
  }

  .vyrn-toast {
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }


  /* Position-specific hover adjustments
.vyrn-toast-container[data-position*="top"]:hover {
  padding-top: 32px;
}

.vyrn-toast-container[data-position*="bottom"]:hover {
  padding-bottom: 32px;
}

.vyrn-toast-container[data-position*="left"]:hover {
  padding-left: 24px;
}

.vyrn-toast-container[data-position*="right"]:hover {
  padding-right: 24px;
} */



/* 
  .vyrn-toast-container:hover {
    padding: 16px;
    gap: 8px;
    right: 20px;
  }

  .vyrn-toast-container[data-layout="stack"]:hover {
    gap: 12px;
    padding-top: 24px;
    padding-bottom: 24px;
   
  } */




  .vyrn-toast-content {
    padding: 12px;
    min-height: 44px; /* Ensure minimum touch target size */
    gap: 10px;
  }

  .vyrn-toast-message {
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .vyrn-toast-description {
    font-size: 12px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .vyrn-toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .vyrn-toast-actions {
    padding: 0 12px 8px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .vyrn-toast-action {
    padding: 8px 12px; /* Larger touch target */
    font-size: 12px;
    min-height: 44px; /* Minimum touch target size */
    min-width: 44px;
    flex: 1 1 auto;
  }

  .vyrn-toast-input-form {
    padding: 0 12px 8px;
    flex-direction: column;
    gap: 8px;
  }

  .vyrn-toast-input {
    padding: 10px 12px;
    font-size: 14px;
    min-height: 44px; /* Minimum touch target size */
    width: 100%;
  }

  .vyrn-toast-input-submit {
    padding: 10px 16px;
    font-size: 14px;
    min-height: 44px; /* Minimum touch target size */
    width: 100%;
    margin-left: 0;
  }

  .vyrn-toast-close {
    right: 8px;
    width: 44px; /* Larger touch target */
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .vyrn-toast-stacked {
    height: 56px; /* Better visibility on mobile */
    min-height: 56px;
  }

  .vyrn-toast-message-wrapper {
    min-width: 0; /* Allow text to shrink */
    flex: 1;
  }

  /* Ensure text doesn't overflow */
  .vyrn-toast-message,
  .vyrn-toast-description {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }
}

/* Extra small devices */
@media (max-width: 380px) {
  .vyrn-toast-container {
    width: calc(100% - 0.5rem);
    max-width: calc(100% - 0.5rem);
    padding: 0;
  }

  .vyrn-toast-content {
    padding: 10px;
    min-height: 44px;
    gap: 8px;
  }

  .vyrn-toast-message {
    font-size: 12px;
    line-height: 1.4;
  }

  .vyrn-toast-description {
    font-size: 11px;
  }

  .vyrn-toast-icon {
    width: 16px;
    height: 16px;
  }

  .vyrn-toast-actions {
    padding: 0 10px 6px;
    gap: 6px;
    flex-direction: column;
  }

  .vyrn-toast-action {
    padding: 10px 12px;
    font-size: 12px;
    min-height: 44px;
    width: 100%;
  }

  .vyrn-toast-input-form {
    padding: 0 10px 6px;
  }

  .vyrn-toast-input,
  .vyrn-toast-input-submit {
    min-height: 44px;
  }
}

/* Landscape orientation */
@media (max-height: 480px) and (orientation: landscape) {
  .vyrn-toast-container {
    max-height: 80vh;
    overflow-y: auto;
  }

  .vyrn-toast {
    margin-bottom: 4px;
  }

  .vyrn-toast-content {
    padding: 12px;
  }
}
