/**
 * EBP Training Scheduler — tampilan publik.
 *
 * Mengikuti tema situs: merah brand #e52028, latar terang, dan font diwarisi
 * dari tema (tidak ada font-family yang dipaksakan di sini).
 */

.ebp-page,
.ebp-catalog,
.ebp-calendar-wrap {
  --ebp-red: #e52028;
  --ebp-red-dark: #c0161d;
  --ebp-red-soft: rgba(229, 32, 40, 0.08);
  --ebp-ink: #1a1a1a;
  --ebp-text: #3d3d3d;
  --ebp-muted: #6e6e6e;
  --ebp-line: #e4e4e7;
  --ebp-surface: #ffffff;
  --ebp-alt: #f7f7f8;
  --ebp-radius: 10px;
  --ebp-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
  color: var(--ebp-text);
  box-sizing: border-box;
}

.ebp-page *,
.ebp-catalog *,
.ebp-calendar-wrap * {
  box-sizing: border-box;
}

/* ------------------------------------------------------------------ section */

.ebp-section {
  padding: 48px 0;
}

.ebp-section--alt {
  background: var(--ebp-alt);
  margin: 0 calc(50% - 50vw);
  padding: 48px calc(50vw - 50%);
}

.ebp-sec-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px;
}

.ebp-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ebp-red);
  margin-bottom: 10px;
}

.ebp-sec-head h2 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ebp-ink);
  margin: 0 0 12px;
}

.ebp-sec-head h2 em {
  font-style: normal;
  color: var(--ebp-red);
}

.ebp-sec-head p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ebp-muted);
  margin: 0;
}

/* ------------------------------------------------------------------ filter */

.ebp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.ebp-filter {
  padding: 8px 18px;
  border: 1px solid var(--ebp-line);
  border-radius: 999px;
  background: var(--ebp-surface);
  color: var(--ebp-text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ebp-filter:hover {
  border-color: var(--ebp-red);
  color: var(--ebp-red);
}

.ebp-filter.is-active {
  background: var(--ebp-red);
  border-color: var(--ebp-red);
  color: #fff;
}

/* ------------------------------------------------------------------ katalog */

.ebp-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 20px;
}

.ebp-course {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ebp-surface);
  border: 1px solid var(--ebp-line);
  border-top: 3px solid var(--ebp-red);
  border-radius: var(--ebp-radius);
  padding: 22px;
  box-shadow: var(--ebp-shadow);
  transition: transform 0.18s, box-shadow 0.18s;
}

.ebp-course:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07), 0 16px 40px rgba(0, 0, 0, 0.09);
}

.ebp-course[hidden] {
  display: none;
}

.ebp-badge {
  position: absolute;
  top: -1px;
  right: 16px;
  transform: translateY(-50%);
  background: var(--ebp-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.ebp-cat {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ebp-red);
  background: var(--ebp-red-soft);
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.ebp-course-head h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ebp-ink);
  margin: 0 0 12px;
}

.ebp-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  font-size: 12.5px;
  color: var(--ebp-muted);
}

.ebp-course-meta li {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

.ebp-course-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ebp-text);
  margin: 0 0 18px;
  flex: 1;
}

.ebp-course-price {
  border-top: 1px solid var(--ebp-line);
  padding-top: 14px;
  margin-top: auto;
}

.ebp-price-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ebp-muted);
  margin-bottom: 3px;
}

.ebp-price-value {
  display: block;
  font-size: 21px;
  font-weight: 800;
  color: var(--ebp-ink);
  line-height: 1.15;
}

.ebp-note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ebp-muted);
  margin: 24px 0 0;
  padding: 12px 16px;
  background: var(--ebp-red-soft);
  border-left: 3px solid var(--ebp-red);
  border-radius: 4px;
}

.ebp-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ebp-muted);
  font-size: 14px;
}

/* ----------------------------------------------------------------- legenda */

.ebp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 22px;
}

.ebp-lg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ebp-text);
}

.ebp-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
}

.ebp-dot--done { background: #16a34a; }
.ebp-dot--up   { background: #ca8a04; }
.ebp-dot--full { background: #dc2626; }

/* ---------------------------------------------------------------- kalender */

.ebp-cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}

.ebp-cal-nav {
  width: 36px;
  height: 36px;
  border: 1px solid var(--ebp-line);
  border-radius: 8px;
  background: var(--ebp-surface);
  color: var(--ebp-ink);
  font-size: 19px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ebp-cal-nav:hover {
  background: var(--ebp-red);
  border-color: var(--ebp-red);
  color: #fff;
}

.ebp-cal-label {
  min-width: 190px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ebp-ink);
}

.ebp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  background: var(--ebp-surface);
  border: 1px solid var(--ebp-line);
  border-radius: var(--ebp-radius);
  padding: 14px;
  box-shadow: var(--ebp-shadow);
}

.ebp-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ebp-muted);
  padding: 6px 0;
}

.ebp-day {
  position: relative;
  min-height: 62px;
  padding: 7px 6px 6px;
  border: 1px solid var(--ebp-line);
  border-radius: 8px;
  background: var(--ebp-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ebp-text);
}

.ebp-day--out {
  background: var(--ebp-alt);
  color: #b4b4b8;
  border-color: transparent;
}

.ebp-day--today {
  border-color: var(--ebp-red);
  box-shadow: inset 0 0 0 1px var(--ebp-red);
}

.ebp-day--has {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.ebp-day--has:hover {
  border-color: var(--ebp-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(229, 32, 40, 0.16);
}

.ebp-day--has:focus-visible {
  outline: 2px solid var(--ebp-red);
  outline-offset: 2px;
}

.ebp-day--sel {
  border-color: var(--ebp-red);
  background: var(--ebp-red-soft);
}

.ebp-day-num {
  line-height: 1;
}

.ebp-day-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
  min-height: 7px;
}

.ebp-day-dots .ebp-dot {
  width: 7px;
  height: 7px;
}

/* -------------------------------------------------------- detail & kartu */

.ebp-day-detail:empty {
  display: none;
}

.ebp-day-detail {
  margin-top: 18px;
  background: var(--ebp-surface);
  border: 1px solid var(--ebp-line);
  border-radius: var(--ebp-radius);
  padding: 20px;
  box-shadow: var(--ebp-shadow);
}

.ebp-dd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--ebp-line);
}

.ebp-dd-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ebp-ink);
  margin: 0;
}

.ebp-dd-close {
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--ebp-muted);
  cursor: pointer;
  padding: 0 4px;
  font-family: inherit;
}

.ebp-dd-close:hover {
  color: var(--ebp-red);
}

.ebp-item {
  border: 1px solid var(--ebp-line);
  border-left: 3px solid var(--ebp-red);
  border-radius: 8px;
  padding: 16px;
}

.ebp-item + .ebp-item {
  margin-top: 12px;
}

.ebp-item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ebp-item h4 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ebp-ink);
  margin: 0;
}

.ebp-item-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--ebp-red);
  white-space: nowrap;
}

.ebp-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--ebp-muted);
  margin-bottom: 12px;
}

.ebp-quota {
  margin-bottom: 14px;
}

.ebp-quota-bar {
  height: 6px;
  background: var(--ebp-line);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}

.ebp-quota-fill {
  height: 100%;
  background: var(--ebp-red);
  transition: width 0.3s;
}

.ebp-quota-fill--full { background: #dc2626; }
.ebp-quota-fill--done { background: #16a34a; }

.ebp-quota-text {
  font-size: 12px;
  color: var(--ebp-muted);
}

/* ------------------------------------------------------------------ tombol */

.ebp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ebp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 140px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.ebp-btn--primary {
  background: var(--ebp-red);
  color: #fff;
}

.ebp-btn--primary:hover,
.ebp-btn--primary:focus {
  background: var(--ebp-red-dark);
  color: #fff;
  transform: translateY(-1px);
}

.ebp-btn--wa {
  background: #25d366;
  color: #fff;
}

.ebp-btn--wa:hover,
.ebp-btn--wa:focus {
  background: #1fae56;
  color: #fff;
  transform: translateY(-1px);
}

.ebp-btn--ghost {
  background: var(--ebp-surface);
  border-color: var(--ebp-line);
  color: var(--ebp-text);
}

.ebp-btn--ghost:hover,
.ebp-btn--ghost:focus {
  border-color: var(--ebp-red);
  color: var(--ebp-red);
}

.ebp-btn--off {
  background: var(--ebp-alt);
  color: var(--ebp-muted);
  cursor: not-allowed;
  pointer-events: none;
}

/* -------------------------------------------------------- jadwal terdekat */

.ebp-upcoming {
  margin-top: 32px;
}

.ebp-upcoming h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ebp-ink);
  margin: 0 0 14px;
}

.ebp-upcoming:has(.ebp-upcoming-list:empty) {
  display: none;
}

.ebp-up-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--ebp-surface);
  border: 1px solid var(--ebp-line);
  border-radius: 8px;
}

.ebp-up-row + .ebp-up-row {
  margin-top: 8px;
}

.ebp-up-date {
  flex: none;
  min-width: 96px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ebp-red);
}

.ebp-up-title {
  flex: 1 1 180px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ebp-ink);
}

.ebp-up-price {
  flex: none;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ebp-ink);
}

.ebp-up-quota {
  flex: none;
  font-size: 12px;
  color: var(--ebp-muted);
}

/* ------------------------------------------------------------------- admin */

.ebp-admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px;
  background: var(--ebp-surface);
  border: 1px dashed var(--ebp-line);
  border-radius: var(--ebp-radius);
}

.ebp-admin-badge {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
}

.ebp-admin-bar .ebp-btn {
  flex: 0 0 auto;
  min-width: 0;
}

/* ------------------------------------------------------------------- error */

.ebp-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 13.5px;
}

/* -------------------------------------------------------------- responsif */

@media (max-width: 782px) {
  .ebp-section {
    padding: 32px 0;
  }

  .ebp-section--alt {
    padding: 32px calc(50vw - 50%);
  }

  .ebp-course-grid {
    grid-template-columns: 1fr;
  }

  .ebp-cal-grid {
    gap: 3px;
    padding: 8px;
  }

  .ebp-day {
    min-height: 46px;
    padding: 5px 2px;
    font-size: 12px;
    border-radius: 6px;
  }

  .ebp-dow {
    font-size: 10px;
  }

  .ebp-btn {
    min-width: 0;
    flex: 1 1 100%;
  }

  .ebp-up-row {
    gap: 6px;
  }

  .ebp-up-date,
  .ebp-up-title,
  .ebp-up-price,
  .ebp-up-quota {
    flex: 1 1 100%;
    min-width: 0;
  }
}
