/* ================================
    共通
================================ */

.detail-day a {
  text-decoration: none;
  color: #222222;
}

.detail-day a:hover {
  text-decoration: underline;
}

/* ================================
    週カレンダー (Week Calendar)
================================ */
.ubx-week-calendar {
  width: 100%;
}
.ubx-week-calendar__header {
  text-align: center;
}

.ubx-week-calendar__header .year-month {
  display: flex;
  flex-direction: column;
}
.s .ubx-week-calendar__header .year-month {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.ubx-week-calendar__header .year {
  font-size: 12px;
  color: #333333;
}
.s .ubx-week-calendar__header .year {
  font-size: 10px;
}

.ubx-week-calendar__header .month {
  font-size: 22px;
  font-weight: bold;
  color: #333333;
  width: 55px;
}
.s .ubx-week-calendar__header .month {
  font-size: 1.188rem; /* 19px (基準16px) */
  width: auto;
}

/* 丸い矢印を表示するためのスタイル */
.ubx-week-calendar__header .nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: #333;
  font-size: 20px;
}
.s .ubx-week-calendar__header .nav {
  font-size: 14px;
}

.ubx-week-calendar__header .nav.next::after {
  content: "\203A";
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #013274;
  color: #fff;
  align-items: end;
  justify-content: center;
  margin-left: 6px;
  font-size: 25px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.ubx-week-calendar__header .nav.prev::before {
  content: "\2039";
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #013274;
  color: #fff;
  align-items: end;
  justify-content: center;
  margin-right: 6px;
  font-size: 25px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

/* ヘッダー中央の年・月を縦並びにする */
.ubx-week-calendar__header .title-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ubx-week-calendar__header .title-year {
  font-size: 16px;
  color: #333;
}
.s .ubx-week-calendar__header .title-year {
  font-size: 12px;
}

.ubx-week-calendar__header .title-month {
  font-size: 32px;
  font-weight: 500;
  color: #333;
  line-height: 1;
  margin-top: 2px;
}
.s .ubx-week-calendar__header .title-month {
  font-size: 20px;
}

.ubx-week-calendar_flex {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 28px 20px 0 60px;
}

.ubx-week-calendar__grid {
  display: block;
  background-color: #fff;
  border-radius: 16px;
  /* padding: 10px 12px 16px 12px; */
}

.ubx-week-calendar .calendar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 24px 10px 24px;
}
.s .ubx-week-calendar .calendar {
  flex-direction: column;
  padding: 10px 14px 16px 14px;
  gap: 8px;
}
.s .c-modal .ubx-week-calendar .calendar {
  padding: 0px;
}
.ubx-week-calendar .detail img {
  width: 100%;
}

.ubx-week-calendar .calendar-days {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}
.s .ubx-week-calendar .calendar-days {
  gap: 4px;
}
.ubx-week-calendar .calendar-day {
  text-align: center;
  padding: 2px 24px 10px 24px;
  border-radius: 8px;
  cursor: default;
  position: relative;
  color: #333333;
  font-weight: 700;
}
.s .ubx-week-calendar .calendar-day {
  width: 100%;
  padding: 8px 6px 12px;
}
/* 日曜・祝日を赤色に */
.ubx-week-calendar .calendar-day.sunday-holiday {
  background-color: #fff9f9;
}
.ubx-week-calendar .calendar-day.sunday-holiday .weekday {
  color: #df060a;
}

.ubx-week-calendar .calendar-day.sunday-holiday .date {
  color: #df060a;
}

/* 土曜を青色に */
.ubx-week-calendar .calendar-day.saturday {
  background-color: #f0faff;
}
.ubx-week-calendar .calendar-day.saturday .weekday {
  color: #0c72be;
}

.ubx-week-calendar .calendar-day.saturday .date {
  color: #0c72be;
}
.s .ubx-week-calendar .calendar .date {
  font-size: 16px;
}

/* イベントがない日のスタイル */
.ubx-week-calendar .calendar-day.no-events {
  background: #fff;
  outline: 1.5px dashed #ccc;
  outline-offset: -2px;
}

.ubx-week-calendar .calendar-day.has-events {
  background: white;
  cursor: pointer;
  outline: 1.5px dashed #ccc;
  outline-offset: -1px;
}

/* イベントがある日の下部に青いインジケーター */
.ubx-week-calendar .calendar-day.has-events::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: #0c72be;
  border-radius: 0 0 6px 6px;
}

.ubx-week-calendar .calendar-day.has-events:hover {
  background: #f9fafb;
}
.ubx-week-calendar .calendar-day.has-events:focus-visible {
  outline: 3px solid #0058c0;
  outline-offset: -3px;
}

.ubx-week-calendar .calendar-day.selected {
  background: white;
  color: inherit;
  border: 2px solid #0c72be;
  outline: none;
}

/* 当日以前の日付をグレー表示 */
.ubx-week-calendar .calendar-day.past {
  background: #efefef;
  opacity: 0.7;
}

/* .calendar-day.past .weekday,
.calendar-day.past .date {
  color: #d1d5db;
} */

.ubx-week-calendar .calendar-day.past.has-events {
  background: #fafafa;
  border: 2px dashed #e5e7eb;
}

.ubx-week-calendar .calendar-day.past.has-events::after {
  background: #d1d5db;
}

.ubx-week-calendar .day-header {
  display: flex;
  flex-direction: column;
}

.ubx-week-calendar .calendar-day .weekday {
  font-size: 12px;
}

.ubx-week-calendar .calendar-day .date {
  font-size: 18px;
}
/* ================================
    下：詳細パネル
================================ */

.s .ubx-week-calendar .detail-day {
  padding: 4px 14px 2px;
}
.ubx-week-calendar .detail-day ul {
  list-style: none;
}
.ubx-week-calendar .detail-day ul li {
  padding: 8px 14px;
}
.s .ubx-week-calendar .detail-day ul li {
  padding: 10px 0;
}

.ubx-week-calendar .detail-day ul li:first-child {
  padding: 0px 14px 8px;
}

.s .ubx-week-calendar .detail-day ul li:first-child {
  padding: 0px 0px 10px;
}

.ubx-week-calendar .detail-day ul li:not(:last-child) {
  border-bottom: 2px dotted #e5e5e5;
}
.s .ubx-week-calendar .detail-day ul li:last-child {
  padding-bottom: 12px;
}

.ubx-week-calendar .detail-day .content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ubx-week-calendar .detail-day .event-thumb {
  flex-shrink: 0;
  width: 182px;
  height: 257px;
  overflow: hidden;
}
.ubx-week-calendar .detail-day .event-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 35px;
  overflow: hidden;
}

.ubx-week-calendar .detail-day .event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ubx-week-calendar .detail-day .event-title {
  flex: 1;
  font-size: 14px;
  color: #222222;
}

/* ================================
    月カレンダー (Month Calendar)
================================ */
.ubx-month-calendar {
  margin-bottom: 24px;
}
.s .ubx-month-calendar {
  margin-bottom: 14px;
}
.ubx-month-calendar__header {
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.ubx-month-calendar__header .nav {
  font-size: 14px;
  text-decoration: none;
}

/* 丸い矢印を表示するためのスタイル */
.ubx-month-calendar__header .nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
  font-size: 20px;
}
.s .ubx-month-calendar__header .nav {
  font-size: 14px;
}
.ubx-month-calendar__header .nav.next::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 34px;
  background: url(../../../themes/yokohama_bosai_platform/assets/common/img/calendar-arrowRight.svg)
    no-repeat center;
  background-size: 100% 100%;
}

.ubx-month-calendar__header .nav.prev::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 34px;
  background: url(../../../themes/yokohama_bosai_platform/assets/common/img/calendar-arrowLeft.svg)
    no-repeat center;
  background-size: 100% 100%;
}
.ubx-month-calendar__header .nav:focus-visible {
  outline: 3px solid #0058c0;
  outline-offset: 4px;
  border-radius: 999px;
}

.ubx-month-calendar .calendar td.has-events:focus-visible {
  outline: 3px solid #0058c0;
  outline-offset: -3px;
}
.s .ubx-month-calendar__header .nav.prev::before,
.s .ubx-month-calendar__header .nav.next::after {
  width: 40px;
  height: 40px;
}

/* ヘッダー中央の年・月を縦並びにする */
.ubx-month-calendar__header .title-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ubx-month-calendar__header .title-left {
  display: inline-flex;
  font-size: 20px;
  align-items: center;
  gap: 8px;
}
.ubx-month-calendar__header .title-right {
  display: inline-flex;
  font-size: 20px;
  align-items: center;
  gap: 8px;
}
.s .ubx-month-calendar__header .title-left,
.s .ubx-month-calendar__header .title-right {
  font-size: 14px;
  gap: 4px;
}
.ubx-month-calendar__header .title-year {
  font-size: 16px;
  color: #333;
}
.s .ubx-month-calendar__header .title-year {
  font-size: 12px;
}

.ubx-month-calendar__header .title-month {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  line-height: 1;
  margin-top: 2px;
}
.s .ubx-month-calendar__header .title-month {
  font-size: 20px;
}

.ubx-month-calendar_flex {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 0 60px;
}

.ubx-month-calendar__grid {
  display: grid;
  grid-template-columns: 1fr 0fr 1fr;
  gap: 16px;
}

.ubx-month-calendar .calendar table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
}

.ubx-month-calendar .calendar th,
.ubx-month-calendar .calendar td {
  border: 1px dashed #ccc;
  text-align: center;
  height: 75px;
  border-radius: 6px;
}
.s .ubx-month-calendar .calendar th,
.s .ubx-month-calendar .calendar td {
  height: 40px;
  padding: 8px 6px 10px;
}

/* 各セル内で曜日を上、日付を中央に整列させる */
.ubx-month-calendar .has-events {
  position: relative;
}

/* 前月/次月セルを薄い灰色で表示 */
.ubx-month-calendar .other-month {
  background-color: #fafafa;
}
.ubx-month-calendar .calendar td.other-month .weekday,
.ubx-month-calendar .calendar td.other-month .date {
  color: #ccc;
}
.ubx-month-calendar .calendar .weekday {
  font-size: 14px;
  color: #333;
  line-height: 1;
}
.s .ubx-month-calendar .calendar .weekday {
  font-size: 12px;
}

.ubx-month-calendar .calendar td.holiday .date {
  color: #df060a;
}
.ubx-month-calendar .calendar td.holiday .weekday {
  color: #df060a;
}
.ubx-month-calendar .holiday-label {
  font-size: 12px;
  color: #df060a;
  margin-top: 6px;
}
.ubx-month-calendar .calendar td.has-events {
  cursor: pointer;
}

.ubx-month-calendar .calendar td.selected {
  outline: 3px solid #0c72be !important;
  border: none !important;
  border-radius: 6px;
}

/* 日曜・祝日を赤色に */
.ubx-month-calendar .calendar td.sunday-holiday .date,
.ubx-month-calendar .calendar td.sunday-holiday .weekday {
  color: #df060a;
}
.ubx-month-calendar .calendar td.sunday-holiday {
  background-color: #fff9f9;
}

/* 土曜を青色に */
.ubx-month-calendar .calendar td.saturday .date,
.ubx-month-calendar .calendar td.saturday .weekday {
  color: #0c72be;
}
.ubx-month-calendar .calendar td.saturday {
  background-color: #f0faff;
}

.ubx-month-calendar .calendar .date {
  font-size: 20px;
  color: #333;
  font-weight: 600;
}
.s .ubx-month-calendar .calendar .date {
  font-size: 16px;
}

.ubx-month-calendar .calendar .dots {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  line-height: 0.6;
  font-size: 25px;
  color: #fff;
  border-radius: 0 0 6px 6px;
  background-color: #0c72be;
  outline: 1px solid #0c72be;
}
.s .ubx-month-calendar .calendar .dots {
  line-height: 0.4;
}

/* 間の線 */
.ubx-month-calendar .ubx-calendar-line {
  width: 12.4px;
}

.ubx-month-calendar .detail {
  border-left: 1px solid #eee;
  margin: 20px 32px 0 0;
  padding: 24px;
  background-color: #eef9ff;
  border-radius: 16px;
  height: 475px;
  overflow-y: auto;
}
.s .ubx-month-calendar .detail {
  overflow-y: auto;
  padding: 16px 14px;
  max-height: none;
  overflow: visible;
  height: auto;
  margin: 0;
}
#ubx-month-detail-default {
  font-size: 16px;
}
.s #ubx-month-detail-default {
  font-size: 12px;
}
.ubx-month-calendar .detail h3 {
  font-size: 24px;
  text-align: center;
  font-weight: bold;
}
.s .ubx-month-calendar .detail h3 {
  font-size: 16px;
}

/* 右側 */
.ubx-month-calendar ._title-gradient {
  font-size: 24px;
}
.s .ubx-month-calendar ._title-gradient {
  font-size: 16px;
}
.ubx-month-calendar .detail ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 12px;
}
.s .ubx-month-calendar .detail ul {
  display: flex;
  grid-template-columns: unset;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 12px 0 15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ubx-month-calendar .detail li {
  position: relative;
  width: 100%;
  background-color: #fff;
  border-radius: 14px;
  list-style: none;
  box-shadow: 4px 4px 10px #00648042;
  display: flex;
  flex-direction: column;
}
.s .ubx-month-calendar .detail li {
  flex: 0 0 auto;
  width: 193px;
  height: 86px;
  border-radius: 7px;
}
.ubx-month-calendar .detail li a {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  box-sizing: border-box;
  padding: 24px;
  text-decoration: none;
  color: #222222;
}
.s .ubx-month-calendar .detail li a {
  flex-direction: unset;
  flex: unset;
  padding: 8px;
  gap: 8px;
  align-items: center;
}
/* イベントがない場合の見た目 */
.ubx-month-calendar .no-events-other {
  background-color: transparent !important;
  box-shadow: none !important;
  border: 1px dashed #ccc;
  justify-content: center;
  align-items: center;
  height: 353px;
  color: #666 !important;
  font-size: 16px;
}
.icon-calendar-newWindow,
.icon-calendar-outLink {
  position: absolute;
  width: 12px;
  height: 12px;
  top: 4%;
  right: 4%;
}
.ubx-month-calendar .event-thumb {
  width: 100%;
  height: 257px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.s .ubx-month-calendar .event-thumb {
  width: 50px;
  height: 100%;
  margin-bottom: 0;
}
.ubx-month-calendar .event-title {
  font-size: 16px;
  word-break: break-all;
}
.s .ubx-month-calendar .event-title {
  font-size: 13px;
}

.s .modal-calendar .c-modal_body {
  padding: 10px 12px 0 12px !important;
}

.s.modal-calendar .c-modal_body {
  height: 100% !important;
}
.s .ubx-month-calendar__grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* 区切りラインは非表示 */
.s .ubx-month-calendar .ubx-calendar-line {
  display: none;
}
.s .ubx-month-calendar_flex {
  padding: 0;
}
