/* お問い合わせフォームの「ご希望の日時」（第1〜第3希望とカレンダー）。contact.html だけで読み込む */
/* 入れ子の先頭が要素名のときは & を付ける（Chrome 119 / Safari 17.1 以前は & 無しを読めない） */
.sec_contact_form .format {
  .note {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8em;
  }

  /* 対面の下にぶら下がる欄なので、左の線だけで字下げして見せる（上に線を引くと legend が線を切ってしまう） */
  .place {
    margin-top: 18px;
    padding: 4px 0 4px 18px;
    border-left: 2px solid var(--line);
    @media (max-width: 700px) { padding-left: 12px; }
    > legend { font-size: 15px; }
  }

  .trip { margin-top: 16px; }

  .notice {
    padding: 14px 16px;
    background: #fffaf1;
    font-size: 13px;
    line-height: 1.8em;
    border-left: 3px solid var(--gold);
    & strong { color: var(--brown); font-weight: 700; }
  }

  .trip .field { margin-top: 14px; }
}

.sec_contact_form .schedule {
  .note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8em;
  }

  .slot {
    margin-top: 14px;
    padding: 16px 18px;
    background: #fffdf8;
    border: 1px solid var(--line);
    @media (max-width: 700px) { padding: 12px 10px; }
    &.is_error { border-color: #a03a2c; }
    &.is_error .date { border-color: #a03a2c; }
  }

  .ttl {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brown);
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 600;
    .req,
    .opt { font-family: var(--sans); }
  }

  .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
  }

  .date {
    padding-inline: 14px;
    min-width: 210px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    color: var(--muted);
    font-size: 15px;
    border: 1px solid #a08a5e;
    transition: border-color .2s ease;
    cursor: pointer;
    @media (max-width: 700px) { flex: 1 1 100%; min-width: 0; }
    .icon { color: var(--brown); font-size: 12px; }
    &.is_set { color: var(--brown); font-weight: 600; }
    &[aria-expanded="true"] { border-color: var(--brown); }
    &[aria-expanded="true"] .icon { transform: rotate(180deg); }
    &:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  }

  .times {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
  }

  & select {
    padding-inline: 12px;
    min-height: 48px;
    background: #fff;
    color: var(--ink);
    font-size: 16px;
    border: 1px solid #a08a5e;
    cursor: pointer;
    &:disabled { background: #f6f1e6; color: #b3a88f; border-color: var(--line); cursor: not-allowed; }
    &:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
  }

  .clear {
    padding: 6px 8px;
    min-height: 44px;
    background: none;
    color: var(--muted);
    font-size: 13px;
    text-decoration: underline;
    border: 0;
    cursor: pointer;
  }

  .calendar {
    margin-top: 12px;
    padding: 16px;
    max-width: 340px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px #3c28161a;
    @media (max-width: 700px) { padding: 8px 4px; max-width: none; }
    &[hidden] { display: none; }
  }

  .head {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .month {
    color: var(--brown);
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 600;
  }

  .nav {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    color: var(--brown);
    font-size: 20px;
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    &:hover:not(:disabled) { background: var(--sand); }
    &:disabled { opacity: .3; cursor: default; }
    &:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
  }

  & table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  & th {
    padding-block: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    &.sun { color: #b0493a; }
    &.sat { color: #3f6a9a; }
  }

  & td {
    padding: 2px;
    @media (max-width: 700px) { padding: 0; }
  }

  .day {
    margin-inline: auto;
    width: 100%;
    max-width: 40px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    color: var(--ink);
    font-size: 14px;
    border: 1px solid transparent;
    border-radius: 50%;
    transition: background-color .15s ease;
    cursor: pointer;
    &.sun { color: #b0493a; }
    &.sat { color: #3f6a9a; }
    &.is_today { border-color: var(--gold); }
    &:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--sand); }
    &[aria-pressed="true"] { background: var(--brown); color: #fff; font-weight: 600; border-color: var(--brown); }
    &:disabled { color: #d3cab6; cursor: default; }
    &:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
  }
}
