/* Utilities and components not generated in the Tailwind build */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.h-13 {
  height: 3.25rem;
}

.kh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.kh-btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.kh-btn-gold {
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.025em;
  box-shadow: var(--shadow-soft);
}

.kh-btn-gold:hover {
  background: var(--gold-deep);
  color: var(--primary-foreground);
}

.kh-btn-ink {
  background: var(--ink);
  color: var(--primary-foreground);
  font-weight: 600;
}

.kh-btn-ink:hover {
  background: var(--ink-soft);
}

.kh-btn-outline-gold {
  border: 2px solid var(--gold);
  color: var(--gold-deep);
  font-weight: 600;
  background: transparent;
}

.kh-btn-outline-gold:hover {
  background: var(--gold);
  color: var(--ink);
}

.kh-btn-outline-light {
  border: 2px solid color-mix(in oklab, var(--primary-foreground) 70%, transparent);
  color: var(--primary-foreground);
  font-weight: 600;
  background: transparent;
}

.kh-btn-outline-light:hover {
  background: var(--primary-foreground);
  color: var(--ink);
}

.kh-btn-ghost {
  background: transparent;
}

.kh-btn-ghost:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.kh-btn-outline {
  border: 1px solid var(--input);
  background: var(--background);
}

.kh-btn-outline:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.kh-btn-xl {
  height: 3.25rem;
  padding-left: 2.25rem;
  padding-right: 2.25rem;
  font-size: 1rem;
}

.kh-btn-lg {
  height: 2.75rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

.kh-btn-default {
  height: 2.25rem;
  padding: 0.5rem 1rem;
}

.kh-btn-icon {
  height: 2.75rem;
  width: 2.75rem;
}

.kh-input,
.kh-textarea {
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid var(--input);
  background: var(--background);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.kh-input {
  height: 2.75rem;
}

.kh-textarea {
  min-height: 6rem;
}

.kh-input:focus-visible,
.kh-textarea:focus-visible,
.kh-checkbox:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

.kh-checkbox {
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--primary);
  border-radius: 0.125rem;
  accent-color: var(--primary);
}

.kh-field-error {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--destructive);
}

.kh-header-scrolled {
  border-bottom-color: var(--border) !important;
  background-color: color-mix(in oklab, var(--background) 95%, transparent) !important;
  backdrop-filter: blur(12px);
}

.kh-dialog {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.kh-dialog.is-open {
  display: flex;
}

.kh-dialog__overlay {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.8);
}

.kh-dialog__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 32rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  max-height: 90vh;
  overflow-y: auto;
}

.kh-dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  background: transparent;
  opacity: 0.7;
  cursor: pointer;
}

.kh-dialog__close:hover {
  opacity: 1;
}

.kh-form-success {
  display: none;
}

.kh-form-success.is-visible {
  display: flex;
}

.kh-form-fields.is-hidden {
  display: none;
}

.kh-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 80;
  max-width: 20rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  background: var(--ink);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.kh-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.kh-splash-lock {
  overflow: hidden;
}

#kh-splash.is-exit {
  animation: splash-exit 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

#kh-splash.is-exit .kh-splash-curtain {
  animation: splash-curtain-up 0.9s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}
