/* inc/unkou/unkou_schedule.css（全文完全差し替え） */

/* =========================================================
   ベース
========================================================= */
.unkou-wrap { width: 100%; }
.unkou-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 10px 0; }
.unkou-date { margin:0; font-size:20px; font-weight:800; letter-spacing:.02em; }
.unkou-nav { display:flex; gap:8px; flex-wrap:wrap; }
.unkou-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border:1px solid #ccc;
  background:#fff;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  border-radius:2px;
  cursor:pointer;
}
.unkou-btn[aria-disabled="true"] { opacity:.45; pointer-events:none; }

.unkou-table-wrap { width:100%; overflow-x:auto; border:1px solid #e6e6e6; }
.unkou-table { width:100%; border-collapse:collapse; min-width:980px; }
.unkou-table th,
.unkou-table td {
  border:1px solid #ddd;
  padding:6px;
  text-align:center;
  vertical-align:top;
  white-space:nowrap;
}
.unkou-th-time,
.unkou-td-time {
  width:78px;
  font-weight:800;
  background:#fafafa;
}
.unkou-th-group { font-weight:900; background:#f5f5f5; }
.unkou-th-col { font-weight:800; background:#fff; }
.unkou-cell { width:140px; padding:6px; }

.unkou-slot {
  width:100%;
  min-height:120px;
  border:1px solid #d8d8d8;
  background:#fff;
  text-align:left;
  padding:6px;
  cursor:default; /* ★枠クリックしない */
}
.unkou-slot:hover { border-color:#d8d8d8; }

.unkou-foot {
  margin-top:12px;
  display:flex;
  justify-content:flex-start;
}
.unkou-save {
  padding:10px 14px;
  border:1px solid rgba(0,0,0,.12);
  background:#96c11f;
  color:#fff;
  font-weight:800;
  border-radius:2px;
  cursor:pointer;
}
.unkou-save:hover { opacity:.92; }
.unkou-save:focus {
  outline:none;
  box-shadow:0 0 0 3px rgba(150,193,31,.25);
}

@media (max-width:768px) {
  .unkou-date { font-size:18px; }
  .unkou-btn { font-size:12px; padding:6px 9px; }
  .unkou-table { min-width:920px; }
}

/* =========================================================
   メインカラーUI
========================================================= */
:root{
  --oh-main: #96c11f;
  --oh-main-border: rgba(0,0,0,.12);

  --oh-pickup-top: #68d496;
  --oh-pickup-sub: #cae6d6;

  --oh-dropoff-top: #dce359;
  --oh-dropoff-sub: #f1f7cb;
}

.unkou-datebox{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.unkou-date-main{
  display:inline-block;
  padding:12px 18px;
  background: var(--oh-main);
  color:#fff;
  font-weight:800;
  font-size:26px;
  line-height:1.25;
  border:1px solid var(--oh-main-border);
  border-radius:2px;
}
.unkou-date-sub{ font-size:14px; font-weight:700; color:#333; }

.unkou-date{
  padding:10px 14px;
  background: var(--oh-main);
  color:#fff;
  border:1px solid var(--oh-main-border);
  border-radius:2px;
}

.unkou-btn.unkou-btn--ghost,
.unkou-btn.unkou-btn--main,
.unkou-btn.unkou-btn--pdf{
  background: var(--oh-main);
  color:#fff !important;
  border-color: rgba(0,0,0,.10);
}
.unkou-btn.unkou-btn--ghost:hover,
.unkou-btn.unkou-btn--main:hover,
.unkou-btn.unkou-btn--pdf:hover{
  opacity:.92;
}
.unkou-btn.unkou-btn--ghost:focus,
.unkou-btn.unkou-btn--main:focus,
.unkou-btn.unkou-btn--pdf:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(150,193,31,.25);
}

/* =========================================================
   テーブル見出し
========================================================= */
.unkou-table thead tr:first-child th{
  border-color: rgba(0,0,0,.10);
}

.unkou-table thead tr:first-child th.unkou-th-group:first-of-type{
  background: var(--oh-pickup-top);
  color:#222;
}

.unkou-table thead tr:first-child th.unkou-th-group:last-of-type{
  background: var(--oh-dropoff-top);
  color:#222;
}

.unkou-table thead tr:nth-child(2) th{
  border-color: rgba(0,0,0,.10);
  color:#222;
}

.unkou-table thead tr:nth-child(2) th.unkou-th-time:first-of-type{
  background: var(--oh-pickup-sub);
}

.unkou-table thead tr:nth-child(2) th[data-type="pickup"]{
  background: var(--oh-pickup-sub);
}

.unkou-table thead tr:nth-child(2) th.unkou-th-time:last-of-type{
  background: var(--oh-dropoff-sub);
}

.unkou-table thead tr:nth-child(2) th[data-type="dropoff"]{
  background: var(--oh-dropoff-sub);
}

.unkou-table thead tr:nth-child(2) th:nth-child(1){
  background: var(--oh-pickup-sub) !important;
  color:#222 !important;
}

.unkou-table thead tr:nth-child(2) th:nth-child(7){
  background: var(--oh-dropoff-sub) !important;
  color:#222 !important;
}

/* =========================================================
   枠内：アクション
========================================================= */
.unkou-slot__times{
  display:none;
  font-size:11px;
  line-height:1.2;
  opacity:.75;
  margin:0 0 6px 0;
  white-space:nowrap;
}

.unkou-slot__items{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:0;
  text-align:left;
  min-height:72px;
}

.unkou-slot__actions{
  margin-top:8px;
  display:flex;
  justify-content:flex-start;
}

.unkou-add-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:6px 10px;
  border:1px solid rgba(0,0,0,.10);
  background:#96c11f;
  color:#fff;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
  border-radius:2px;
  cursor:pointer;
}
.unkou-add-btn:hover{ opacity:.92; }
.unkou-add-btn:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(150,193,31,.22);
}

/* =========================================================
   セル内表示（児童タグ）
========================================================= */
.unkou-child{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:8px;
  border:1px solid #ddd;
  background:#fafafa;
  padding:6px 28px 6px 8px;
  margin:0 0 6px 0;
  font-weight:400;
  border-radius:2px;
}

.unkou-child__name{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
  line-height:1.25;
  letter-spacing:.01em;
}

.unkou-child__nm{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  font-weight:400;
}

.unkou-child__place{
  font-size:11px;
  opacity:.8;
  font-weight:400;
  line-height:1.2;
  white-space:normal;
  word-break:break-word;
}

.unkou-child__time{
  font-size:11px;
  opacity:.82;
  font-weight:400;
  line-height:1.25;
  white-space:normal;
  word-break:break-word;
  margin-top:2px;
}

.unkou-child__remove{
  position:absolute;
  top:6px;
  right:6px;
  width:22px;
  height:22px;
  line-height:20px;
  padding:0;
  border:1px solid #ccc;
  background:#fff;
  font-weight:400;
  font-size:16px;
  text-align:center;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:2px;
}
.unkou-child__remove:hover{
  background:#f7f7f7;
}

/* =========================================================
   モーダル
========================================================= */
.unkou-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:999999;
}
.unkou-modal[aria-hidden="false"]{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px 12px;
}

.unkou-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.45);
}

.unkou-modal__panel{
  position:relative;
  max-width:720px;
  width:calc(100% - 24px);
  margin:0;
  background:#fff;
  border:1px solid #ddd;
  max-height:calc(100vh - 48px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

.unkou-modal__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-bottom:1px solid #eee;
}
.unkou-modal__title{ font-weight:900; }
.unkou-modal__close{
  width:34px;
  height:34px;
  border:1px solid #ccc;
  background:#fff;
  font-weight:900;
  cursor:pointer;
  border-radius:2px;
}
.unkou-modal__close:hover{ background:#f7f7f7; }

.unkou-modal__body{ padding:12px; }

.unkou-modal__meta{
  margin:0 0 12px 0;
  padding:10px 12px;
  background: var(--oh-main);
  color:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:2px;
  font-weight:800;
  line-height:1.3;
}

.unkou-modal__places{
  border:1px solid #eee;
  padding:10px;
  margin:0 0 10px 0;
}
.unkou-place-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 8px 0;
}
.unkou-place-row:last-child{
  margin-bottom:0;
}
.unkou-place-label{
  width:110px;
  font-weight:800;
}
.unkou-place-input{
  flex:1;
  border:1px solid #ddd;
  padding:8px 10px;
  background:#f5f5f5;
  border-radius:2px;
}
.unkou-place-note{
  font-size:12px;
  opacity:.75;
}

.unkou-modal__list{
  border-top:1px solid #eee;
  padding-top:10px;
}

.unkou-modal__item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:10px 8px;
  border-bottom:1px solid #f0f0f0;
}

.unkou-modal__item-main{
  flex:1;
  min-width:0;
}

.unkou-modal__item .name{
  font-weight:400;
  font-size:13px;
}

.unkou-modal__item .sub{
  font-size:12px;
  opacity:.75;
  white-space:normal;
  word-break:break-word;
  margin-top:2px;
}

/* =========================================================
   モーダル：児童ごとの時間入力欄
========================================================= */
.unkou-modal__time-inputs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:8px;
}

.unkou-modal__time-row{
  display:flex;
  align-items:center;
  gap:6px;
}

.unkou-modal__time-label{
  font-size:12px;
  font-weight:700;
  opacity:.8;
  white-space:nowrap;
}

.unkou-modal__time-row input[type="time"]{
  width:120px;
  border:1px solid #ddd;
  padding:7px 8px;
  background:#fff;
  border-radius:2px;
  font-size:13px;
}

/* =========================================================
   モーダル：ボタン類
========================================================= */
.unkou-modal__item-actions{
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  flex-shrink:0;
}

.unkou-modal__action-btn{
  border:1px solid rgba(0,0,0,.10);
  background:#96c11f;
  color:#fff;
  padding:7px 10px;
  font-weight:800;
  cursor:pointer;
  border-radius:2px;
  line-height:1.2;
  min-height:34px;
}
.unkou-modal__action-btn:hover{
  opacity:.92;
}
.unkou-modal__action-btn:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(150,193,31,.22);
}

.unkou-modal__foot{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:10px 12px;
  border-top:1px solid #eee;
}

/* =========================================================
   旧クラス残し（互換）
========================================================= */
.unkou-slot__child{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  border:1px solid #e8e8e8;
  background:#fafafa;
  padding:6px 8px;
  border-radius:2px;
}
.unkou-slot__child .name{
  font-weight:400;
  font-size:13px;
  line-height:1.25;
  letter-spacing:.01em;
}
.unkou-slot__child .place{
  font-size:11px;
  opacity:.8;
  line-height:1.2;
  margin-top:2px;
  white-space:normal;
  word-break:break-word;
}

/* =========================================================
   メッセージ
========================================================= */
.unkou-message{
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.12);
  border-left: 6px solid #96c11f;
  background: #f3fbdf;
  color: #1f2a12;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.4;
  border-radius: 2px;
}

.unkou-message--success{
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}

/* =========================================================
   スマホ調整
========================================================= */
@media (max-width:768px){
  .unkou-date-main{
    font-size:20px;
    padding:10px 14px;
  }

  .unkou-modal__item{
    flex-direction:column;
    align-items:stretch;
  }

  .unkou-modal__item-actions{
    justify-content:flex-end;
  }

  .unkou-modal__time-inputs{
    flex-direction:column;
    gap:8px;
  }

  .unkou-modal__time-row input[type="time"]{
    width:100%;
    max-width:180px;
  }

  .unkou-place-row{
    flex-direction:column;
    align-items:stretch;
  }

  .unkou-place-label{
    width:auto;
  }

  .unkou-slot__actions{
    justify-content:flex-start;
  }

  .unkou-add-btn{
    width:100%;
  }

  .unkou-modal__action-btn{
    width:100%;
    justify-content:center;
  }
}