/* 賞屋預約 住戶端公開頁樣式（表單 + 成功頁） */
body {
  background: linear-gradient(135deg, #fff8f0, #ffe8d6);
  font-family: "Microsoft JhengHei", sans-serif;
  min-height: 100vh;
  color: #333;
  font-size: 20px;
  line-height: 1.625;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ---- 表單 ---- */
.booking-container {
  max-width: 760px;
  margin: 2rem auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 16px 45px rgba(133, 111, 89, 0.18);
  overflow: hidden;
  position: relative;
}
.booking-header {
  background: var(--julife-accent);
  color: var(--julife-accent-foreground);
  padding: 2rem;
  text-align: center;
}
.booking-header h1 { margin: 0; font-size: 2rem; font-weight: 700; }
.booking-header p { margin: 0.3rem 0 0; opacity: 0.9; }
.booking-form { padding: 2rem; }
.form-section { margin-bottom: 1.75rem; }
.form-section h5 { color: var(--julife-accent-deep); font-size: 1.5rem; font-weight: 700; border-bottom: 2px solid #ffe8d6; padding-bottom: 0.5rem; margin-bottom: 1rem; }
.form-label,
.form-check-label,
.form-control,
.form-select,
.form-text,
small { font-size: 1.125rem; line-height: 1.55; }
.form-control,
.form-select { min-height: 58px; border-radius: 14px; }
.form-control:focus, .form-select:focus { border-color: var(--julife-accent); box-shadow: 0 0 0 0.2rem rgb(var(--julife-accent-rgb) / .18); }
.options-container { display: grid; gap: 0.75rem; }
.age-options { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.gender-options { grid-template-columns: repeat(2, 1fr); }
.relationship-options { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.choice-option { display: flex; min-height: 60px; align-items: center; justify-content: center; padding: 0.7rem; border: 2px solid #ddd; border-radius: 12px; text-align: center; cursor: pointer; transition: all .25s; background: #fff; font-size: 1.125rem; font-weight: 700; }
.choice-option:hover { border-color: var(--julife-accent); background: #fffaf6; transform: translateY(-2px); }
.choice-option.selected { border-color: var(--julife-accent-deep); background: var(--julife-accent); color: var(--julife-accent-foreground); font-weight: 500; }
#periods_container { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); }
.custom-option { min-height: 64px; padding: 0.85rem; border: 2px solid #ddd; border-radius: 12px; cursor: pointer; transition: all .25s; background: #fff; font-size: 1.125rem; }
.custom-option:hover { border-color: var(--julife-accent); background: #fffaf6; }
.custom-option.selected { border-color: var(--julife-accent-deep); background: var(--julife-accent); color: var(--julife-accent-foreground); }
.custom-option h6 { margin: 0 0 .25rem; font-weight: 600; }
.notice-section { background: #fffaf6; border: 1px solid #f5e9e0; border-radius: 16px; padding: 1.25rem; margin-bottom: 1.75rem; }
.notice-section h6 { color: var(--julife-accent-deep); font-weight: 700; }
.privacy-section { background: #fdf6f0; border: 1px solid #f5e9e0; border-radius: 10px; padding: 1rem; margin-top: 1.5rem; }
.btn-submit { min-height: 64px; background: var(--julife-accent); border: none; color: var(--julife-accent-foreground); font-size: 1.5rem; font-weight: 700; border-radius: 16px; }
.btn-submit:hover { background: var(--julife-accent-hover); color: var(--julife-accent-foreground); box-shadow: 0 6px 18px rgb(var(--julife-accent-rgb) / .35); }
.loading { display: none; }
.loading.show { display: inline-block; }
.options-container.is-invalid { border: 1px solid #dc3545; border-radius: 8px; padding: .25rem; }
.lang-switcher { position: absolute; top: 1rem; right: 1.25rem; z-index: 5; }
.lang-btn { display: inline-flex; min-width: 52px; min-height: 44px; align-items: center; justify-content: center; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.65); color: #fff; padding: .35rem .8rem; border-radius: 20px; font-size: 1.125rem; font-weight: 700; text-decoration: none; margin-left: .4rem; }
.lang-btn.active, .lang-btn:hover { background: #fff; color: var(--julife-accent-deep); }

/* ---- 成功頁 ---- */
.success-container { max-width: 720px; margin: 2rem auto; background: #fff; border-radius: 24px; box-shadow: 0 16px 45px rgba(133,111,89,.18); overflow: hidden; }
.success-header { background: linear-gradient(135deg, #2ecc71, #27ae60); color: #fff; padding: 2.5rem 2rem; text-align: center; position: relative; }
.success-icon { font-size: 3.5rem; margin-bottom: .5rem; }
.success-title { font-size: 1.8rem; font-weight: 700; margin: 0; }
.success-subtitle { opacity: .9; margin: .3rem 0 0; }
.success-body { padding: 2rem; }
.detail-section { background: #f8f9fa; border-radius: 14px; padding: 1.25rem; margin-bottom: 1.25rem; }
.detail-section h6 { color: var(--julife-accent-deep); font-weight: 700; border-bottom: 2px solid #ffe8d6; padding-bottom: .5rem; margin-bottom: .75rem; }
.detail-item { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid #eee; }
.detail-item:last-child { border-bottom: none; }
.detail-label { font-weight: 600; color: #555; }
.detail-value { color: #333; text-align: right; }
.contact-info { background: #fffaf6; border: 1px solid #f5e9e0; border-radius: 14px; padding: 1.25rem; margin-bottom: 1.25rem; }
.contact-info h6 { color: var(--julife-accent-deep); font-weight: 700; margin-bottom: .75rem; }
.contact-item { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; color: #5a4f44; }
.success-header .lang-btn.active, .success-header .lang-btn:hover { background: #fff; color: #27ae60; }

/* Shared booking dialogs on this Bootstrap-only page; leave form styles intact. */
.julife-service-dialog { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(15, 23, 42, .6); backdrop-filter: blur(4px); }
.julife-service-dialog > section { display: flex; flex-direction: column; width: 100%; max-width: 32rem; max-height: 90dvh; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 1rem; background: #fff; color: #334155; box-shadow: 0 25px 50px rgba(0, 0, 0, .25); }
.julife-service-dialog > section > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; background: #fff7ed; border-bottom: 1px solid #ffedd5; }
.julife-service-dialog header h2 { margin: 0; font-size: 1.5rem; font-weight: 800; color: #c2410c; }
.julife-service-dialog header button { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: #64748b; font-size: 1.5rem; }
.julife-service-dialog > section > p { min-height: 0; overflow-y: auto; margin: 0; padding: 1.75rem 1.5rem; white-space: pre-line; overflow-wrap: anywhere; font-size: 1.25rem; font-weight: 700; line-height: 1.625; }
.julife-service-dialog > section > footer { display: flex; justify-content: flex-end; gap: .75rem; padding: 1rem 1.5rem; border-top: 1px solid #e2e8f0; background: #f8fafc; }
.julife-service-dialog footer button { min-height: 64px; padding: .75rem 1.25rem; border: 1px solid #fed7aa; border-radius: .75rem; background: var(--julife-accent); color: var(--julife-accent-foreground); font-size: 1.5rem; font-weight: 700; }
.julife-service-dialog footer button:not(:last-child) { border-color: #cbd5e1; background: #fff; color: #475569; }
.julife-service-dialog button:focus-visible { outline: 3px solid var(--julife-accent-deep); outline-offset: 2px; }

@media (max-width: 767px) {
  body { min-width: 0; overflow-x: hidden; }
  .booking-container,
  .success-container {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .booking-header,
  .success-header { padding: 4.75rem 1rem 1.5rem; }
  .booking-header h1,
  .success-title { font-size: 1.75rem; line-height: 1.35; }
  .booking-form,
  .success-body { padding: 1.25rem 1rem 2rem; }
  .form-section { margin-bottom: 1.5rem; }
  .form-section h5 { font-size: 1.375rem; }
  .age-options,
  .relationship-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #periods_container { grid-template-columns: 1fr; }
  .choice-option,
  .custom-option { min-width: 0; overflow-wrap: anywhere; }
  .form-check { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: .75rem; align-items: start; }
  .form-check .form-check-input { width: 28px; height: 28px; margin: .15rem 0 0; }
  .form-check .form-check-label { min-width: 0; }
  .lang-switcher { top: .75rem; right: .75rem; }
  .detail-item { flex-direction: column; gap: .25rem; padding: .75rem 0; }
  .detail-value { text-align: left; overflow-wrap: anywhere; }
  .julife-service-dialog { padding: .75rem; }
  .julife-service-dialog > section > header,
  .julife-service-dialog > section > footer { padding-inline: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

.booking-container .lang-btn { color: var(--julife-accent-foreground); }
