/*
 * 緣〜EN〜 reservation theme
 * Brand values match assets/css/style.css in the official website.
 * Accent colors are supplied by the reservation system's branding settings.
 * Styling does not require a web-font download or Vite rebuild.
 * Two embed Blade overrides preserve the selected language on every link.
 */
:root {
  --en-red: #890000;
  --en-ink: #0f0f0f;
  --en-paper: #f8f8f6;
  --en-beige: #e7d9c6;
  --en-sand: #c9bdad;
  --en-gray: #707070;
  --en-serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN",
    "Hiragino Mincho Pro", "Noto Serif JP", serif;
  --en-form-font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    "Meiryo", ui-sans-serif, system-ui, sans-serif;
}

/*
 * Current layout contracts:
 * guest: body.flex.flex-col
 * embed: body.bg-transparent
 * login and two-factor challenge: body.flex.items-center.justify-center
 * The admin shell does not match these selectors, retaining its dense sans UI.
 */
body.flex.flex-col,
body.bg-transparent,
body.flex.items-center.justify-center {
  --color-neutral-50: var(--en-paper);
  --color-neutral-100: #efebe8;
  --color-neutral-200: #e4ddd5;
  --color-neutral-300: var(--en-sand);
  --color-neutral-500: var(--en-gray);
  --color-neutral-600: #5c5752;
  --color-neutral-700: #47423c;
  --color-neutral-800: #2b2926;
  --color-neutral-900: var(--en-ink);
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 8px;
  --radius-2xl: 8px;
  --radius-3xl: 8px;
  font-family: var(--en-serif);
  color: var(--en-ink);
  letter-spacing: 0.035em;
  -webkit-font-smoothing: antialiased;
}

body.flex.flex-col,
body.flex.items-center.justify-center {
  background: var(--en-paper);
}

body.flex.flex-col h1,
body.flex.flex-col h2,
body.flex.flex-col h3,
#embed-root h1,
#embed-root h2,
#embed-root h3,
body.flex.items-center.justify-center h1 {
  font-family: var(--en-serif);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.055em;
}

body.flex.flex-col > header {
  background: #fff;
  border-bottom-color: rgba(15, 15, 15, 0.12);
}

body.flex.flex-col > header > div {
  height: 96px;
  gap: clamp(12px, 2vw, 24px);
}

/* The supplied EN logo has white lettering and needs the same red backdrop. */
body.flex.flex-col > header > div > a:first-child {
  display: flex;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  align-items: center;
  justify-content: center;
  background: var(--en-red);
}

body.flex.flex-col > header > div > a:first-child > img {
  width: 68px;
  height: 68px;
  max-width: 68px;
  max-height: 68px;
  object-fit: contain;
}

body.flex.flex-col > main {
  padding-top: clamp(32px, 5vw, 60px);
  padding-bottom: clamp(40px, 6vw, 76px);
}

body.flex.flex-col > main p,
body.flex.flex-col > main li {
  line-height: 1.85;
}

body.flex.flex-col > footer {
  background: var(--en-red);
  border-top: 0;
}

body.flex.flex-col > footer > div {
  padding-top: 28px;
  padding-bottom: 28px;
  color: #fff;
  line-height: 1.8;
}

body.flex.flex-col > footer a,
body.flex.flex-col > footer span {
  color: #fff;
}

body.flex.flex-col > footer a:hover {
  color: #fff;
  opacity: 0.8;
}

/* Familiar, legible text entry; no control dimensions are changed in admin. */
body.flex.flex-col input,
body.flex.flex-col select,
body.flex.flex-col textarea,
#embed-root input,
#embed-root select,
#embed-root textarea,
body.flex.items-center.justify-center input {
  font-family: var(--en-form-font);
  font-size: 16px;
  letter-spacing: 0;
}

body.flex.flex-col input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.flex.flex-col select,
#embed-root input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
#embed-root select,
body.flex.items-center.justify-center input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  min-height: 44px;
}

body.flex.flex-col button,
#embed-root button,
body.flex.items-center.justify-center button {
  font-family: var(--en-serif);
  letter-spacing: 0.05em;
}

body.flex.flex-col button[type="submit"],
#embed-root button[type="submit"],
body.flex.items-center.justify-center button[type="submit"] {
  min-height: 44px;
}

body.flex.flex-col :is(a, button, input, select, textarea):focus-visible,
#embed-root :is(a, button, input, select, textarea):focus-visible,
body.flex.items-center.justify-center :is(a, button, input):focus-visible {
  outline: 2px solid var(--color-accent, var(--en-red));
  outline-offset: 3px;
}

body.flex.flex-col > footer a:focus-visible {
  outline-color: #fff;
}

/* Embed layout sets html/body backgrounds to transparent after theme.css. */
body.bg-transparent {
  background: transparent;
}

#embed-root {
  padding: 12px;
}

#embed-root > div {
  max-width: 52rem;
}

#embed-root form {
  padding: clamp(20px, 4vw, 32px);
  border-color: var(--en-sand);
  box-shadow: none;
}

#embed-root form label {
  margin-bottom: 8px;
  color: #47423c;
  font-size: 14px;
  line-height: 1.6;
}

#embed-root form button[type="submit"] {
  margin-top: 20px;
}

#embed-root .grid-cols-7 {
  font-family: var(--en-form-font);
  letter-spacing: 0;
}

#embed-root .grid-cols-7 > a,
#embed-root .grid-cols-7 > div {
  min-height: 44px;
}

/* Login stays compact and usable, with the official white logo clearly visible. */
body.flex.items-center.justify-center > div {
  max-width: 28rem;
  padding-top: 32px;
  padding-bottom: 32px;
}

body.flex.items-center.justify-center > div > div:first-child img {
  width: 88px;
  height: 88px;
  max-width: 88px;
  max-height: 88px;
  padding: 8px;
  object-fit: contain;
  background: var(--en-red);
}

/* White uploaded logos also remain visible in the unchanged admin sidebar. */
body:not(.flex) aside img {
  padding: 4px;
  background: var(--en-red);
}

html[lang="en"] body.flex.flex-col,
html[lang="en"] body.bg-transparent,
html[lang="en"] body.flex.items-center.justify-center {
  letter-spacing: 0.015em;
}

@media (max-width: 639px) {
  body.flex.flex-col > header > div {
    height: 80px;
    gap: 10px;
  }

  body.flex.flex-col > header > div > a:first-child {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  body.flex.flex-col > header > div > a:first-child > img {
    width: 52px;
    height: 52px;
    max-width: 52px;
    max-height: 52px;
  }

  #embed-root {
    padding: 8px;
  }

  #embed-root form {
    padding: 20px 16px;
  }
}
