.fi { display: inline-block; width: 1.333333em; line-height: 1em; height: 1em; vertical-align: -0.125em; background-size: contain; background-position: 50%; background-repeat: no-repeat;}
.fi.fi-us, .fi-us { background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJmbGFnLWljb25zLXVzIiB2aWV3Qm94PSIwIDAgNjQwIDQ4MCI+CiAgPGcgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxnIHN0cm9rZS13aWR0aD0iMXB0Ij4KICAgICAgPHBhdGggZmlsbD0iI2JkM2Q0NCIgZD0iTTAgMGg5MTJ2MzdIMHptMCA3My45aDkxMnYzN0gwem0wIDczLjhoOTEydjM3SDB6bTAgNzMuOGg5MTJ2MzdIMHptMCA3NGg5MTJ2MzYuOEgwem0wIDczLjdoOTEydjM3SDB6TTAgNDQzaDkxMlY0ODBIMHoiLz4KICAgICAgPHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAgMzdoOTEydjM2LjlIMHptMCA3My44aDkxMnYzNi45SDB6bTAgNzMuOGg5MTJ2MzdIMHptMCA3My45aDkxMnYzN0gwem0wIDczLjhoOTEydjM3SDB6bTAgNzMuOGg5MTJ2MzdIMHoiLz4KICAgIDwvZz4KICAgIDxwYXRoIGZpbGw9IiMxOTJmNWQiIGQ9Ik0wIDBoMzY0Ljh2MjU4LjVIMHoiLz4KICAgIDxwYXRoIGZpbGw9IiNmZmYiIGQ9Im0zMC40IDExIDMuNCAxMC4zaDEwLjZsLTguNiA2LjMgMy4zIDEwLjMtOC43LTYuNC04LjYgNi4zTDI1IDI3LjZsLTguNy02LjNoMTAuOXptNjAuOCAwIDMuMyAxMC4zaDEwLjhsLTguNyA2LjMgMy4yIDEwLjMtOC42LTYuNC04LjcgNi4zIDMuMy0xMC4yLTguNi02LjNoMTAuNnptNjAuOCAwIDMuMyAxMC4zSDE2NmwtOC42IDYuMyAzLjMgMTAuMy04LjctNi40LTguNyA2LjMgMy4zL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MtOC43IDYuMyAzLjQtMTAuMy04LjctNi4zaDEwLjZ6bTYwLjggMCAzLjMgMTAuMkgxNjZsLTguNCA2LjMgMy4zIDEwLjItOC43LTYuMy04LjcgNi4zIDMuMy0xMC4zLTguNy02LjNoMTAuOHptNjAuOCAwIDMuMyAxMC4yaDEwLjhsLTguNyA2LjMgMy4zIDEwLjItOC43LTYuMy04LjcgNi4zIDMuNC0xMC4zLTguOC02LjNoMTAuN3ptNjAuOCAwIDMuMyAxMC4yaDEwLjdsLTguNiA2LjMgMy4zIDEwLjItOC43LTYuMy04LjcgNi4zIDMuMy0xMC4zLTguNi02LjNoMTAuN3ptNjAuOCAwIDMuMyAxMC4yaDEwLjhsLTguOCA2LjMgMy40IDEwLjItOC43LTYuMy04LjcgNi4zIDMuNC0xMC4zLTguOC02LjNoMTAuOHoiLz4KICA8L2c+Cjwvc3ZnPg=='); }
/* Custom Dropdown Component Styles */
/* Theme-aware with light/dark mode support */

/* Container */
.custom-dropdown {
  position: relative;
  width: auto;
  display: inline-block;
  font-family: inherit;
}

.custom-dropdown.u-full-width {
  width: 100%;
  display: block;
}

.custom-dropdown.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Trigger Button */
.custom-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  background: var(--input-bg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-medium);
  color: var(--text-color) !important;
  font-size: 0.95em;
  font-family: inherit;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.custom-dropdown-trigger:hover:not(:disabled) {
  border-color: var(--accent-blue) !important;
  background: var(--input-bg) !important;
}

.custom-dropdown-trigger:focus:not(:disabled) {
  outline: none;
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: var(--input-bg) !important;
}

.custom-dropdown-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.custom-dropdown.open .custom-dropdown-trigger {
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.custom-dropdown.open:not(.dropup) .custom-dropdown-trigger {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.custom-dropdown.open.dropup .custom-dropdown-trigger {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Trigger content */
.custom-dropdown-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.custom-dropdown-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-dropdown-placeholder {
  color: var(--muted-text);
  opacity: 0.7;
}

.custom-dropdown-trigger-image {
  width: 24px;
  height: 24px;
  object-fit: cover;
  flex-shrink: 0;
}

.custom-dropdown-trigger-image.circle {
  border-radius: 50%;
}

.custom-dropdown-trigger-image.square {
  border-radius: 4px;
}

.custom-dropdown-trigger-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  color: var(--primary-blue);
}

.custom-dropdown-chevron {
  width: 12px;
  font-size: 12px;
  color: var(--muted-text);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.custom-dropdown.open .custom-dropdown-chevron {
  transform: rotate(180deg);
}

/* Dropdown Panel - uses position:fixed + append to body when open (via JS)
   so it floats above content and is not clipped by overflow or layout */
.custom-dropdown-panel {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: none;
  z-index: 99999 !important;
  background: var(--dropdown-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: none;
  flex-direction: column;
  max-height: 260px;
  animation: dropdownSlideIn 0.15s ease;
  box-sizing: border-box;
}

.custom-dropdown.open .custom-dropdown-panel {
  display: flex;
}

.custom-dropdown-panel.is-open {
  display: flex;
}

.custom-dropdown.dropup .custom-dropdown-panel {
  top: auto;
  bottom: calc(100% + 4px);
  animation: dropdownSlideUp 0.15s ease;
}

.custom-dropdown-panel.attach-bottom {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.custom-dropdown-panel.attach-top {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Search Input (base search field wrapper only) */
.custom-dropdown-search {
  padding-top: 8px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  min-height: calc(var(--search-height, 40px) + 12px);
}

.custom-dropdown-search .search-field {
  width: min(100%, 280px);
  margin: 0 auto;
  align-self: center;
}

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

@keyframes dropdownSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Multi-select Actions */
.custom-dropdown-multi-actions {
  display: flex;
  gap: 6px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.custom-dropdown-action-btn {
  flex: 1;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  color: var(--text-color);
  font-size: 0.85em;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-dropdown-action-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.custom-dropdown-action-btn:active {
  transform: scale(0.98);
}

/* Options List */
.custom-dropdown-options {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  min-width: 0;
}

/* Custom scrollbar */
.custom-dropdown-options::-webkit-scrollbar {
  width: 8px;
}

.custom-dropdown-options::-webkit-scrollbar-track {
  background: transparent;
}

.custom-dropdown-options::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.custom-dropdown-options::-webkit-scrollbar-thumb:hover {
  background: var(--muted-text);
}

/* Option Group Header */
.custom-dropdown-group {
  padding: 4px 12px 2px;
  font-size: 0.75em;
  font-weight: 700;
  color: var(--muted-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(99, 102, 241, 0.05);
  border-bottom: 1px solid var(--border-color);
  margin-top: 4px;
  user-select: none;
}

.custom-dropdown-group:first-child {
  margin-top: 0;
}

/* Option Item */
.custom-dropdown-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
  min-height: 32px;
}

.custom-dropdown-option:hover:not(.disabled) {
  background: rgba(99, 102, 241, 0.08);
}

.custom-dropdown-option.focused:not(.disabled) {
  background: rgba(99, 102, 241, 0.12);
  outline: 2px solid var(--primary-blue);
  outline-offset: -2px;
}

.custom-dropdown-option.selected:not(.disabled) {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-blue);
  font-weight: 500;
}

.custom-dropdown-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: transparent !important;
}

/* Option checkbox (for multi-select) */
.custom-dropdown-checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary-blue);
  flex-shrink: 0;
}

.custom-dropdown-option.disabled .custom-dropdown-checkbox {
  cursor: not-allowed;
}

/* Option content wrapper */
.custom-dropdown-option-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

/* Option image */
.custom-dropdown-option-image {
  width: 32px;
  height: 32px;
  object-fit: cover;
  flex-shrink: 0;
}

.custom-dropdown-option-image.circle {
  border-radius: 50%;
}

.custom-dropdown-option-image.square {
  border-radius: 4px;
}

/* Option icon */
.custom-dropdown-option-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: var(--primary-blue);
  font-size: 16px;
}

/* Option text */
.custom-dropdown-option-text {
  flex: 1;
  min-width: 0;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-dropdown-option-text mark {
  background: var(--accent-blue);
  color: white;
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: 600;
}

/* Status badge in option */
.custom-dropdown-option .status-badge {
  margin-left: auto;
  flex-shrink: 0;
}

/* No results message */
.custom-dropdown-no-results {
  padding: 16px;
  text-align: center;
  color: var(--muted-text);
  font-size: 0.9em;
  font-style: italic;
}

/* Theme-specific adjustments */
body.theme-dark .custom-dropdown-panel {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.theme-light .custom-dropdown-panel {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .custom-dropdown-panel {
    max-height: 60vh;
    max-width: calc(100vw - 16px);
  }

  .custom-dropdown-option {
    padding: 10px 12px;
    min-height: 42px;
  }

  .custom-dropdown-trigger {
    min-height: 42px;
    padding: 10px 12px;
  }

  /* Larger touch targets on mobile */
  .custom-dropdown-action-btn {
    padding: 8px 10px;
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .custom-dropdown-panel {
    left: 0;
    max-height: 70vh;
    max-width: calc(100vw - 16px);
  }

  .custom-dropdown-option {
    padding: 10px 12px;
  }
}

/* Print styles */
@media print {
  .custom-dropdown {
    display: none;
  }

  /* Show original select on print */
  select[data-dropdown] {
    display: block !important;
  }
}

/* Accessibility - High contrast mode */
@media (prefers-contrast: high) {
  .custom-dropdown-trigger {
    border-width: 2px;
  }

  .custom-dropdown-option.focused {
    outline-width: 3px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .custom-dropdown-panel,
  .custom-dropdown-chevron,
  .custom-dropdown-option {
    animation: none;
    transition: none;
  }
}

/* Reusable drag & drop zone component */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-large);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--card-bg);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dropzone::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--link-rgb, 0, 123, 255), 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.dropzone:hover {
  border-color: var(--link);
  background: rgba(var(--link-rgb, 0, 123, 255), 0.02);
}

.dropzone:hover::before {
  left: 100%;
}

.dropzone.drag-over {
  border-color: var(--link);
  background: rgba(var(--link-rgb, 0, 123, 255), 0.1);
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dropzone.drag-over::before {
  left: 100%;
  animation: dropzone-shimmer 1.5s infinite;
}

@keyframes dropzone-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.dropzone-icon {
  font-size: 56px;
  color: var(--link);
  margin-bottom: 8px;
  margin-right: 0 !important;
  animation: dropzone-upload-float 1.8s ease-in-out infinite;
  transform-origin: center top;
}

@keyframes dropzone-upload-float {
  0%,
  100% {
    transform: translateY(-5px);
  }
  50% {
    transform: translateY(1px);
  }
}

.dropzone.drag-over .dropzone-icon {
  animation-duration: 0.9s;
}

.dropzone-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 5px;
}

.dropzone-hint {
  color: var(--muted-text);
  font-size: 0.9em;
}

.dropzone-type-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 0 !important;
  order: 3;
}

.dropzone-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  background: rgba(var(--link-rgb, 0, 123, 255), 0.08);
  color: var(--heading-color);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
}

.dropzone-type-chip i {
  font-size: 12px;
  line-height: 1;
  margin-right: 0 !important;
  color: currentColor !important;
}

.dropzone-type-chip svg {
  color: currentColor !important;
  fill: currentColor;
}

.dropzone-type-chip span {
  line-height: 1;
  color: currentColor;
}

.dropzone-type-chip--pdf {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.dropzone-type-chip--doc {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.dropzone-type-chip--ppt {
  background: #ffedd5;
  border-color: #fed7aa;
  color: #c2410c;
}

.dropzone-type-chip--img {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.dropzone-type-chip--txt {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.dropzone-type-chip--xls {
  background: #d1fae5;
  border-color: #a7f3d0;
  color: #065f46;
}

body.theme-dark .dropzone-type-chip--pdf {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

body.theme-dark .dropzone-type-chip--doc {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.45);
  color: #dbeafe;
}

body.theme-dark .dropzone-type-chip--ppt {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(251, 146, 60, 0.45);
  color: #fed7aa;
}

body.theme-dark .dropzone-type-chip--img {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(74, 222, 128, 0.45);
  color: #dcfce7;
}

body.theme-dark .dropzone-type-chip--txt {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fef3c7;
}

body.theme-dark .dropzone-type-chip--xls {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.45);
  color: #d1fae5;
}

.dropzone-browse-btn {
  border: 1px solid rgba(var(--link-rgb, 0, 123, 255), 0.35);
  border-radius: 10px;
  background: rgba(var(--link-rgb, 0, 123, 255), 0.12);
  color: var(--heading-color);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 13px;
  margin-top: 28px;
  margin-right: 0;
  margin-bottom: 0 !important;
  order: 4;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.dropzone-browse-btn:hover {
  background: rgba(var(--link-rgb, 0, 123, 255), 0.2);
  border-color: rgba(var(--link-rgb, 0, 123, 255), 0.55);
  transform: translateY(-1px);
}

.dropzone-browse-btn:focus-visible {
  outline: 2px solid rgba(var(--link-rgb, 0, 123, 255), 0.45);
  outline-offset: 1px;
}

.dropzone-file-input {
  display: none;
  order: 5;
}

@media (prefers-reduced-motion: reduce) {
  .dropzone-icon {
    animation: none;
  }
}

@media (max-width: 768px) {
  .dropzone {
    padding: 20px 10px;
  }

  .dropzone-icon {
    font-size: 48px;
  }
}

/* Language Changer Styles */

/* Custom Dropdown Styles */
.nav-item {
  position: relative;
  list-style: none;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.dropdown-toggle[aria-expanded='true']::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 0.8rem;
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 20001;
  list-style: none;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.4rem;
  gap: 0.5rem;
}

.dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  transform: translateX(2px);
}

.dropdown-item.active {
  background: var(--primary-color);
  color: white;
}

.dropdown-item.active:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateX(2px);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-primary);
  margin: 0.5rem 0;
  border: none;
}

/* Language dropdown specific styles */
.dropdown-item .fi {
  font-size: 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.dropdown-item .fas.fa-check {
  margin-left: auto;
  color: var(--success-color);
}

.dropdown-item.active .fas.fa-check {
  color: white;
}

/* Additional dropdown styling */
.dropdown-item small {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-left: 0.5rem;
}

/* Responsive dropdown styles */
@media (max-width: 768px) {
  .dropdown-menu {
    position: fixed;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    min-width: 250px;
    margin-top: 0.5rem;
  }

  .dropdown-menu.show {
    transform: translateX(-50%) translateY(0);
  }
}

/* Base Telephone Input Component Styles */
/* Theme-aware overrides for intl-tel-input + valid/invalid hint states */

/* ── Container ────────────────────────────────────────────────────────── */
.base-tel-wrapper {
  position: relative;
  width: 100%;
}

/* ── intl-tel-input overrides ─────────────────────────────────────────── */

/* Make the iti container fill its parent */
.base-tel-wrapper .iti {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 6px;
}

/* Input field styling to match project inputs */
.base-tel-wrapper .iti input.iti__tel-input {
  width: 100%;
  flex: 1;
  min-height: 34px;
  height: 34px;
  padding: 6px 10px;
  padding-left: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  color: var(--text-color);
  font-size: 0.95em;
  font-family: inherit;
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Override intl-tel-input padding when dropdown is enabled */
.base-tel-wrapper .iti--allow-dropdown .iti__tel-input,
.base-tel-wrapper .iti--show-selected-dial-code .iti__tel-input {
  padding-left: 10px !important;
}

.base-tel-wrapper .iti input.iti__tel-input:hover {
  border-color: var(--accent-blue);
}

.base-tel-wrapper .iti input.iti__tel-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Country selector button */
.base-tel-wrapper .iti__country-container {
  position: static;
  height: 33px;
  display: flex;
  align-items: stretch;
}

.base-tel-wrapper .iti__country-container .iti__selected-country {
  position: static;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  padding: 0 10px;
  height: 33px;
  min-height: 33px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  line-height: 31px;
}

.base-tel-wrapper .iti__country-container .iti__selected-country:hover {
  border-color: var(--accent-blue);
  background: rgba(99, 102, 241, 0.08);
}

.base-tel-wrapper .iti__country-container .iti__selected-country:focus,
.base-tel-wrapper .iti__country-container .iti__selected-country:focus-visible {
  outline: none;
  border-color: var(--primary-blue);
}

/* Dropdown panel */
.iti__country-list {
  background: var(--dropdown-bg, var(--container-bg));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-medium);
  color: var(--text-color);
  z-index: 10000;
  max-height: 260px;
}

.iti__country-list .iti__country {
  padding: 6px 10px;
  transition: background 0.15s ease;
}

.iti__country-list .iti__country:hover,
.iti__country-list .iti__country--highlight {
  background: rgba(99, 102, 241, 0.12);
}

/* Dial code inside dropdown */
.iti__country-list .iti__dial-code {
  color: var(--muted-text);
}

/* Search input inside the dropdown */
.iti__search-input {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  color: var(--text-color);
  font-family: inherit;
  padding: 6px 10px;
  font-size: 0.9em;
}

.iti__search-input:focus {
  outline: none;
  border-color: var(--primary-blue);
}

/* Arrow indicator */
.base-tel-wrapper .iti__arrow {
  border-top-color: var(--muted-text);
}

.base-tel-wrapper .iti__arrow--up {
  border-bottom-color: var(--muted-text);
}

/* Divider between preferred and other countries */
.iti__country-list .iti__divider {
  border-bottom-color: var(--border-color);
}

/* ── Valid / Invalid states ───────────────────────────────────────────── */

.base-tel-wrapper.base-tel-valid .iti input.iti__tel-input {
  border-color: #81c784;
}

.base-tel-wrapper.base-tel-invalid .iti input.iti__tel-input {
  border-color: #e57373;
}

.base-tel-wrapper.base-tel-valid
  .iti__country-container
  .iti__selected-country {
  border-color: #81c784;
}

.base-tel-wrapper.base-tel-invalid
  .iti__country-container
  .iti__selected-country {
  border-color: #e57373;
}

body.theme-light .base-tel-wrapper.base-tel-valid .iti input.iti__tel-input {
  border-color: #388e3c;
}

body.theme-light .base-tel-wrapper.base-tel-invalid .iti input.iti__tel-input {
  border-color: #d32f2f;
}

body.theme-light
  .base-tel-wrapper.base-tel-valid
  .iti__country-container
  .iti__selected-country {
  border-color: #388e3c;
}

body.theme-light
  .base-tel-wrapper.base-tel-invalid
  .iti__country-container
  .iti__selected-country {
  border-color: #d32f2f;
}

/* ── Hint message ─────────────────────────────────────────────────────── */

.base-tel-hint {
  display: none;
  margin-top: 4px;
  font-size: 0.82em;
  line-height: 1.4;
  color: #e57373;
  min-height: 1.2em;
}

body.theme-light .base-tel-hint {
  color: #d32f2f;
}

.base-tel-wrapper.base-tel-invalid .base-tel-hint {
  display: block;
}

/* ── Disabled state ───────────────────────────────────────────────────── */

.base-tel-wrapper.base-tel-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.base-tel-wrapper.base-tel-disabled .iti input.iti__tel-input {
  cursor: not-allowed;
}

/* Tooltip System - Pretty tooltips for better UX
 *
 * CURSORRULES:
 * When adding new features to the website or admin panel, they MUST be very accessible:
 * - Add helpful tooltips using data-tooltip attributes with clear explanations
 * - Include useful placeholder text with examples in input fields
 * - Use tooltip-wrapper class on labels to provide context
 * - Tooltips should explain what the field is for, how to use it, and provide examples
 * - Placeholders should show the expected format or example values
 */

/* Tooltip container */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
}

/* Elements with no icon should use default cursor */
.tooltip-wrapper[data-tooltip-no-icon] {
  cursor: default !important;
}

/* Override cursor for buttons with tooltips - always pointer */
button.tooltip-wrapper,
button.tooltip-wrapper[data-tooltip-no-icon] {
  cursor: pointer !important;
}

/* Ensure empty tooltip-wrapper spans are visible */
.tooltip-wrapper:empty {
  display: inline-block;
  min-width: 18px;
  min-height: 18px;
}

.tooltip-wrapper .tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  color: #6c757d;
  font-size: 12px;
  border-radius: 50%;
  background-color: rgba(108, 117, 125, 0.1);
  transition: all 0.2s ease;
  vertical-align: middle;
  line-height: 1;
}

.tooltip-wrapper:hover .tooltip-icon,
.tooltip-wrapper:focus .tooltip-icon {
  color: #495057;
  background-color: rgba(108, 117, 125, 0.2);
}

/* Dark theme tooltip icon */
body.theme-dark .tooltip-wrapper .tooltip-icon {
  color: #adb5bd;
  background-color: rgba(173, 181, 189, 0.15);
}

body.theme-dark .tooltip-wrapper:hover .tooltip-icon,
body.theme-dark .tooltip-wrapper:focus .tooltip-icon {
  color: #ced4da;
  background-color: rgba(173, 181, 189, 0.25);
}

/* Tooltip bubble - Light theme (default) */
.tooltip-bubble {
  position: fixed;
  z-index: 100000;
  padding: 12px 16px;
  background-color: #ffffff;
  color: #1a202c;
  font-size: 15px;
  line-height: 1.5;
  border-radius: 8px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  max-width: 320px;
  min-width: 150px;
  width: auto;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  display: none;
  transform: translateY(-8px) scale(0.95);
  transition:
    opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Show state with smooth animation */
.tooltip-bubble.show {
  opacity: 1;
  visibility: visible;
  display: block;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Tooltip arrow */
.tooltip-bubble::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  pointer-events: none;
}

/* Inline arrow tokens for tooltip content */
.tooltip-bubble .tooltip-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  margin-right: 6px;
  font-size: 13px;
  line-height: 1;
}

.tooltip-bubble .tooltip-arrow i {
  font-size: 12px;
  line-height: 1;
}

.tooltip-bubble .tooltip-arrow.up {
  color: #22c55e;
}

.tooltip-bubble .tooltip-arrow.down {
  color: #ef4444;
}

/* Tooltip positioning - default (top) */
/* Note: Positioning is now handled by JavaScript for fixed positioning */
.tooltip-bubble.tooltip-top {
  transform: translateY(-8px) scale(0.95);
}

.tooltip-bubble.tooltip-top.show {
  transform: translateY(0) scale(1);
}

.tooltip-bubble.tooltip-top::before {
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-color: #ffffff transparent transparent transparent;
}

/* Tooltip positioning - bottom */
.tooltip-bubble.tooltip-bottom {
  transform: translateY(8px) scale(0.95);
}

.tooltip-bubble.tooltip-bottom.show {
  transform: translateY(0) scale(1);
}

.tooltip-bubble.tooltip-bottom::before {
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent #ffffff transparent;
}

/* Tooltip positioning - left */
.tooltip-bubble.tooltip-left {
  transform: translateX(-8px) scale(0.95);
}

.tooltip-bubble.tooltip-left.show {
  transform: translateX(0) scale(1);
}

.tooltip-bubble.tooltip-left::before {
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent #ffffff;
}

/* Tooltip positioning - right */
.tooltip-bubble.tooltip-right {
  transform: translateX(8px) scale(0.95);
}

.tooltip-bubble.tooltip-right.show {
  transform: translateX(0) scale(1);
}

.tooltip-bubble.tooltip-right::before {
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 6px 6px 0;
  border-color: transparent #ffffff transparent transparent;
}

/* Dark theme tooltip bubble */
body.theme-dark .tooltip-bubble {
  background-color: #1e2433;
  color: #e2e8f0;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.theme-dark .tooltip-bubble.tooltip-top::before {
  border-color: #1e2433 transparent transparent transparent;
}

body.theme-dark .tooltip-bubble.tooltip-bottom::before {
  border-color: transparent transparent #1e2433 transparent;
}

body.theme-dark .tooltip-bubble.tooltip-left::before {
  border-color: transparent transparent transparent #1e2433;
}

body.theme-dark .tooltip-bubble.tooltip-right::before {
  border-color: transparent #1e2433 transparent transparent;
}

/* Tooltip title (optional) - Light theme */
.tooltip-bubble .tooltip-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 16px;
  color: #1a202c;
  display: block;
  width: 100%;
}

body.theme-dark .tooltip-bubble .tooltip-title {
  color: #f7fafc;
}

/* Tooltip content - Light theme */
.tooltip-bubble .tooltip-content {
  color: #2d3748;
  display: block;
  width: 100%;
}

body.theme-dark .tooltip-bubble .tooltip-content {
  color: #e2e8f0;
}

/* Tooltip with example - Light theme */
.tooltip-bubble .tooltip-example {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-style: italic;
  color: #718096;
  display: block;
  width: 100%;
}

body.theme-dark .tooltip-bubble .tooltip-example {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: #a0aec0;
}

/* Tooltip on labels */
label .tooltip-wrapper {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

/* Ensure tooltip-wrapper spans inside labels are visible */
label .tooltip-wrapper:empty {
  display: inline-flex;
  min-width: 18px;
  min-height: 18px;
  align-items: center;
}

/* Tooltip on badges */
.issue-badge,
.menu-badge,
.nav-warning-badge {
  position: relative;
}

/* Badges should not have pointer cursor even with tooltips */
.menu-badge.tooltip-wrapper,
.issue-badge.tooltip-wrapper,
.nav-warning-badge.tooltip-wrapper {
  cursor: default !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tooltip-bubble {
    max-width: 280px;
    min-width: 120px;
    width: auto;
    font-size: 14px;
  }

  /* On mobile, tooltip positioning is handled by JavaScript */
  .tooltip-bubble.tooltip-left,
  .tooltip-bubble.tooltip-right {
    transform: translateY(5px);
  }

  .tooltip-bubble.tooltip-left.show,
  .tooltip-bubble.tooltip-right.show {
    transform: translateY(0);
  }
}

.design-helper {
  position: fixed;
  top: calc(var(--navbar-offset) + 58px);
  right: 12px;
  left: auto;
  z-index: 120000;
}

@media (max-width: 750px) {
  .design-helper {
    display: none;
  }
}

.design-helper-toggle-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  margin-top: 10px;
  background: var(--bg-dark) !important;
  border: 3px solid var(--accent-blue);
  cursor: pointer;
  color: #ffffff;
  font-size: 1.4rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  box-shadow:
    0 4px 16px rgba(99, 102, 241, 0.4),
    0 0 0 1px rgba(99, 102, 241, 0.1);
}

.design-helper-toggle-button:hover {
  background: var(--primary-blue-hover);
  border-color: var(--accent-blue);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow:
    0 6px 24px rgba(99, 102, 241, 0.5),
    0 0 0 2px rgba(99, 102, 241, 0.2);
}

.design-helper-toggle-button:active {
  transform: scale(0.95);
}

.design-helper-toggle-button:focus {
  outline: none;
  box-shadow:
    0 4px 16px rgba(99, 102, 241, 0.4),
    0 0 0 1px rgba(99, 102, 241, 0.1);
}

.design-helper-toggle-button i {
  display: inline-block;
  line-height: 1;
}

.design-helper-window {
  position: fixed;
  top: calc(var(--navbar-offset) + 112px);
  right: 12px;
  left: auto;
  z-index: 120001;
  width: 330px;
  max-width: calc(100vw - 24px);
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  color: #f8fafc;
  overflow: visible;
  display: none;
  user-select: none;
}

body.theme-light .design-helper-window {
  background: rgba(241, 245, 249, 0.74);
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.65);
}

.design-helper-window.is-open {
  display: block;
}

.design-helper-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: move;
  padding: 10px 12px;
  background: rgba(30, 41, 59, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

body.theme-light .design-helper-window-header {
  background: rgba(226, 232, 240, 0.82);
}

.design-helper-window-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.design-helper-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.42);
  color: inherit;
  cursor: pointer;
}

body.theme-light .design-helper-close {
  background: rgba(255, 255, 255, 0.7);
}

.design-helper-window-body {
  position: relative;
  z-index: 1;
  padding: 12px;
}

.design-helper-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.design-helper-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.design-helper-field select {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
  font-size: 13px;
}

body.theme-light .design-helper-field select {
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
}

/* Ensure dropdown component panel is above the helper window when open */
body:has(#design-helper-window.is-open) .custom-dropdown-panel.is-open {
  z-index: 130010 !important;
}

/* Toast Notification Styles */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  max-width: 420px;
  pointer-events: none;
}

/* ============================================
   LIGHT MODE (Default)
   ============================================ */
.toast {
  background: #ffffff;
  border-radius: 10px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(0, 0, 0, 0.08);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  border-left: 4px solid #3498db;
  position: relative;
  overflow: hidden;
  color: #2c3e50;
  border: 1px solid #e2e8f0;
}

.toast.toast-success {
  border-left-color: #10b981;
  border-color: #d1fae5;
}

.toast.toast-error {
  border-left-color: #ef4444;
  border-color: #fee2e2;
}

.toast.toast-info {
  border-left-color: #3b82f6;
  border-color: #dbeafe;
}

.toast.toast-warning {
  border-left-color: #f59e0b;
  border-color: #fef3c7;
}

.toast-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
}

.toast.toast-success .toast-icon {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.toast.toast-error .toast-icon {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.toast.toast-info .toast-icon {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.toast.toast-warning .toast-icon {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.toast-loading {
  width: 22px;
  height: 22px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: toastSpin 1s linear infinite;
  flex-shrink: 0;
}

.toast.toast-success .toast-loading {
  border-top-color: #10b981;
}

.toast.toast-error .toast-loading {
  border-top-color: #ef4444;
}

.toast.toast-info .toast-loading {
  border-top-color: #3b82f6;
}

.toast.toast-warning .toast-loading {
  border-top-color: #f59e0b;
}

.toast-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  color: #1f2937;
  line-height: 1.4;
}

.toast-message {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: normal;
  max-height: none;
  overflow: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.toast-message::-webkit-scrollbar {
  display: none;
}

.toast-close {
  flex-shrink: 0;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  color: #6b7280;
  font-size: 18px;
  line-height: 0;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  position: relative;
}

.toast-close:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #374151;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  width: 100%;
  transform-origin: left;
  animation: toastProgress linear;
}

.toast.toast-success .toast-progress {
  background: rgba(16, 185, 129, 0.25);
}

.toast.toast-error .toast-progress {
  background: rgba(239, 68, 68, 0.25);
}

.toast.toast-info .toast-progress {
  background: rgba(59, 130, 246, 0.25);
}

.toast.toast-warning .toast-progress {
  background: rgba(245, 158, 11, 0.25);
}

/* ============================================
   DARK MODE
   ============================================ */
body.theme-dark .toast {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.3);
}

body.theme-dark .toast.toast-success {
  border-left-color: #10b981;
  border-color: #065f46;
}

body.theme-dark .toast.toast-error {
  border-left-color: #ef4444;
  border-color: #7f1d1d;
}

body.theme-dark .toast.toast-info {
  border-left-color: #3b82f6;
  border-color: #1e3a8a;
}

body.theme-dark .toast.toast-warning {
  border-left-color: #f59e0b;
  border-color: #78350f;
}

body.theme-dark .toast-icon {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .toast.toast-success .toast-icon {
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
}

body.theme-dark .toast.toast-error .toast-icon {
  color: #f87171;
  background: rgba(239, 68, 68, 0.2);
}

body.theme-dark .toast.toast-info .toast-icon {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.2);
}

body.theme-dark .toast.toast-warning .toast-icon {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
}

body.theme-dark .toast-loading {
  border-color: #475569;
}

body.theme-dark .toast.toast-success .toast-loading {
  border-top-color: #34d399;
}

body.theme-dark .toast.toast-error .toast-loading {
  border-top-color: #f87171;
}

body.theme-dark .toast.toast-info .toast-loading {
  border-top-color: #60a5fa;
}

body.theme-dark .toast.toast-warning .toast-loading {
  border-top-color: #fbbf24;
}

body.theme-dark .toast-title {
  color: #f1f5f9;
}

body.theme-dark .toast-message {
  color: #cbd5e1;
}

body.theme-dark .toast-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

body.theme-dark .toast-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #f1f5f9;
}

body.theme-dark .toast-progress {
  background: rgba(255, 255, 255, 0.1);
}

body.theme-dark .toast.toast-success .toast-progress {
  background: rgba(16, 185, 129, 0.4);
}

body.theme-dark .toast.toast-error .toast-progress {
  background: rgba(239, 68, 68, 0.4);
}

body.theme-dark .toast.toast-info .toast-progress {
  background: rgba(59, 130, 246, 0.4);
}

body.theme-dark .toast.toast-warning .toast-progress {
  background: rgba(245, 158, 11, 0.4);
}

/* ============================================
   Animations
   ============================================ */
@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes toastSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes toastProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.toast.toast-sliding-out {
  animation: toastSlideOut 0.3s ease-in forwards;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }
}
