/* ==========================================================================
   MHZ ESCAPE : HAENGGUNG - NEGATIVE SPACE (여백의 미) & AIRY MINIMALISM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
  --bg: #FFFFFF;
  --bg-subtle: #F9F9FB;
  
  --text-main: #000000;
  --text-muted: #666666;
  --text-dim: #A3A3A3;
  
  --hairline: rgba(0, 0, 0, 0.1);
  --hairline-hover: #000000;
  
  --control-h: 48px;
  --block-h: 48px;
  
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', 'Noto Sans KR', sans-serif;
  
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Minimal Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #E5E5E5;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: #000000;
}

/* Typography */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

/* Theme Photo Frame (Portrait Poster Ratio) */
.theme-photo-frame {
  width: 100%;
  aspect-ratio: 3 / 4.16;
  background: #0A0A0A;
  border: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

/* Minimalist Nav Arrow Button for Week Pagination */
.nav-arrow-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #737373;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.nav-arrow-btn:hover:not(:disabled) {
  color: #000000;
  opacity: 1;
}

.nav-arrow-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  color: #A3A3A3;
}

/* Minimalist Typographic Date Selector */
.date-selector-btn {
  height: var(--block-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: var(--font-body);
  font-weight: 300 !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 0.2rem 0.15rem;
}

.date-selector-btn:hover:not(:disabled) {
  border-bottom-color: rgba(0, 0, 0, 0.15);
}

.date-selector-btn.selected {
  background: transparent;
  color: #000000;
  border-bottom-color: #000000;
  font-weight: 300 !important;
}

.date-selector-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  background: transparent;
  border-bottom-color: transparent;
}

/* Minimalist Typographic Time Slot */
.slot-block {
  height: var(--block-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: var(--font-body);
  font-weight: 300 !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 0.2rem 0.5rem;
}

.slot-block:hover:not(:disabled) {
  border-bottom-color: rgba(0, 0, 0, 0.35);
}

.slot-block.selected {
  background: transparent;
  color: #000000;
  border-bottom: 1.5px solid #000000;
  font-weight: 300 !important;
}

.slot-block.is-closed {
  border-bottom-color: transparent !important;
}

.slot-block:disabled {
  cursor: not-allowed;
  background: transparent;
  border-bottom-color: transparent;
  color: #A3A3A3;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  opacity: 0.35;
}

/* Unified Control Heights (48px) */
.control-h {
  height: var(--control-h) !important;
}

/* Minimalist Typographic Player Selector */
.player-btn {
  height: var(--control-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 300 !important;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  color: #737373;
  padding: 0 0.25rem;
}

.player-btn:hover {
  border-bottom-color: rgba(0, 0, 0, 0.35);
  color: #000000;
}

.player-btn.active {
  background: transparent;
  color: #000000;
  border-bottom: 1.5px solid #000000;
  font-weight: 300 !important;
}

/* Minimalist Typographic Input Field */
.input-field {
  height: var(--control-h);
  width: 100%;
  padding: 0 0.25rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  font-weight: 300 !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  border-radius: 0;
  transition: border-color 0.2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

.input-field::placeholder {
  color: #A3A3A3 !important;
  -webkit-text-fill-color: #A3A3A3 !important;
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  font-weight: 300 !important;
}

.input-field:focus {
  outline: none;
  border-bottom: 1.5px solid #000000;
  font-family: var(--font-body) !important;
  font-weight: 300 !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* Suppress WebKit & Chrome Light Blue Autofill Background */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  -webkit-text-fill-color: #000000 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  caret-color: #000000 !important;
  transition: background-color 50000s ease-in-out 0s, color 50000s ease-in-out 0s !important;
}

input:autofill,
textarea:autofill,
select:autofill {
  background-color: #FFFFFF !important;
  color: #000000 !important;
}

/* Cinematic Typewriter Effect */
.typewriter-cursor {
  display: inline-block;
  font-weight: 300;
  color: #000000;
  margin-left: 2px;
  animation: blinkCursor 0.8s infinite;
  vertical-align: baseline;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Minimalist Typographic Toggle Trigger (+ / -) */
.booking-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0;
  color: #000000;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: opacity 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.booking-toggle-btn:hover {
  opacity: 0.6;
}

.toggle-icon-wrap {
  width: 10px;
  height: 10px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.toggle-bar-h,
.toggle-bar-v {
  position: absolute;
  background-color: #000000;
  border-radius: 0px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.toggle-bar-h {
  width: 8.5px;
  height: 1px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.toggle-bar-v {
  width: 1px;
  height: 8.5px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
}

/* Header Lookup Toggle: Ultra-delicate 1px icon */
.header-lookup-btn .toggle-icon-wrap {
  width: 10px;
  height: 10px;
}

.header-lookup-btn .toggle-bar-h {
  width: 8.5px;
  height: 1px;
}

.header-lookup-btn .toggle-bar-v {
  width: 1px;
  height: 8.5px;
}

/* When active/open: Spins 180deg clockwise to the right, vertical bar collapses into horizontal bar to form a crisp '-' */
.booking-toggle-btn.is-open .toggle-icon-wrap,
.header-lookup-btn.is-open .toggle-icon-wrap {
  transform: rotate(180deg);
}

.booking-toggle-btn.is-open .toggle-bar-v,
.header-lookup-btn.is-open .toggle-bar-v {
  transform: translate(-50%, -50%) rotate(90deg) scale(0, 1);
  opacity: 0;
}

/* Smooth Zero-Jank Grid Accordion Expansion & Collapse */
.collapsible-reservation-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), margin 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
}

.collapsible-reservation-wrapper.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 1.5rem;
}

.collapsible-reservation-inner {
  min-height: 0;
  visibility: hidden;
  transition: visibility 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.collapsible-reservation-wrapper.is-open .collapsible-reservation-inner {
  visibility: visible;
}

.btn-black {
  height: var(--control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 1.5rem;
  background: #000000;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 450;
  border: 1px solid #000000;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-black:hover {
  background: #FFFFFF;
  color: #000000;
}

.btn-white {
  height: var(--control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  background: #FFFFFF;
  color: #000000;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  border: 1px solid var(--hairline);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-white:hover {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
}

/* Modal Overlay & Box */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  transform: scale(0.97);
  transition: transform 0.2s var(--ease);
  position: relative;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  padding: 0.85rem 1.4rem;
  background: #000000;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.2s var(--ease);
}

.toast-message.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 640px) {
  :root {
    --block-h: 44px;
    --control-h: 44px;
  }

  .date-selector-btn {
    min-width: 0;
    width: 100%;
    height: var(--control-h) !important;
    padding: 0.15rem 0.05rem;
  }

  .slot-block {
    height: var(--control-h) !important;
    padding: 0.15rem 0.05rem;
  }

  .modal-box {
    padding: 1.5rem 1.25rem !important;
  }

  #toast-container {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }
}
