/* reservation.css — engle.co.kr */

.rsv-wrap {
  max-width: 680px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: calc(var(--nav-height, 70px) + 32px) 20px 0;
}

.rsv-banner {
  display: block;
  width: 100%;
  border-bottom: 4px solid #001241;
  margin-bottom: 18px;
}

.rsv-page-title {
  text-align: center;
  font-size: 1.8rem !important;
  font-weight: 700;
  /* bundle.css 전역 h1 규칙(margin-top:180px, padding:30px)이 특이도로 이김
     → 상단 간격만 !important로 상쇄 (배너-제목 간격은 .rsv-banner margin 18px) */
  margin: 0 0 6px !important;
  padding-top: 0 !important;
  color: #1a1a2e;
}

.rsv-page-subtitle {
  text-align: center;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 28px;
}

/* ── 폼 ── */
.form-wrap {
  margin-top: 4px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.form-group label .required {
  color: #e3392e;
  margin-left: 2px;
}

.form-group label .optional {
  font-size: 13px;
  font-weight: 400;
  color: #94a3b8;
  margin-left: 4px;
}

/* 스크린리더 전용 라벨 (시각적으로 숨김) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 클라이언트 필수값 검사 오류 표시 */
.form-control.is-invalid {
  border-color: #e3392e;
}

.form-check-input.is-invalid {
  outline: 2px solid #e3392e;
  outline-offset: 2px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  color: #1a1a2e;
  background: #fff;
  border: 1.5px solid #d1d9e0;
  border-radius: 8px;
  outline: none;
  transition: border-color .18s;
  -webkit-appearance: none;
  appearance: none;
}

.form-control:focus {
  border-color: #001241;
}

select.form-control {
  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='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── 개인정보 ── */
.form-privacy-disclosure {
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.form-privacy-disclosure summary {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  background: #f8fafc;
  list-style: none;
}

.form-privacy-disclosure summary::-webkit-details-marker {
  display: none;
}

.form-privacy {
  padding: 14px 16px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.7;
  border-top: 1px solid #e2e8f0;
}

.form-privacy-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 12px;
}

.form-privacy-table th,
.form-privacy-table td {
  border: 1px solid #e2e8f0;
  padding: 7px 10px;
  text-align: center;
}

.form-privacy-table th {
  background: #f1f5f9;
  font-weight: 600;
}

/* ── 동의 체크박스 ── */
.form-check-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.form-check-input {
  width: 18px;
  height: 18px;
  border: 1.5px solid #d1d9e0;
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #001241;
}

.form-check-label {
  font-size: 14px;
  color: #1a1a2e;
  cursor: pointer;
}

/* ── 제출 버튼 ── */
.btn-submit {
  display: block;
  width: min(70%, 252px);
  /* 개인정보 동의와 푸터 사이 수직 중앙: 위 60px / 아래 60px(푸터 margin-top) */
  margin: 60px auto 0;
  padding: 16px 24px;
  background: #001241;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  border: none;
  border-radius: 32px;
  cursor: pointer;
  transition: background .18s, box-shadow .18s, transform .1s;
  box-shadow: 0 4px 16px rgba(0, 18, 65, .25);
}

.btn-submit:hover {
  background: #00093a;
  box-shadow: 0 6px 20px rgba(0, 18, 65, .35);
}

.btn-submit:active {
  transform: scale(.97);
}

/* ── 슬롯 마감 안내 ── */
.form-info {
  padding: 12px 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 14px;
  line-height: 1.7;
  margin-top: 8px;
}

/* ── 에러 ── */
.form-error {
  padding: 12px 16px;
  background: #fff2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ── 완료 화면 ── */
.rsv-complete {
  width: 100%;
  max-width: 560px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 24px 0 40px;
  text-align: center;
}

.rsv-complete__check {
  margin: 0 auto 20px;
  width: 80px;
  height: 80px;
}

.check-circle {
  width: 80px;
  height: 80px;
  display: block;
}

.check-circle__ring {
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: ring-draw .55s cubic-bezier(.4, 0, .2, 1) .1s forwards;
}

@keyframes ring-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.check-circle__tick {
  stroke-dasharray: 52;
  stroke-dashoffset: 52;
  animation: tick-draw .35s cubic-bezier(.4, 0, .2, 1) .6s forwards;
}

@keyframes tick-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.rsv-complete__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px;
  white-space: nowrap;
  animation: fade-up-in .45s ease .9s both;
}

.rsv-complete__lead {
  font-size: .95rem;
  color: #475569;
  margin: 0 0 24px;
  animation: fade-up-in .45s ease 1s both;
}

@keyframes fade-up-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reservation-summary {
  display: block;
  background: #fff;
  border: 1.5px solid #c5d5f5;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 20px 24px;
  margin: 0 auto 24px;
  text-align: left;
  animation: fade-up-in .45s ease 1.1s both;
}

.reservation-summary div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f0f4fb;
  align-items: baseline;
  background: transparent;
}

.reservation-summary div:last-child {
  border-bottom: none;
}

.reservation-summary dt {
  font-size: .82rem;
  color: #64748b;
}

.reservation-summary dd {
  min-width: 0;
  font-size: .95rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.reservation-actions,
.rsv-complete__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: fade-up-in .45s ease 1.2s both;
}

.reservation-button {
  display: block;
  width: min(100%, 360px);
  max-width: 360px;
  box-sizing: border-box;
  padding: 15px 20px;
  border-radius: 29px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background .18s, box-shadow .18s, transform .12s;
}

.reservation-button:active {
  transform: scale(.97);
}

.reservation-button--primary {
  background: #001241;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 18, 65, .28);
}

.reservation-button--primary:hover {
  background: #00093a;
  box-shadow: 0 6px 20px rgba(0, 18, 65, .38);
}

.reservation-button--secondary {
  background: #fff;
  color: #001241;
  border: 1.5px solid #c5d5f5;
}

.reservation-button--secondary:hover {
  background: #f0f4ff;
}

/* ── 오시는 길 ── */
.directions-box {
  width: 100%;
  max-width: 560px;
  box-sizing: border-box;
  margin: 40px auto 0;
  text-align: center;
}

.directions-box__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 14px;
}

.directions-box__map {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  display: block;
}

.directions-box__address {
  margin: 12px 0 0;
  font-size: .88rem;
  color: #475569;
}

/* ── 모바일 ── */
@media (max-width: 768px) {
  .rsv-wrap {
    width: calc(100% - 32px);
    padding: calc(var(--nav-height, 66px) + 24px) 0 0;
  }
}

@media (max-width: 480px) {
  .rsv-wrap {
    width: calc(100% - 32px);
    padding: calc(var(--nav-height, 66px) + 24px) 0 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .rsv-page-title {
    font-size: 1.2rem !important;
  }

  .rsv-complete__title {
    font-size: clamp(.98rem, 4.4vw, 1.12rem);
    line-height: 1.35;
    white-space: nowrap;
  }

  .rsv-complete {
    padding: 16px 0 28px;
  }

  .rsv-complete__check,
  .check-circle {
    width: 64px;
    height: 64px;
  }

  .rsv-complete__check {
    margin-bottom: 16px;
  }

  .reservation-summary {
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 10px;
  }

  .reservation-summary div {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
  }

  .reservation-summary dt {
    font-size: .8rem;
  }

  .reservation-summary dd {
    font-size: .92rem;
    line-height: 1.45;
  }

  .reservation-actions,
  .rsv-complete__actions {
    gap: 16px;
  }

  .reservation-button {
    min-height: 48px;
    width: min(100%, 320px);
    max-width: 320px;
    padding: 14px 16px;
    font-size: .95rem;
    line-height: 1.25;
  }

  .directions-box {
    margin-top: 28px;
  }

  .directions-box__title {
    font-size: 1rem;
  }

  .directions-box__address {
    font-size: .84rem;
    line-height: 1.5;
    word-break: keep-all;
  }
}

@media (max-width: 360px) {
  .reservation-summary div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
