/* ══════════════════════════════════════════════
   방문예약 (예약 인원 알림 + 아래에서 올라오는 예약 창)
   ══════════════════════════════════════════════ */

/* ── 예약 인원 알림 말풍선 ── */
.bk-toast {
  position: fixed;
  left: 16px;
  bottom: 96px;                 /* 하단 고정 바 바로 위 */
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100vw - 32px);
  padding: 10px 8px 10px 16px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .08);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}

.bk-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 말풍선 꼬리 */
.bk-toast::after {
  content: '';
  position: absolute;
  left: var(--tail-x, 28px);   /* 꼬리 위치: JS가 '방문예약' 아이콘 위치에 맞춤 */
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px;
}

.bk-toast-text {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: #222;
  letter-spacing: -0.3px;
  white-space: nowrap;
  cursor: pointer;
}

.bk-toast-text b {
  color: #C8261E;
  font-weight: 800;
}

.bk-toast-x {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: #F1F1F1;
  color: #666;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

/* ── 배경 어둡게 ── */
.bk-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 16, 30, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

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

body.bk-lock { overflow: hidden; }

/* ── 아래에서 올라오는 예약 창 ── */
.bk-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 1001;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  max-height: 92svh;
  overflow-y: auto;
  padding: 14px 22px calc(24px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
  color: #1a1a1a;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  transform: translate(-50%, 105%);
  transition: transform .38s cubic-bezier(.2, .8, .2, 1);
  visibility: hidden;
}

.bk-sheet.open {
  transform: translate(-50%, 0);
  visibility: visible;
}

.bk-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #DDD;
  margin: 0 auto 14px;
}

.bk-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #F1F2F4;
  color: #0E1E35;
  font-size: 15px;
  cursor: pointer;
}

.bk-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #0E1E35;
  margin: 4px 0 6px;
}

.bk-sub {
  font-size: 13px;
  color: #777;
  margin: 0 0 18px;
  line-height: 1.5;
}

.bk-field {
  display: block;
  width: 100%;
  height: 52px;
  margin-bottom: 10px;
  padding: 0 16px;
  border: 1.5px solid #E2E2E2;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 16px;               /* 16px 미만이면 아이폰에서 화면이 확대됨 */
  color: #1a1a1a;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.bk-field:focus { border-color: #0E1E35; }
.bk-field::placeholder { color: #AAA; }

.bk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 날짜·시간 칸 라벨 */
.bk-lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin: 2px 0 6px 2px;
}

select.bk-field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}

textarea.bk-field {
  height: 96px;
  padding: 14px 16px;
  resize: none;
  line-height: 1.5;
}

.bk-agree {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.bk-agree input {
  width: 20px;
  height: 20px;
  accent-color: #0E1E35;
  flex-shrink: 0;
}

.bk-terms-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
}

.bk-terms {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #F6F6F6;
  font-size: 12px;
  color: #666;
  line-height: 1.7;
}

.bk-submit {
  width: 100%;
  height: 56px;
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  background: #0E1E35;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  cursor: pointer;
}

.bk-submit:disabled { opacity: .6; cursor: wait; }

/* PC에서는 화면 가운데 아래쪽에 카드처럼 */
@media (min-width: 769px) {
  .bk-sheet {
    bottom: 24px;
    border-radius: 24px;
  }

  .bk-sheet:not(.open) { transform: translate(-50%, 120%); }
}

/* ── 하단 고정 바: 방문예약 아이콘 ── */
.fl-ico--visit { background: #d3a032; color: #0E1E35 }   /* 방문예약: 골드 */

/* ══════════════════════════════════════════════
   첫 화면 이미지 팝업
   ══════════════════════════════════════════════ */
.ip-overlay {
  position: fixed;
  inset: 0;
  z-index: 1002;
  background: rgba(8, 16, 30, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

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

.ip {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1003;
  width: min(88vw, 420px);
  max-height: 88vh;
  max-height: 88svh;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -46%) scale(.97);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}

.ip.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.ip-img {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;          /* 이미지가 화면보다 길면 팝업 안에서 스크롤 */
  line-height: 0;
}

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

.ip-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.ip-today {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 15px 18px;
  background: #F5F5F5;
  font-size: 15px;
  color: #333;
  cursor: pointer;
}

.ip-today input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #0E1E35;
}
