/* 予約フォームの「利用規約」「プライバシーポリシー」を、その場で読める小窓（2026-10-25） */

/* 同意欄: チェックを左、文を右に並べる（.form-group label の block 指定より優先） */
#terms-group .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
}
#terms-group .checkbox-label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  margin: 3px 0 0;
}
.terms-consent-text { line-height: 1.6; }

.terms-link {
  background: linear-gradient(transparent 58%, rgba(255, 214, 102, 0.7) 58%);
  color: var(--primary, #1B365D);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  padding: 0 2px;
  border-radius: 2px;
  cursor: pointer;
}
.terms-link:hover,
.terms-link:focus-visible {
  background: rgba(255, 214, 102, 0.95);
  outline: none;
}

.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 37, 68, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.terms-modal[hidden] { display: none; }

.terms-modal__dialog {
  background: #ffffff;
  color: #1a1a1a;
  width: min(760px, 100%);
  max-height: min(86vh, 900px);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.terms-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #E5E7EB;
}
.terms-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary, #1B365D);
}
.terms-modal__close {
  background: none;
  border: 0;
  font-size: 1.7rem;
  line-height: 1;
  color: #555;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.terms-modal__close:hover,
.terms-modal__close:focus-visible { background: #F3F4F6; color: #111; outline: none; }

.terms-modal__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 18px 20px 10px;
  font-size: 0.92rem;
  line-height: 1.75;
  color: #1a1a1a;
}
.terms-modal__body .section-label { display: none; }
.terms-modal__body .section-title { display: none; }
.terms-modal__body .cancel-content { max-width: none; }
.terms-modal__body .cancel-intro {
  background: #F7F5EE;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
  margin: 0 0 14px;
}
.terms-modal__body .cancel-block { margin: 0 0 16px; }
.terms-modal__body .cancel-block h3 {
  font-size: 0.98rem;
  color: var(--primary, #1B365D);
  margin: 0 0 6px;
}
.terms-modal__body .cancel-block p { margin: 0 0 6px; }
.terms-modal__body ul { padding-left: 1.2em; margin: 4px 0; }
.terms-modal__body li { margin: 2px 0; }
.terms-modal__body a { color: #0066cc; text-decoration: underline; }
.terms-modal__body .fade-in { opacity: 1; transform: none; animation: none; }

.terms-modal__loading,
.terms-modal__error {
  padding: 40px 20px;
  text-align: center;
  color: #555;
}

.terms-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 18px 14px;
  border-top: 1px solid #E5E7EB;
  background: #ffffff;
}
.terms-modal__hint {
  margin-right: auto;
  font-size: 0.8rem;
  color: #666;
}
.terms-modal__btn {
  border-radius: 50px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: 2px solid var(--primary, #1B365D);
  background: #ffffff;
  color: var(--primary, #1B365D);
}
.terms-modal__btn:hover,
.terms-modal__btn:focus-visible { background: #F3F6FA; outline: none; }
.terms-modal__btn--primary {
  background: var(--accent, #BE512D);
  border-color: var(--accent, #BE512D);
  color: #ffffff;
}
.terms-modal__btn--primary:hover,
.terms-modal__btn--primary:focus-visible { background: var(--accent-hover, #9D3B1C); border-color: var(--accent-hover, #9D3B1C); }

body.terms-modal-open { overflow: hidden; }

@media (max-width: 600px) {
  .terms-modal { padding: 0; align-items: flex-end; }
  .terms-modal__dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }
  .terms-modal__body { padding: 14px 16px 8px; font-size: 0.9rem; }
  .terms-modal__foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .terms-modal__hint { flex-basis: 100%; margin-right: 0; }
  .terms-modal__btn { flex: 1 1 auto; text-align: center; }
}

@media (prefers-reduced-motion: no-preference) {
  .terms-modal__dialog { animation: termsModalIn 0.25s ease-out; }
  @keyframes termsModalIn {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
}
