/* css/main.css */
/* ==========================================================================
   J-ONE HOTEL & LODGE — main.css
   Imports the design system and base / reset styles.
   ========================================================================== */

@import url("variables.css");
@import url("themes.css");
@import url("typography.css");
@import url("components.css");
@import url("public.css");
@import url("booking.css");
@import url("dashboard.css");
@import url("operations.css");
@import url("responsive.css");
@import url("audit-fixes.css");

/* ------------------------------- Reset ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* The hidden attribute must always win. Author rules that set display (for
   example .btn { display: inline-flex }) override the UA's [hidden] rule,
   which would render — and keep focusable — controls that JS has hidden
   (e.g. the PWA install button before an install is actually possible). */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  transition: background-color var(--speed-3) var(--ease), color var(--speed-3) var(--ease);
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1rem; }
h1, h2, h3, h4, h5, h6 { margin: 0; }
table { border-collapse: collapse; width: 100%; }

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--sp-6) 0;
}

::selection { background: var(--color-accent); color: var(--color-accent-ink); }

/* ----------------------------- Focus state ------------------------------ */
:focus { outline: none; }
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ----------------------------- Accessibility ---------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px; left: 0.75rem;
  z-index: 3000;
  padding: 0.6rem 1rem;
  background: var(--color-primary);
  color: var(--color-primary-ink);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top var(--speed-2) var(--ease);
}
.skip-link:focus { top: 0; }

/* ------------------------------ Utilities ------------------------------- */
.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.container-narrow { max-width: var(--container-narrow); }
.flow > * + * { margin-top: 1rem; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.center { text-align: center; }
.muted { color: var(--color-text-muted); }
.nowrap { white-space: nowrap; }

.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--color-text-muted);
}
.eyebrow.eyebrow-center::before { display: none; }

.text-accent { color: var(--color-accent); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }

/* Responsive lazy-loading shimmer for media */
img[data-src] { background: var(--color-surface-deep); }

/* Hide scrollbars for horizontal scrollers but keep function */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
