/* Quick Access Market & Bank Holiday Calendar Modal (Calendar + Next 4 Upcoming Holidays) */
#mf-holiday-modal-dialog {
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(183, 155, 97, 0.44);
  border-top: 2px solid #C4A066;
  border-radius: 20px;
  background-color: #FAF8F3;
  background-image:
    radial-gradient(85% 65% at 100% 0%, rgba(196, 160, 102, 0.14), transparent 62%),
    linear-gradient(180deg, #FDFCF9 0%, #F6F1E6 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: #0F2F24;
  font-family: var(--font-sans, "Manrope", system-ui, sans-serif);
  box-shadow: 0 32px 84px -24px rgba(10, 28, 22, 0.36);
}
#mf-holiday-modal-dialog:modal {
  overscroll-behavior: contain;
}
#mf-holiday-modal-dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(10, 26, 20, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: no-preference) {
  #mf-holiday-modal-dialog {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition:
      opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
      overlay 0.24s allow-discrete,
      display 0.24s allow-discrete;
  }
  #mf-holiday-modal-dialog[open] {
    opacity: 1;
    transform: translateY(0) scale(1);
    @starting-style {
      opacity: 0;
      transform: translateY(10px) scale(0.98);
    }
  }
  #mf-holiday-modal-dialog::backdrop {
    opacity: 0;
    transition:
      opacity 0.24s ease,
      overlay 0.24s allow-discrete,
      display 0.24s allow-discrete;
  }
  #mf-holiday-modal-dialog[open]::backdrop {
    opacity: 1;
    @starting-style { opacity: 0; }
  }
}

.mf-hmodal-wrap {
  padding: clamp(20px, 2.8vw, 28px);
  display: grid;
  gap: 18px;
}
.mf-hmodal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.mf-hmodal-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #684C19;
}
.mf-hmodal-title {
  margin: 0;
  font-family: var(--font-display, "Literata", Georgia, serif);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.15;
  color: #0F2F24;
}
.mf-hmodal-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(16, 63, 48, 0.16);
  background: #FFFFFF;
  color: #103F30;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.mf-hmodal-close:hover {
  background: #F4EFE3;
  border-color: #B79B61;
}

.mf-hmodal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(250px, 0.88fr);
  gap: 18px;
  align-items: start;
}
.mf-hmodal-cal {
  background: #FFFFFF;
  border: 1px solid rgba(176, 138, 68, 0.36);
  border-radius: 16px;
  overflow: hidden;
}
.mf-hmodal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #FCF7EA 0%, #F4E7C8 100%);
  border-bottom: 1px solid rgba(176, 138, 68, 0.3);
}
.mf-hmodal-month {
  margin: 0;
  font-family: var(--font-display, "Literata", Georgia, serif);
  font-size: 19px;
  font-weight: 600;
  color: #0F2F24;
}
.mf-hmodal-ctrls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mf-hmod-btn,
.mf-hmod-sel {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(16, 63, 48, 0.24);
  background: #FFFDF8;
  color: #0F2F24;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.mf-hmod-btn:hover,
.mf-hmod-sel:hover {
  background: #FFFFFF;
  border-color: #9F7A34;
}
.mf-hmod-btn--today {
  background: #103F30;
  border-color: #103F30;
  color: #FAF8F2;
}
.mf-hmod-btn--today:hover {
  background: #0B2D22;
  color: #FFFFFF;
}

.mf-hmodal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 16px;
  background: #FAF8F2;
  border-bottom: 1px solid rgba(16, 63, 48, 0.08);
  font-size: 11.5px;
  font-weight: 600;
  color: #384B41;
}
.mf-hmod-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mf-hmod-chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(16, 63, 48, 0.28);
}
.mf-hmod-chip--today::before { background: #103F30; border-color: #C4A066; }
.mf-hmod-chip--hol::before { background: #E9CF94; border-color: #9F7A34; }
.mf-hmod-chip--sat::before { background: #EDE6D4; border-color: #9F7A34; }

.mf-hmodal-wdays,
.mf-hmodal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.mf-hmodal-wdays {
  background: #0F2F24;
  color: #FAF8F2;
}
.mf-hmodal-wdays span {
  padding: 8px 4px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mf-hmodal-grid {
  background: #E7E1D2;
  gap: 1px;
}
.mf-hmod-pad {
  background: #F7F4EC;
  min-height: 48px;
}
.mf-hmod-day {
  min-height: 48px;
  padding: 6px;
  border: 0;
  background: #FFFFFF;
  color: #0F2F24;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: inherit;
  cursor: pointer;
  position: relative;
}
.mf-hmod-day:hover { background: #FFFDF7; box-shadow: inset 0 0 0 1px #C4A066; }
.mf-hmod-day.is-wknd { background: #F7F5EE; }
.mf-hmod-day.is-rbi-sat { background: #F5EEDF; }
.mf-hmod-day.is-holiday { background: #F8EAC9; font-weight: 700; }
.mf-hmod-day.is-muhurat { background: #F0D58F; font-weight: 700; }
.mf-hmod-day.is-today { box-shadow: inset 0 0 0 2px #C4A066; }
.mf-hmod-day.is-selected { box-shadow: inset 0 0 0 2.5px #103F30; z-index: 1; }
.mf-hmod-num {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.mf-hmod-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #8F6A24;
}
.mf-hmod-day.is-today .mf-hmod-dot { background: #103F30; }

.mf-hmodal-insp {
  padding: 13px 16px;
  background: #FAF8F3;
  border-top: 1px solid rgba(16, 63, 48, 0.1);
  display: grid;
  gap: 4px;
}
.mf-hmodal-insp-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.mf-hmodal-insp-date {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F2F24;
}
.mf-hmodal-insp-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #FAF3E2;
  border: 1px solid rgba(176, 138, 68, 0.4);
  color: #684C19;
}
.mf-hmodal-insp-copy {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #384B41;
}

.mf-hmodal-side {
  display: grid;
  gap: 14px;
  align-content: start;
}
.mf-hmodal-upcoming {
  background: #FFFFFF;
  border: 1px solid rgba(176, 138, 68, 0.36);
  border-top: 2px solid #C4A066;
  border-radius: 16px;
  padding: 18px;
  display: grid;
  gap: 12px;
}
.mf-hmodal-up-head {
  display: grid;
  gap: 2px;
}
.mf-hmodal-up-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #684C19;
}
.mf-hmodal-up-title {
  margin: 0;
  font-family: var(--font-display, "Literata", Georgia, serif);
  font-size: 20px;
  font-weight: 500;
  color: #0F2F24;
}
.mf-hmodal-up-list {
  display: grid;
  gap: 9px;
}
.mf-hmodal-up-item {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(16, 63, 48, 0.12);
  background: #FAF8F2;
  color: #0F2F24;
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.mf-hmodal-up-item:hover {
  background: #FFFDF8;
  border-color: #B08A44;
}
.mf-hmodal-up-item.is-active {
  background: #FFFDF8;
  border-color: #103F30;
  box-shadow: inset 3px 0 0 #C4A066;
}
.mf-hmodal-datepill {
  flex: 0 0 50px;
  padding: 6px 4px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid rgba(176, 138, 68, 0.42);
  text-align: center;
  display: grid;
  gap: 1px;
}
.mf-hmodal-datepill strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  color: #0F2F24;
}
.mf-hmodal-datepill span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #684C19;
}
.mf-hmodal-up-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.mf-hmodal-up-name {
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.3;
  color: #0F2F24;
}
.mf-hmodal-up-meta {
  font-size: 11.5px;
  line-height: 1.35;
  color: #42594E;
}
.mf-hmodal-fullcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(176, 138, 68, 0.48);
  border-top: 2px solid #C4A066;
  background: linear-gradient(145deg, #FFFDF7 0%, #F6E9CA 100%);
  color: #0F2F24;
  text-decoration: none;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}
.mf-hmodal-fullcard:hover {
  border-color: #9F7A34;
  box-shadow: 0 14px 28px -18px rgba(16, 63, 48, 0.28);
  transform: translateY(-2px);
}
.mf-hmodal-fullcard-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.mf-hmodal-fullcard-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #684C19;
}
.mf-hmodal-fullcard-title {
  font-family: var(--font-display, "Literata", Georgia, serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  color: #0F2F24;
}
.mf-hmodal-fullcard-sub {
  font-size: 12px;
  line-height: 1.45;
  color: #364A40;
}
.mf-hmodal-fullcard-arrow {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #103F30;
  color: #FAF8F2;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.mf-hmodal-fullcard:hover .mf-hmodal-fullcard-arrow {
  background: #0B2D22;
  transform: translate(1px, -1px);
}
#mf-holiday-modal-dialog :is(button, select, a):focus-visible {
  outline: 2px solid #103F30;
  outline-offset: 2px;
}
@media (max-width: 820px) {
  .mf-hmodal-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #mf-holiday-modal-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 90dvh;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }
  .mf-hmodal-wrap {
    padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
    gap: 12px;
  }
  .mf-hmodal-wrap::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: rgba(176, 138, 68, 0.44);
    margin: -4px auto 2px;
  }
  .mf-hmodal-title { font-size: 21px; }
  .mf-hmodal-close { flex: 0 0 40px; width: 40px; height: 40px; }
  .mf-hmodal-nav { padding: 11px 12px; gap: 8px; }
  .mf-hmodal-month { font-size: 17px; }
  .mf-hmodal-legend { padding: 8px 12px; gap: 6px 10px; font-size: 11px; }
  .mf-hmod-pad, .mf-hmod-day { min-height: 36px; padding: 3px; }
  .mf-hmodal-insp { padding: 10px 12px; }
  .mf-hmodal-upcoming { padding: 14px; gap: 9px; }
  .mf-hmodal-up-list { gap: 7px; }
  .mf-hmodal-up-item { padding: 9px 10px; }
  .mf-hmodal-fullcard { padding: 13px 14px; }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  #mf-holiday-modal-dialog {
    opacity: 1;
    transform: translate3d(0, 100%, 0);
    transition:
      transform 0.28s cubic-bezier(0.4, 0, 0.7, 1),
      overlay 0.28s allow-discrete,
      display 0.28s allow-discrete;
  }
  #mf-holiday-modal-dialog[open] {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition:
      transform 0.36s cubic-bezier(0.32, 0.72, 0, 1),
      overlay 0.36s allow-discrete,
      display 0.36s allow-discrete;
    @starting-style {
      opacity: 1;
      transform: translate3d(0, 100%, 0);
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .mf-hmodal-close, .mf-hmodal-up-item, .mf-hmodal-fullcard, .mf-hmodal-fullcard-arrow { transition: none; transform: none; }
}
#mf-quick-tract button.mf-tract-item {
  appearance: none;
  font: inherit;
  text-align: left;
}
