/* 制作エントリーの「ご希望の日時」（第1〜第3希望とカレンダー）。/entry/ だけで読み込む
   形は神楽紫のお問い合わせフォーム（2026-10-03 Ryuichi「こういう感じにしましょう」）。色は Wepuri の変数 */
.sec_entry_fields_ptn_1 .schedule {
  & + .field { margin-top: 28px; }

  .ttl {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.75em;
  }

  .req {
    padding: 2px 8px;
    background: var(--heading);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5em;
    border-radius: 6px;
  }

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

  .name {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5em;
  }

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

  .date {
    padding-inline: 14px;
    min-width: 220px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--white);
    color: var(--ink-soft);
    font-family: var(--font-jp);
    font-size: 16px;
    border: 1px solid var(--sage-dark);
    border-radius: 10px;
    cursor: pointer;
    @media (max-width: 600px) { flex: 1 1 100%; min-width: 0; }
    .icon { color: var(--sage-dark); font-size: 12px; }
    &.is_set { color: var(--heading); font-weight: 700; }
    &[aria-expanded="true"] .icon { transform: rotate(180deg); }
    &:focus-visible { outline: 2px solid var(--heading-line); outline-offset: 2px; }
  }

  .times {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    /* 日付ボタンが1段まるごと使う幅では、開始〜終了も1段を分け合う（320px でも枠からはみ出さない） */
    @media (max-width: 600px) {
      min-width: 0;
      flex: 1 1 100%;
      select { flex: 1 1 0; min-width: 0; }
    }
  }

  /* fields.css の select の共通指定（幅100%）を打ち消して、開始〜終了を横に並べる */
  select {
    padding-inline: 12px;
    width: auto;
    min-width: 104px;
    background: var(--white);
    border-color: var(--sage-dark);
    cursor: pointer;
    &:disabled { background: var(--cream-deep); color: var(--ink-soft); border-color: var(--line); cursor: not-allowed; }
    &:focus-visible { outline: 2px solid var(--heading-line); outline-offset: 1px; }
  }

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

  .calendar {
    margin-top: 12px;
    padding: 16px;
    max-width: 340px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    @media (max-width: 600px) { padding: 10px 6px; max-width: none; }
    &[hidden] { display: none; }
  }

  /* fields.css のセクション見出し（.head の上 40px・中央寄せ）を打ち消す */
  .head {
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .month { color: var(--heading); font-size: 17px; font-weight: 700; }

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

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

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

  td {
    padding: 2px;
    @media (max-width: 600px) { 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-family: var(--font-jp);
    font-size: 14px;
    border: 1px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    &.sun { color: #b0493a; }
    &.sat { color: #3f6a9a; }
    &.is_today { border-color: var(--heading-line); }
    &:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--sage-pale); }
    &[aria-pressed="true"] { background: var(--sage-dark); color: var(--white); font-weight: 700; border-color: var(--sage-dark); }
    &:disabled { color: var(--line); cursor: default; }
    &:focus-visible { outline: 2px solid var(--heading-line); outline-offset: 1px; }
  }
}
