@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&display=swap");
@import url("https://cdn.jsdelivr.net/npm/remixicon@4.6.0/fonts/remixicon.css");

.jem-booking-root {
  --border: rgba(0, 0, 0, .10);
  --panelAlt: #F6F4F4;
  --blue: #163C8C;
  --yellow: #F4B23C;

  --text: var(--blue);
  --muted: rgba(22, 60, 140, .78);
  --muted2: rgba(22, 60, 140, .52);

  --radius: 4px;
  --gap: 16px;

  --accent: #FF7F00;
  --accentSoft: rgba(255, 127, 0, .18);

  padding: 32px 64px;
  box-sizing: border-box;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;

  font-family: "Fredoka", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  color: var(--text);
}

.jem-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px 16px 0 16px;
}

.jem-tab {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f3f4f6;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.2s;
  font-family: inherit;
}

.jem-tab.active {
  background: #ffffff;
  color: var(--blue);
  border-bottom-color: transparent;
}

@media (max-width: 900px) {
  .jem-booking-root {
    padding: 18px 10px;
  }
}

.jem-wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.jem-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px;
  width: 100%;
  box-sizing: border-box;
}

.jem-head h2 {
  margin: 0;
  font-weight: 700;
  font-size: 26px;
  line-height: 32px;
  letter-spacing: -0.02em;
}

.jem-head p {
  margin: 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 120%;
  color: var(--muted);
}

.jem-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: var(--gap);
  align-items: start;
}

@media (max-width: 980px) {
  .jem-grid {
    grid-template-columns: 1fr;
  }
}

.jem-card {
  box-sizing: border-box;
  background: var(--panelAlt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Calendar */
.jem-calendar-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.jem-calTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  gap: 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.jem-month {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}

.jem-month strong {
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.02em;
}

.jem-month span {
  font-weight: 500;
  font-size: 16px;
  line-height: 120%;
  color: var(--muted);
}

.jem-nav {
  display: flex;
  gap: 8px;
}

.jem-btnIcon {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #EEE9E9;

  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  user-select: none;
}

.jem-btnIcon i {
  font-size: 18px;
  line-height: 1;
}

.jem-btnIcon:hover {
  filter: brightness(0.98);
}

.jem-btnIcon[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

/* ✅ 5 columns only (Sun–Thu) */
.jem-dow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 12px 10px 10px;
  background: var(--panelAlt);
}

.jem-dow div {
  text-align: center;
  font-weight: 700;
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted2);
}

.jem-days {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 0 10px 12px;
  background: var(--panelAlt);
}

.jem-day {
  box-sizing: border-box;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);

  padding: 10px;
  min-height: 64px;

  cursor: pointer;
  user-select: none;

  display: flex;
  flex-direction: column;
  gap: 6px;
  outline: none;
}

.jem-day:hover {
  box-shadow: 0 0 0 3px var(--accentSoft);
  border-color: rgba(0, 0, 0, .15);
}

.jem-day[aria-disabled="true"] {
  opacity: .35;
  cursor: not-allowed;
  box-shadow: none;
}

.jem-day.is-selected {
  box-shadow: 0 0 0 3px var(--accentSoft);
  border-color: rgba(0, 0, 0, .25);
  background: #fdf2f2;
}

.jem-day.is-range-start {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--blue) !important;
  color: white !important;
}

.jem-day.is-range-start .jem-dayHeb {
  color: rgba(255, 255, 255, 0.8) !important;
}

.jem-day.is-range-end {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: var(--blue) !important;
  color: white !important;
}

.jem-day.is-range-end .jem-dayHeb {
  color: rgba(255, 255, 255, 0.8) !important;
}

.jem-day.is-range-mid {
  border-radius: 0;
  background: var(--accentSoft) !important;
  border-left-color: transparent;
  border-right-color: transparent;
}

.jem-dayNum {
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.02em;
}

.jem-dayHeb {
  font-weight: 500;
  font-size: 14px;
  line-height: 120%;
  color: var(--muted);
}

/* Form */
.jem-formTop {
  padding: 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.jem-formTop h3 {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.02em;
}

.jem-formTop p {
  margin: 8px 0 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 120%;
  color: var(--muted);
}

.jem-formBody {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--panelAlt);
}

.jem-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jem-row label {
  font-weight: 700;
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted2);
}

.jem-row input,
.jem-row textarea,
.jem-row select {
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 120%;
  color: var(--text);

  padding: 12px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  outline: none;
  box-sizing: border-box;
}

.jem-row input:focus,
.jem-row textarea:focus,
.jem-row select:focus {
  box-shadow: 0 0 0 3px var(--accentSoft);
}

.jem-row textarea {
  min-height: 110px;
  resize: vertical;
}

.jem-help {
  display: flex;
  justify-content: flex-end;
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

.jem-cta {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #EEE9E9;
  padding: 12px 16px;
  cursor: pointer;

  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.02em;
  color: var(--text);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.jem-cta:hover {
  filter: brightness(0.98);
}

.jem-cta[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.jem-cta .jem-arrow {
  width: 8.5px;
  height: 14px;
  display: inline-block;
  border-right: 2px solid var(--yellow);
  border-bottom: 2px solid var(--yellow);
  transform: rotate(-45deg);
  margin-right: 2px;
  opacity: .95;
}

.jem-status {
  margin-top: 4px;
  font-weight: 500;
  font-size: 16px;
  line-height: 120%;
  color: var(--muted);
}

.jem-status.ok {
  color: var(--muted);
}

.jem-status.err {
  color: var(--muted);
}

/* Multi-step Flow Styles */
.jem-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 0;
  background: var(--panelAlt);
}

.jem-step {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted2);
  font-size: 14px;
  font-weight: 600;
}

.jem-step.active {
  color: var(--blue);
}

.jem-stepNum {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--panelAlt);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all 0.2s;
  font-size: 12px;
}

.jem-step.active .jem-stepNum {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.jem-stepLine {
  width: 20px;
  height: 2px;
  background: var(--border);
}

.jem-form-section {
  display: none;
}

.jem-form-section.active {
  display: flex;
}

/* Tooltip Styles */
.jem-tooltip {
  position: relative;
  display: inline-flex;
  cursor: help;
}

.jem-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 150%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--blue);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10;
  pointer-events: none;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.jem-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--blue) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10;
  pointer-events: none;
}

.jem-tooltip:hover::after,
.jem-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Contribution Grid */
.jem-contribution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.jem-contribution-option {
  position: relative;
}

.jem-contribution-option input {
  position: absolute;
  opacity: 0;
}

.jem-contribution-card {
  display: block;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--panel);
}

.jem-contribution-option input:checked+.jem-contribution-card {
  border-color: var(--blue);
  background: var(--panelAlt);
}

.jem-contribution-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 4px;
}

.jem-contribution-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
}

.jem-contribution-description {
  font-size: 12px;
  color: var(--muted2);
}

.jem-custom-amount {
  background: var(--panel);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.jem-custom-amount h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.jem-amount-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jem-dollar-sign {
  font-size: 20px;
  font-weight: 600;
  color: var(--muted);
}

.jem-amount-input-wrapper input {
  flex: 1;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--page);
  outline: none;
}

.jem-amount-input-wrapper input:focus {
  box-shadow: 0 0 0 3px var(--accentSoft);
}

.jem-info-notice {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.jem-info-notice h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.jem-info-notice p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.jem-button-group {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.jem-btnBase {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  padding: 12px 16px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-align: center;
}

.jem-btnBase:hover {
  background: var(--panelAlt);
}

.jem-button-group .jem-cta {
  flex: 1;
  justify-content: center;
  margin-top: 0;
  /* Override any margin inside row */
}

/* Review Section */
.jem-review-section {
  margin-bottom: 24px;
}

.jem-review-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted2);
  margin-bottom: 12px;
}

.jem-dedication-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.jem-dedication-box p {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.jem-dedication-box p strong {
  color: var(--blue);
}

.jem-dedication-msg {
  font-style: italic;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 8px;
}

.jem-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.jem-detail-item {
  background: var(--panel);
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.jem-detail-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted2);
  margin-bottom: 4px;
}

.jem-detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.jem-detail-amount {
  font-size: 20px;
  color: var(--blue);
}

@media (max-width: 600px) {

  .jem-contribution-grid,
  .jem-details-grid {
    grid-template-columns: 1fr;
  }


  /* Calendar Mobile Fixes */
  .jem-month {
    min-width: 0;
  }

  .jem-month strong {
    font-size: 14px;
  }

  .jem-month span {
    font-size: 14px;
  }

  .jem-calTop {
    gap: 8px;
    padding: 10px 8px;
  }

  .jem-dow {
    gap: 4px;
    padding: 10px 8px 8px;
  }

  .jem-dow div {
    font-size: 9px;
    letter-spacing: 0.05em;
  }

  .jem-days {
    gap: 4px;
    padding: 0 8px 10px;
  }

  .jem-day {
    padding: 8px 4px;
    min-height: 56px;
    gap: 4px;
  }

  .jem-dayNum {
    font-size: 14px;
  }

  .jem-dayHeb {
    font-size: 11px;
    line-height: 1.15;
    word-break: break-word;
  }
}