/*
 * オアシス ツイキャス配信カレンダー（お客様向け）
 * テーマのデザインとぶつからないよう、すべて .oasis の中だけに効かせています。
 * 色は管理画面「オアシス → 設定」のテーマカラー（--oa-accent）で変わります。
 */
.oasis {
  --oa-accent: #1f8a7a;
  --oa-accent-soft: #d9efea;
  --oa-accent-ink: #fff;
  --oa-surface: #fff;
  --oa-surface-2: #f1f4f3;
  --oa-text: #1f2a28;
  --oa-muted: #62716d;
  --oa-line: #dde5e2;
  --oa-warn: #c2562f;
  --oa-radius: 14px;
  --oa-shadow: 0 1px 2px rgba(20, 40, 35, .06), 0 6px 20px rgba(20, 40, 35, .06);
  color: var(--oa-text);
  line-height: 1.7;
  text-align: left;
}
@supports (color: color-mix(in srgb, red 50%, white)) {
  .oasis { --oa-accent-soft: color-mix(in srgb, var(--oa-accent) 16%, #fff); }
}

/* ---------- テーマの装飾を打ち消す ---------- */
.oasis, .oasis *, .oasis *::before, .oasis *::after { box-sizing: border-box; }
.oasis p { margin: 0; }
.oasis img { max-width: 100%; height: auto; display: block; border: 0; border-radius: 0; box-shadow: none; margin: 0; padding: 0; }
.oasis button {
  font: inherit; cursor: pointer; text-transform: none; letter-spacing: normal; box-shadow: none;
  margin: 0; line-height: 1.5; min-height: 0; width: auto; text-decoration: none; text-shadow: none;
}
.oasis a { box-shadow: none; }
.oasis [hidden] { display: none !important; }
.oasis summary { cursor: pointer; }

/* ---------- 共通部品 ---------- */
.oasis .oa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--oa-line); background: var(--oa-surface); color: var(--oa-text);
  padding: 8px 14px; border-radius: 10px; text-decoration: none; font-size: .9rem; font-weight: 400;
}
.oasis .oa-btn:hover { color: var(--oa-text); }
.oasis .oa-btn.oa-primary { background: var(--oa-accent); border-color: var(--oa-accent); color: var(--oa-accent-ink); }
.oasis .oa-btn.oa-primary:hover { color: var(--oa-accent-ink); filter: brightness(1.05); }
.oasis .oa-btn.oa-big { width: 100%; padding: 13px 18px; font-size: 1rem; font-weight: 700; }
.oasis .oa-btn.oa-small { padding: 6px 12px; font-size: .85rem; }
.oasis .oa-btn.oa-danger { color: var(--oa-warn); border-color: #efc9bb; }
.oasis .oa-btn:disabled { opacity: .55; cursor: default; }

.oasis .oa-empty { text-align: center; color: var(--oa-muted); padding: 40px 0; margin: 0; }
.oasis .oa-notice {
  background: #fff8e6; border: 1px solid #f0dca8; color: #6b5314; border-radius: 10px;
  padding: 10px 14px; font-size: .88rem; margin: 0 0 16px;
}
.oasis .oa-section-title { font-size: 1.15rem; font-weight: 700; margin: 32px 0 12px; }
.oasis .oa-meta { color: var(--oa-muted); font-size: .85rem; }

.oasis .oa-close {
  border: 0; background: var(--oa-surface-2); width: 36px; height: 36px; border-radius: 50%; padding: 0;
  font-size: 1.2rem; line-height: 36px; color: var(--oa-text); flex-shrink: 0; text-align: center;
}

/* サムネ枠（16:9） */
.oasis .oa-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--oa-surface-2); overflow: hidden; }
.oasis .oa-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.oasis .oa-ph {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 12px;
  background: linear-gradient(135deg, var(--oa-accent), #1b4f6a); color: #fff; font-weight: 700;
  text-align: center; font-size: .95rem; line-height: 1.4;
}

/* ---------- モーダル ---------- */
.oasis.oa-modal {
  position: fixed; inset: 0; z-index: 100000; display: none;
  background: rgba(10, 20, 18, .72); padding: 16px; overflow-y: auto;
}
.oasis.oa-modal.oa-open { display: grid; place-items: center; }
.oasis .oa-modal-panel {
  width: min(960px, 100%); background: var(--oa-surface); border-radius: var(--oa-radius); overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.oasis .oa-modal-panel.oa-narrow { width: min(560px, 100%); }
.oasis .oa-modal-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--oa-line); }
.oasis .oa-modal-title { margin: 0; font-size: 1.05rem; font-weight: 700; flex: 1; line-height: 1.4; }
.oasis .oa-modal-body { padding: 14px 16px 18px; display: grid; gap: 14px; }

/* ---------- お客様向けカレンダー ---------- */
.oasis .oa-cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.oasis .oa-month { margin: 0; font-size: 1.3rem; font-weight: 700; min-width: 8em; }
.oasis .oa-cal-nav { display: flex; gap: 6px; }
.oasis .oa-cal-nav button {
  border: 1px solid var(--oa-line); background: var(--oa-surface); color: var(--oa-text);
  border-radius: 10px; padding: 6px 12px; font-size: .95rem;
}
.oasis .oa-updated { color: var(--oa-muted); font-size: .8rem; margin-left: auto; }

.oasis .oa-calendar {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--oa-line); gap: 1px;
  border: 1px solid var(--oa-line); border-radius: var(--oa-radius); overflow: hidden;
}
.oasis .oa-calendar > .oa-empty { grid-column: 1 / -1; background: var(--oa-surface); }
.oasis .oa-dow { background: var(--oa-surface-2); text-align: center; font-size: .8rem; font-weight: 700; padding: 6px 0; color: var(--oa-muted); }
.oasis .oa-dow.oa-sun { color: var(--oa-warn); }
.oasis .oa-dow.oa-sat { color: #2f6fc2; }
.oasis .oa-day {
  background: var(--oa-surface); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 4px;
  text-align: left; border: 0; border-radius: 0; color: inherit; font-size: inherit; cursor: default; overflow: hidden;
}
.oasis .oa-day.oa-has { cursor: pointer; }
.oasis .oa-day.oa-has:hover { background: #f8fcfb; }
.oasis .oa-day.oa-other { background: #fafbfb; }
.oasis .oa-day.oa-other .oa-num { opacity: .4; }
.oasis .oa-num { font-size: .82rem; font-weight: 700; }
.oasis .oa-day.oa-sun .oa-num { color: var(--oa-warn); }
.oasis .oa-day.oa-sat .oa-num { color: #2f6fc2; }
.oasis .oa-day.oa-today .oa-num { background: var(--oa-accent); color: #fff; border-radius: 999px; padding: 0 7px; align-self: flex-start; }
.oasis .oa-ev {
  display: flex; gap: 6px; align-items: center; background: var(--oa-accent-soft); border-radius: 8px;
  padding: 3px; font-size: .74rem; line-height: 1.3; overflow: hidden;
}
.oasis .oa-ev img, .oasis .oa-ev .oa-mini-ph {
  width: 44px; height: 26px; object-fit: cover; border-radius: 5px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--oa-accent), #1b4f6a);
}
.oasis .oa-ev .oa-t { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-width: 0; }
/* マスが狭いとき（テーマの横幅が狭いとき）はサムネを省いて文字を優先 */
.oasis .oa-day { container-type: inline-size; }
@container (max-width: 150px) {
  .oasis .oa-ev img, .oasis .oa-ev .oa-mini-ph { display: none; }
  .oasis .oa-ev { padding: 3px 5px; }
}
.oasis .oa-ev .oa-time { font-weight: 700; color: var(--oa-accent); margin-right: 3px; }
.oasis .oa-more { font-size: .72rem; color: var(--oa-muted); }
.oasis .oa-dots { display: none; gap: 3px; flex-wrap: wrap; }
.oasis .oa-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--oa-accent); display: block; }

.oasis .oa-upcoming { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.oasis .oa-upcoming > .oa-empty { grid-column: 1 / -1; }
.oasis .oa-ev-card {
  background: var(--oa-surface); border: 1px solid var(--oa-line); border-radius: var(--oa-radius);
  overflow: hidden; box-shadow: var(--oa-shadow); display: flex; flex-direction: column;
}
.oasis .oa-date-badge {
  position: absolute; left: 10px; top: 10px; background: var(--oa-surface); color: var(--oa-text);
  border-radius: 10px; padding: 4px 10px; font-weight: 700; font-size: .85rem; box-shadow: var(--oa-shadow);
}
.oasis .oa-ev-card .oa-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.oasis .oa-ev-card .oa-ev-title { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.45; }
.oasis .oa-ev-card .oa-note { font-size: .85rem; margin: 0; white-space: pre-wrap; }
.oasis .oa-ev-card .oa-btn { align-self: flex-start; margin-top: auto; }

@media (max-width: 720px) {
  .oasis .oa-day { min-height: 60px; padding: 4px; }
  .oasis .oa-day .oa-ev, .oasis .oa-day .oa-more { display: none; }
  .oasis .oa-day .oa-dots { display: flex; }
  .oasis .oa-month { min-width: 0; }
  .oasis .oa-updated { margin-left: 0; width: 100%; }
}

/* ---------- カレンダーへのバナー（ツイキャス一覧ページなどに自動で差し込み） ---------- */
.oasis-banner {
  --oa-accent: #1f3b5c;
  display: flex; align-items: center; gap: 16px; box-sizing: border-box;
  margin: 0 0 22px; padding: 14px 18px; border-radius: 14px; text-decoration: none !important;
  background: var(--oa-accent);
  background: linear-gradient(135deg, var(--oa-accent) 0%, color-mix(in srgb, var(--oa-accent) 55%, #5fb0e8) 100%);
  color: #fff !important; box-shadow: 0 4px 12px rgba(31, 59, 92, .18); transition: transform .15s, box-shadow .15s;
  line-height: 1.4;
}
.oasis-banner:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(31, 59, 92, .24); color: #fff; }
.oasis-banner * { color: inherit; }
.oasis-banner-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.oasis-banner-label { font-size: 11px; letter-spacing: .12em; opacity: .85; }
.oasis-banner-title { font-size: 17px; font-weight: 700; }
.oasis-banner-sub { font-size: 12.5px; opacity: .95; overflow: hidden; text-overflow: ellipsis; }
.oasis-banner-sub strong { background: rgba(255, 255, 255, .22); border-radius: 4px; padding: 0 6px; margin-right: 2px; }
.oasis-banner-count { opacity: .8; }
@media (max-width: 480px) {
  .oasis-banner { gap: 12px; padding: 12px 14px; }
  .oasis-banner-title { font-size: 15.5px; }
  .oasis-banner-sub { white-space: normal; }
}
