/* Sunmoon Spa — static build additions.
   style.css holds the original design untouched; only the bits that the
   React components used to handle live here. */

html {
  scroll-behavior: smooth;
}

/* The header is fixed, so anchor targets need room above them. */
[id] {
  scroll-margin-top: 4.5rem;
}

/* Native <select> styled to match the original dropdown trigger. */
.sm-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem 1rem;
}

.sm-select:invalid,
.sm-select option[value=""] {
  color: hsl(var(--muted-foreground));
}

/* Native date field, sized like the other controls. */
.sm-date::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
}

.sm-date::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Inline validation message under a field. */
.sm-error {
  display: none;
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--destructive));
}

.sm-error.is-visible {
  display: block;
}

.sm-invalid {
  border-color: hsl(var(--destructive)) !important;
}

/* Toast — replaces the React notification component. */
.sm-toast {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.sm-toast__item {
  max-width: 26rem;
  padding: 0.875rem 1.125rem;
  border-radius: 0.875rem;
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sm-toast__item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 640px) {
  .sm-toast {
    left: auto;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sm-toast__item {
    transition: none;
  }
}
