/* ============================================
   hair atelier NUANCE - Style Sheet (100vh Layout)
   ============================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #1A1A1A;
  --white: #FFFFFF;
  --bg: #F5F5F5;
  --accent: #C4A882;
  --accent-dark: #B09570;
  --text: #333333;
  --text-light: #777777;
  --font-ja: 'Noto Sans JP', sans-serif;
  --font-en: 'Cormorant Garamond', serif;
  --header-h: 50px;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-ja);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: var(--font-ja);
}

/* ============================================
   Desktop: 100vh no-scroll layout
   ============================================ */
@media (min-width: 769px) {
  html, body {
    height: 100vh;
    overflow: hidden;
  }

  body {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }
}

/* ============================================
   Header (50px)
   ============================================ */
.header {
  height: var(--header-h);
  background: var(--black);
  flex-shrink: 0;
  z-index: 1000;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.header__logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.header__logo-main {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--white);
  letter-spacing: 0.15em;
}

.header__logo-sub {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.15em;
}

.header__tel {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.header__tel svg {
  opacity: 0.7;
}

/* ============================================
   Hero (25vh on desktop)
   ============================================ */
.hero {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (min-width: 769px) {
  .hero {
    height: 25vh;
  }
}

@media (max-width: 768px) {
  .hero {
    height: 35vh;
    min-height: 200px;
  }
}

.hero__bg {
  position: absolute;
  inset: 0;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.55);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
}

.hero__catch {
  font-family: var(--font-ja);
  font-weight: 300;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  color: var(--white);
  letter-spacing: 0.2em;
  margin-bottom: 8px;
}

.hero__sub {
  font-size: clamp(0.65rem, 1.5vw, 0.82rem);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.1em;
  font-weight: 300;
}

/* ============================================
   Availability Bar (60px)
   ============================================ */
.availability-bar {
  background: var(--accent);
  flex-shrink: 0;
  height: 60px;
  display: flex;
  align-items: center;
}

.availability-bar__inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.availability-bar__main {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.availability-bar__main strong {
  font-weight: 700;
  font-size: 1rem;
}

.availability-bar__icon {
  margin-right: 4px;
}

.availability-bar__note {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* ============================================
   Main Content (flex: 1, left-right columns)
   ============================================ */
.main-content {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    overflow: visible;
  }
}

/* ---------- Left: Chat Column (30%) ---------- */
.chat-column {
  width: 30%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e0e0e0;
  background: var(--white);
  overflow: hidden;
}

@media (max-width: 768px) {
  .chat-column {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
}

.chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.chat-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--black);
  color: var(--white);
  flex-shrink: 0;
}

.chat-panel__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.chat-panel__name {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.chat-panel__status {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
}

.chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.chat-msg {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.6;
  animation: msgFadeIn 0.3s ease;
}

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

.chat-msg--ai {
  align-self: flex-start;
  background: var(--bg);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-msg--user {
  align-self: flex-end;
  background: var(--black);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.chat-panel__choices {
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

.chat-choice {
  padding: 7px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: var(--white);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-ja);
  letter-spacing: 0.02em;
}

.chat-choice:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* モバイル: チャット折りたたみ */
.chat-toggle {
  display: none;
}

@media (max-width: 768px) {
  .chat-column {
    overflow: visible;
  }

  .chat-panel {
    display: none;
  }

  .chat-column.is-open .chat-panel {
    display: flex;
    max-height: 300px;
  }

  .chat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: none;
    background: var(--black);
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.05em;
  }

  .chat-column.is-open .chat-toggle {
    background: var(--text-light);
  }
}

/* ---------- Right: Tab Column (70%) ---------- */
.tab-column {
  width: 70%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 768px) {
  .tab-column {
    width: 100%;
    overflow: visible;
  }
}

/* ============================================
   Tab Navigation
   ============================================ */
.tab-nav {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid #ddd;
  background: var(--white);
}

.tab-nav__btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  text-align: center;
}

.tab-nav__btn.is-active {
  color: var(--black);
  border-bottom-color: var(--accent);
  background: rgba(196, 168, 130, 0.06);
}

.tab-nav__btn:hover {
  color: var(--black);
}

/* ============================================
   Tab Content
   ============================================ */
.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.tab-content.is-active {
  display: block;
}

/* Tab inner: left-right 2 columns */
.tab-inner {
  display: flex;
  height: 100%;
}

@media (max-width: 768px) {
  .tab-inner {
    flex-direction: column;
  }
}

.tab-inner__left {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  border-right: 1px solid #eee;
}

@media (max-width: 768px) {
  .tab-inner__left {
    border-right: none;
    border-bottom: 1px solid #eee;
  }
}

.tab-inner__right {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* ---------- Before/After ---------- */
.before-after {
  background: var(--bg);
  border-radius: 6px;
  padding: 16px;
}

.before-after__visual {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.before-after__box {
  flex: 1;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.1em;
  max-height: 120px;
}

.before-after__box--before {
  background: linear-gradient(135deg, #999, #777);
}

.before-after__box--after {
  background: linear-gradient(135deg, #C4A882, #A08A6C);
}

.before-after__arrow {
  flex-shrink: 0;
  color: var(--accent);
}

.before-after__review {
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.before-after__comment {
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 4px;
}

.before-after__author {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* ---------- Menu Radio List ---------- */
.menu-title {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  color: var(--text);
}

.menu-radio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  flex: 1;
}

.menu-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.menu-radio:hover {
  border-color: var(--accent);
}

.menu-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s;
}

.menu-radio input[type="radio"]:checked {
  border-color: var(--accent);
}

.menu-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.menu-radio:has(input:checked) {
  border-color: var(--accent);
  background: rgba(196, 168, 130, 0.08);
}

.menu-radio__label {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 400;
}

.menu-radio__price {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--black);
  white-space: nowrap;
}

/* ---------- Reserve Button (in tab) ---------- */
.reserve-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
}

.reserve-btn:hover {
  background: var(--accent-dark);
}

/* ============================================
   Footer Bar
   ============================================ */
.footer-bar {
  display: flex;
  flex-shrink: 0;
  height: 44px;
  background: var(--white);
  border-top: 1px solid #e0e0e0;
}

.footer-bar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  font-family: var(--font-ja);
  text-align: center;
}

.footer-bar__btn--ig {
  background: var(--white);
  color: var(--text);
  transition: background 0.3s;
}

.footer-bar__btn--ig:hover {
  background: var(--bg);
}

.footer-bar__btn--tel {
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  transition: background 0.3s;
}

.footer-bar__btn--tel:hover {
  background: #333;
}

/* ============================================
   Reserve Modal
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 8px;
  padding: 28px 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  transition: color 0.3s;
}

.modal__close:hover {
  color: var(--black);
}

.modal__title {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

/* Selected menu display */
.modal__selected-menu {
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal__selected-label {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
}

.modal__selected-value {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--black);
}

/* Slots */
.modal__slots {
  margin-bottom: 20px;
}

.modal__slots-title {
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.modal__slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.slot-btn {
  padding: 10px 4px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: var(--white);
  font-size: 0.7rem;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-ja);
  color: var(--text);
}

.slot-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.slot-btn.is-selected {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* Form */
.modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal__field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.modal__required {
  font-size: 0.6rem;
  color: var(--white);
  background: var(--accent);
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 4px;
  font-weight: 400;
}

.modal__field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: var(--font-ja);
  background: var(--bg);
  transition: border-color 0.3s;
}

.modal__field input:focus {
  outline: none;
  border-color: var(--accent);
}

.modal__submit {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--black);
  color: var(--white);
  border: none;
  font-size: 0.85rem;
  font-family: var(--font-ja);
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 4px;
  margin-top: 4px;
}

.modal__submit:hover:not(:disabled) {
  background: var(--accent);
}

.modal__submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
   Mobile Responsive (768px以下)
   ============================================ */
@media (max-width: 768px) {
  .availability-bar {
    height: auto;
    padding: 10px 0;
  }

  .availability-bar__main {
    font-size: 0.82rem;
  }

  .availability-bar__note {
    font-size: 0.6rem;
  }

  .header__tel span {
    display: none;
  }

  .footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 900;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    height: 52px;
  }

  .footer-bar__btn {
    font-size: 0.8rem;
  }

  .tab-nav__btn {
    font-size: 0.75rem;
    padding: 10px 4px;
  }

  .tab-inner__left,
  .tab-inner__right {
    padding: 12px;
  }

  .modal__slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* スクロール許可 + フッター分余白 */
  body {
    padding-bottom: 52px;
  }
}
