/* =========================================================
   OpenCalendarKit – cleaned stylesheet
   ========================================================= */

:root {
  --okit-color-success: #2ecc71;
  --okit-color-danger: #e74c3c;
  --okit-callout-text-on-strong: #ffffff;

  --okit-color-success-soft: #e9f9ee;
  --okit-color-success-border: #bfead0;
  --okit-color-danger-soft: #fdeaea;
  --okit-color-danger-border: #f2c6c6;

  --okit-notice-bg: #f5f5f3;
  --okit-notice-border: #e2e0db;
  --okit-notice-accent: #cfc9bf;
  --okit-notice-text: #2f2f2f;
}

/* =========================================================
   Shared
   ========================================================= */

.bkit-ui-callout,
.bkit-ui-callout *,
.bkit-opening-hours,
.bkit-opening-hours * {
  box-sizing: border-box;
}

.bkit-ui-callout {
  display: block;
  margin: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
  font-family: inherit;
  letter-spacing: normal;
}

.bkit-ui-callout,
.bkit-ui-callout p,
.bkit-ui-callout span,
.bkit-ui-callout strong,
.bkit-ui-callout em,
.bkit-ui-callout a {
  font-family: inherit;
  color: inherit;
}

/* =========================================================
   Status Today
   ========================================================= */

.bkit-status-today {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  margin: 0 0 1.2rem 0;
  text-align: center;
}

.bkit-status-today .bkit-ui-callout {
  display: inline-flex;
  width: auto;
  max-width: 100%;
}

.bkit-ui-callout__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  min-height: 0;
}

.bkit-status-today__indicator {
  display: none;
}

.bkit-status-today__text {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--okit-callout-text-on-strong);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.bkit-ui-callout--status.bkit-ui-callout--open,
.bkit-ui-callout--status.bkit-ui-callout--upcoming {
  background: var(--okit-color-success);
  color: var(--okit-callout-text-on-strong);
}

.bkit-ui-callout--status.bkit-ui-callout--closed,
.bkit-ui-callout--status.bkit-ui-callout--ended {
  background: var(--okit-color-danger);
  color: var(--okit-callout-text-on-strong);
}

/* =========================================================
   Event Notice
   ========================================================= */

.bkit-event-notice {
  display: block;
  width: 100%;
  margin: 0.9rem 0 1.2rem 0;
}

.bkit-ui-callout--notice {
  display: block;
  width: 100%;
  background: var(--okit-notice-bg);
  color: var(--okit-notice-text);
  border: 1px solid var(--okit-notice-border);
  border-left: 4px solid var(--okit-notice-accent);
  border-radius: 10px;
  box-shadow: none;
}

.bkit-event-notice__inner {
  display: block;
  padding: 14px 16px;
  min-height: 0;
}

.bkit-event-notice__body {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
  color: var(--okit-notice-text);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.35;
}

.bkit-event-notice__body p,
.bkit-event-notice__body div,
.bkit-event-notice__body span {
  margin: 0;
  padding: 0;
  color: inherit;
  line-height: inherit;
}

.bkit-event-notice__body p + p {
  margin-top: 0.45rem;
}

.bkit-event-notice__body > :first-child {
  margin-top: 0;
}

.bkit-event-notice__body > :last-child {
  margin-bottom: 0;
}

.bkit-event-notice__body a {
  color: inherit;
  text-decoration: underline;
}

/* =========================================================
   Calendar
   ========================================================= */

.bkit-calendar {
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  max-width: 380px;
  margin: 0 auto;
}

.bkit-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.bkit-cal-head .bkit-cal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.bkit-cal-head .bkit-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #ffffff;
  color: #666;
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.bkit-cal-head .bkit-nav:hover {
  background: #f7f7f7;
  border-color: #bfbfbf;
  color: #222;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .10);
}

.bkit-cal-head .bkit-nav:focus {
  outline: 2px solid rgba(0, 0, 0, .18);
  outline-offset: 2px;
}

.bkit-cal-head .bkit-nav.disabled {
  opacity: .45;
  pointer-events: none;
  box-shadow: none;
}

.bkit-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.bkit-cell {
  text-align: center;
  padding: 8px;
  border-radius: 10px;
  min-height: 40px;
  border: none;
  background: transparent;
}

.bkit-wd {
  font-weight: 700;
  background: #fafafa;
}

.bkit-empty {
  background: transparent;
  border: none;
}

.bkit-cell.day {
  position: relative;
  background: #f8f8f8;
  cursor: default;
}

.bkit-cell.day .num {
  position: relative;
  z-index: 2;
  font-weight: 700;
}

.bkit-cell.day.open {
  background: var(--okit-color-success-soft);
  outline: 1px solid var(--okit-color-success-border);
}

.bkit-cell.day.open.clickable {
  cursor: pointer;
}

.bkit-cell.day.closed {
  background: var(--okit-color-danger-soft);
  outline: 1px solid var(--okit-color-danger-border);
  cursor: pointer;
}

.bkit-cell.day.disabled {
  opacity: .6;
  cursor: not-allowed;
}

.bkit-cell.day.past {
  background: #f2f2f2;
  color: #9aa0a6;
  cursor: not-allowed;
}

.bkit-cell.day.past .num {
  opacity: .8;
}

.bkit-legend {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  justify-content: center;
}

.bkit-legend .legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bkit-legend .legend::before {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 4px;
}

.bkit-legend .legend.open::before {
  background: var(--okit-color-success-soft);
  border: 1px solid var(--okit-color-success-border);
}

.bkit-legend .legend.closed::before {
  background: var(--okit-color-danger-soft);
  border: 1px solid var(--okit-color-danger-border);
}

.bkit-calendar .bkit-cal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  table-layout: fixed;
}

.bkit-calendar .bkit-cal-table th,
.bkit-calendar .bkit-cal-table td {
  padding: 0;
  border: 0;
}

.bkit-calendar .bkit-cal-table .bkit-wd {
  background: #fafafa;
  font-weight: 700;
}

.bkit-calendar .bkit-cal-table .bkit-empty {
  background: transparent;
}

.bkit-calendar .bkit-cal-table button.bkit-cell {
  width: 100%;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px;
  border-radius: 10px;
  border: 0;
  background: #f8f8f8;
  cursor: default;
}

.bkit-calendar .bkit-cal-table button.bkit-cell .num {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  color: #111;
  opacity: 1;
}

.bkit-calendar .bkit-cal-table button.bkit-cell.day.open {
  background: var(--okit-color-success-soft);
  outline: 1px solid var(--okit-color-success-border);
}

.bkit-calendar .bkit-cal-table button.bkit-cell.day.closed {
  background: var(--okit-color-danger-soft);
  outline: 1px solid var(--okit-color-danger-border);
}

.bkit-calendar .bkit-cal-table button.bkit-cell.day.open.clickable {
  cursor: pointer;
}

.bkit-calendar .bkit-cal-table button.bkit-cell.day.disabled {
  opacity: .6;
  cursor: not-allowed;
}

.bkit-calendar.is-loading {
  opacity: .6;
  pointer-events: none;
}

.bkit-calendar .bkit-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.bkit-calendar .bkit-grid > * {
  margin: 0;
}

.bkit-calendar .bkit-grid button.bkit-cell {
  width: auto;
  max-width: none;
  display: block;
}

.bkit-calendar .bkit-grid button.bkit-cell:focus {
  outline: 2px solid rgba(0, 0, 0, .15);
  outline-offset: 2px;
}

/* =========================================================
   Opening Hours
   ========================================================= */

.bkit-opening-hours {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.bkit-opening-hours h3 {
  width: 100%;
  margin: 0 0 0.55rem 0;
  text-align: left;
}

.bkit-opening-hours .bkit-oh-table {
  width: auto;
  margin: 0;
  border-collapse: collapse;
}

.bkit-opening-hours .bkit-oh-table th,
.bkit-opening-hours .bkit-oh-table td {
  padding: 4px 10px 4px 0;
  vertical-align: top;
}

.bkit-opening-hours .bkit-oh-table th.day {
  font-weight: 700;
  white-space: nowrap;
  text-align: left;
}

.bkit-opening-hours .bkit-oh-table td.time.is-closed {
  opacity: .75;
  font-style: italic;
}

.bkit-opening-hours .bkit-oh-table {
  margin-bottom: 0;
}

.bkit-opening-hours .bkit-opening-hours-note {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 10px 0 0 0;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.2;
  color: #555;
  text-align: left;
  vertical-align: top;
}

.bkit-opening-hours .bkit-opening-hours-note p,
.bkit-opening-hours .bkit-opening-hours-note div,
.bkit-opening-hours .bkit-opening-hours-note span {
  margin: 0;
  padding: 0;
  line-height: inherit;
}

.bk-day-idx {
  margin-left: 6px;
  color: #777;
  font-weight: 600;
}

.bkit-wd .bk-wd-idx {
  color: #777;
  font-size: .75em;
}

.bkit-opening-hours ul.bk-oh-grid {
  margin: .5rem 0 0;
}

/* =========================================================
   Admin
   ========================================================= */

.bk-table-hours th,
.bk-table-hours td {
  padding: 6px 10px;
}

.bk-table-hours input[type="text"],
.bk-table-hours input[type="date"],
.bk-table-hours input[type="tel"],
.bk-table-hours input[type="email"],
.bk-table-hours select {
  height: 36px;
  padding: 6px 8px;
  line-height: 24px;
}

/* =========================================================
   Modal
   ========================================================= */

.bkit-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.bkit-modal-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 95%;
  max-width: 520px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

.bkit-modal-box--closed {
  padding-top: 20px;
}

.bkit-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.bkit-closed-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bkit-closed-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}

.bkit-closed-date,
.bkit-closed-reason {
  margin: 0;
}

.bkit-modal-actions {
  margin-top: 8px;
}

.bkit-feedback {
  margin-top: 10px;
  font-weight: 600;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 768px) {
  .bkit-status-today {
    justify-content: center;
    text-align: center;
  }

  .bkit-status-today .bkit-ui-callout {
    display: inline-flex;
    width: auto;
    max-width: calc(100% - 32px);
  }

  .bkit-ui-callout__inner {
    padding: 10px 16px;
    min-height: 0;
  }

  .bkit-status-today__text {
    font-size: 0.95rem;
    line-height: 1.15;
  }

  .bkit-event-notice__inner {
    padding: 12px 14px;
  }

  .bkit-event-notice__body {
    font-size: 1rem;
    line-height: 1.3;
  }

  .bkit-opening-hours {
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .bkit-opening-hours .bkit-opening-hours-note {
    margin: 8px 0 0 0;
    padding: 0;
    font-size: 0.82rem;
    line-height: 1.15;
  }
}