/* ============================================================
   appointment component styles
   prefix: smaluna_appt__
   ============================================================ */

.smaluna_appt__root {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  color: #333333;
  box-sizing: border-box;
  padding: 24px 16px 48px;
  max-width: 768px;
  min-height: calc(-60px + 100svh);
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.smaluna_appt__root *,
.smaluna_appt__root *::before,
.smaluna_appt__root *::after {
  box-sizing: inherit;
  font-weight: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}

.smaluna_appt__top-section {
  margin-inline: 0px;
  margin-bottom: 0px;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
}

.smaluna_appt__subject {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  padding: 0.75rem;
  -webkit-box-align: center;
  align-items: center;
  background: #FFFFFF;
}

.smaluna_appt__subject-label {
  font-size: 14px;
  line-height: 170%;
  letter-spacing: 0.04em;
  font-weight: 500;
  margin: 0;
}

.smaluna_appt__subject-value {
  font-size: 14px;
  line-height: 170%;
  letter-spacing: 0.04em;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-align: right;
  margin: 0;
}

/* ===== 初診・再診選択 ===== */
.smaluna_appt__visit-group {
  margin-top: 1px;
  margin-inline: 0px;
  margin-bottom: 0px;
  background: #FFFFFF;
}

.smaluna_appt__visit-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

/* ラジオ input を視覚的に非表示（アクセシビリティ維持） */
.smaluna_appt__visit-label input[type="radio"] {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  position: absolute;
}

.smaluna_appt__radio-inner {
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  flex-direction: row;
  padding: 0.75rem;
}

.smaluna_appt__radio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.smaluna_appt__radio-text {
  font-size: 14px;
  color: #333;
  margin-left: 7px;
}

/* ===== 週ナビゲーション ===== */
.smaluna_appt__week-nav {
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  justify-content: space-between;
  flex-direction: row;
  height: 40px;
  background-color: #FFFFFF;
  padding-inline-start: 0.5rem;
  padding-inline-end: 0.5rem;
  border: 1px solid #E0E0E0;
}

.smaluna_appt__week-nav-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  color: #333;
  font-size: 13px;
  font-family: inherit;
  transition: background 0.15s;
  padding: 0;
}

.smaluna_appt__week-nav-btn:hover:not(:disabled) {
  background: #f5f5f5;
}

.smaluna_appt__week-nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.smaluna_appt__week-nav-btn svg {
  flex-shrink: 0;
}

.smaluna_appt__week-nav-text {
  font-size: 12px;
  line-height: 170%;
  letter-spacing: 0.02em;
  margin: 0;
  color: #BDBDBD;
}

.smaluna_appt__week-nav-text.exist {
  color: #5064EB;
}

/* ===== カレンダーラッパー ===== */
.smaluna_appt__cal-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== カレンダーテーブル ===== */
.smaluna_appt__cal-table {
  width: 100%;
  min-width: 260px;
  border-collapse: collapse;
  table-layout: fixed;
}

/* ヘッダー: 年月行 */
.smaluna_appt__th-empty-wide {
  background: #F2F2F2;
  border-top-width: 0px;
  border-left-width: 1px;
  border-right-width: 1px;
  border-bottom-width: 1px;
  border-color: #E0E0E0;
  border-style: solid;
}

.smaluna_appt__th-month {
  background: #fff;
  padding: 0.25rem 0.5rem;
  text-align: start;
  border-color: #E0E0E0;
  border-style: solid;
  border-width: 0px 1px 1px 0px;
}

.smaluna_appt__th-month-text {
  font-size: 11px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #6F6D6C;
  font-weight: 500;
  margin: 0;
}

.smaluna_appt__th-date {
  text-align: center;
  padding: 4px 2px 6px;
  background: #fff;
  border-style: solid;
  border-color: #E0E0E0;
  border-width: 0px 1px 1px 0px;
}

.smaluna_appt__date-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.smaluna_appt__date-day {
  font-size: 12px;
  line-height: 140%;
  letter-spacing: 0.02em;
  font-weight: 700;
  color: #4A5568;
}

.smaluna_appt__date-weekday {
  font-size: 11px;
  line-height: 140%;
  letter-spacing: 0.02em;
  font-weight: 700;
  color: #4A5568;
}

.smaluna_appt__date-day--sat { color: #4a90d9; }
.smaluna_appt__date-weekday--sat { color: #4a90d9; }
.smaluna_appt__date-day--sun { color: #e05252; }
.smaluna_appt__date-weekday--sun { color: #e05252; }

/* 時間ラベル列 */
.smaluna_appt__td-time {
  background-color: #96A2F3;
  text-align: center;
  vertical-align: middle;
  line-height: 170%;
  letter-spacing: 0.02em;
  padding: 3px 4px;
  font-size: 12px;
  color: #FFFFFF;
  border-color: #E0E0E0;
  border-width: 0px 1px 1px;
  border-style: solid;
}

.smaluna_appt__td-time--first {
  font-weight: 700;
}

/* スロットセル */
.smaluna_appt__td-slot {
  padding: 3px 3px;
  text-align: center;
  vertical-align: middle;
  border-color: #E0E0E0;
  border-width: 0px 1px 1px 0px;
  border-style: solid;
}

.smaluna_appt__td-slot--circle { background-color: #FFFFFF; }
.smaluna_appt__td-slot--triangle { background-color: #FFFFFF; }
.smaluna_appt__td-slot--dash { background-color: #F2F2F2; opacity: 0.4; }
.smaluna_appt__td-slot--cross { background-color: #F2F2F2; opacity: 0.4; }

/* スロットボタン共通 */
.smaluna_appt__slot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 36px;
  height: 36px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: transparent;
  transition: background 0.15s;
  text-decoration: none;
}

/* 空きなしスロット */
.smaluna_appt__slot-btn--empty {
  background: transparent;
  cursor: default;
}

/* ===== 時間帯ナビゲーション行 ===== */
.smaluna_appt__time-nav-row {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-top: none;
}

.smaluna_appt__time-nav-row--top {
  border-top: 1px solid #E0E0E0;
}

.smaluna_appt__time-nav-cell--label {
  flex-shrink: 0;
  width: 36px;
  background: #F2F2F2;
  align-self: stretch;
  border-right: 1px solid #E0E0E0;
}

.smaluna_appt__time-nav-cell--link {
  flex: 1;
  text-align: center;
  padding: 6px 0;
}

.smaluna_appt__time-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #5064EB;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}
.smaluna_appt__time-nav-link svg {
  flex-shrink: 0;
  display: block;
}

.smaluna_appt__time-nav-link:disabled,
.smaluna_appt__time-nav-link[hidden] {
  visibility: hidden;
}
