/**
 * yb-booking.css
 * Path: wp-content/themes/YOUR-THEME/assets/css/yb-booking.css
 */

/* ── Prevent body scroll when modal open ── */
body.yb-open { overflow: hidden; }

/* ════════════════════════════════════════
   SCHEDULE PAGE
════════════════════════════════════════ */
.yb-schedule-section {
  background: #f6efe6;
  padding: 140px 20px;
  text-align: center;
}
.yb-schedule-wrap {
  max-width: 860px;
  margin: 0 auto;
}
.yb-schedule-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1f3d3b;
  margin-bottom: 28px;
}

/* Membership banner */
.yb-membership-banner {
  margin-bottom: 40px;
}
.yb-membership-banner h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f3d3b;
  margin-bottom: 12px;
}
.yb-plan-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.yb-pill {
  padding: 6px 16px;
  background: #fff;
  border: 1px solid #d4c6b5;
  border-radius: 999px;
  font-size: .85rem;
  color: #444;
}
.yb-pill-highlight {
  background: #1f3d3b;
  color: #fff;
  border-color: #1f3d3b;
}

/* Calendar row */
.yb-calendar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.yb-calendar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.yb-cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 10px;
  min-width: 52px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  user-select: none;
}
.yb-cal-day:hover { border-color: #1f3d3b; }
.yb-cal-active { background: #1f3d3b !important; color: #fff !important; border-color: #1f3d3b !important; }
.yb-cal-dname { font-size: .65rem; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.yb-cal-dnum  { font-size: 1rem; font-weight: 700; line-height: 1.2; }
.yb-cal-mon   { font-size: .65rem; text-transform: uppercase; opacity: .7; }
.yb-week-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background .15s;
}
.yb-week-btn:hover { background: #eee; }

/* Category tabs */
.yb-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.yb-tab {
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.yb-tab:hover { border-color: #1f3d3b; }
.yb-tab.active { background: #1f3d3b; color: #fff; border-color: #1f3d3b; }

/* Filters */
.yb-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.yb-filters select {
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 999px;
  font-size: .85rem;
  background: #fff;
  cursor: pointer;
}
.yb-reset-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #bbb;
  background: #eee;
  font-size: .85rem;
  cursor: pointer;
}
.yb-reset-btn:hover { background: #ddd; }

/* Class cards */
.yb-class-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #e8e0d6;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  text-align: left;
  transition: box-shadow .2s;
}
.yb-class-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.09); }
.yb-class-img {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.yb-class-info { flex: 1; min-width: 0; }
.yb-class-cat {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999;
  display: block;
  margin-bottom: 2px;
}
.yb-class-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f3d3b;
  margin: 0 0 2px;
}
.yb-class-teacher { font-size: .82rem; color: #888; margin: 0 0 4px; }
.yb-class-desc    { font-size: .84rem; color: #555; margin: 0 0 6px; }
.yb-class-when    { font-size: .84rem; font-weight: 600; color: #333; margin: 0 0 2px; }
.yb-class-loc     { font-size: .75rem; color: #aaa; margin: 0; }
.yb-class-action  { text-align: right; flex-shrink: 0; }
.yb-class-price   { font-size: 1.1rem; font-weight: 800; color: #1f3d3b; margin: 0 0 8px; }
.yb-no-classes    { color: #999; padding: 30px 0; }

/* Book Now button */
.yb-book-btn {
  padding: 9px 18px;
  background: #1f3d3b;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .18s, transform .15s;
}
.yb-book-btn:hover { opacity: .85; transform: translateY(-1px); }

/* ════════════════════════════════════════
   MODAL
════════════════════════════════════════ */
#yb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 16px;
  backdrop-filter: blur(2px);
}
.yb-modal {
  background: #fff;
  border-radius: 18px;
  padding: 32px 28px;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
  animation: ybSlideUp .22s ease;
}
@keyframes ybSlideUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0);    }
}
.yb-modal h2 { font-size:1.4rem; font-weight:800; color:#1f3d3b; margin:0 0 8px; }
.yb-close {
  position: absolute; top:14px; right:16px;
  background: none; border: none; font-size:1.1rem;
  cursor: pointer; color:#aaa; line-height:1; padding:4px;
}
.yb-close:hover { color:#333; }

/* Booking summary inside modal */
.yb-summary {
  background: #f6efe6;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .88rem;
  color: #444;
  margin-bottom: 14px;
  line-height: 1.6;
}
.yb-muted { color:#888; font-size:.85rem; }

/* Inputs */
.yb-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.yb-input {
  display: block;
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: .9rem;
  box-sizing: border-box;
  transition: border-color .18s;
  margin-bottom: 10px;
}
.yb-input:focus { outline:none; border-color:#1f3d3b; }
.yb-input-full  { width:100%; }
.yb-hint {
  font-size:.76rem;
  color:#aaa;
  margin: -4px 0 12px;
}

/* Plan pill in register modal */
.yb-plan-pill {
  background: #edf7f6;
  border: 1px solid #b2dfdb;
  border-radius: 8px;
  padding: 9px 13px;
  font-size: .85rem;
  color: #1f3d3b;
  margin-bottom: 14px;
}
.yb-change-link {
  color:#1f3d3b;
  font-weight:600;
  margin-left:8px;
  font-size:.8rem;
}

/* Plan grid in plan modal */
.yb-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 0;
}
.yb-plan-label input { display:none; }
.yb-plan-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color .18s, box-shadow .18s;
}
.yb-plan-selected {
  border-color: #1f3d3b;
  box-shadow: 0 0 0 4px rgba(31,61,59,.1);
}
.yb-pname  { font-size:.9rem; font-weight:700; color:#1f3d3b; display:block; }
.yb-pprice { font-size:1.4rem; font-weight:800; color:#1f3d3b; display:block; margin:4px 0; }
.yb-pnote  { font-size:.72rem; color:#999; display:block; }

/* Buttons */
.yb-btn {
  display:inline-block;
  padding:11px 22px;
  border-radius:9px;
  font-size:.9rem;
  font-weight:700;
  cursor:pointer;
  border:none;
  transition:opacity .18s, transform .12s;
  text-decoration:none;
  box-sizing:border-box;
}
.yb-btn:hover  { opacity:.86; transform:translateY(-1px); }
.yb-btn:disabled { opacity:.45; cursor:not-allowed; transform:none; }
.yb-btn-primary { background:#1f3d3b; color:#fff; }
.yb-btn-outline { background:transparent; color:#1f3d3b; border:2px solid #1f3d3b; }
.yb-btn-full    { width:100%; text-align:center; }
.yb-row-btns    { text-align:center; gap:10px; flex-wrap:wrap; margin-top:14px; }

/* Messages */
.yb-msg { padding:10px 14px; border-radius:8px; font-size:.87rem; margin-bottom:12px; }
.yb-ok  { background:#f0fff4; border-left:3px solid #38a169; color:#276749; }
.yb-err { background:#fff5f5; border-left:3px solid #e53e3e; color:#c53030; }

/* ════════════════════════════════════════
   PROFILE PAGE
════════════════════════════════════════ */
.yb-profile-section {
  background: #f6efe6;
  min-height: 80vh;
  padding: 140px 20px;
}
.yb-profile {
  max-width: 900px;
  margin: 0 auto;
  font-family: inherit;
}
.yb-profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.yb-avatar {
  width: 60px; height: 60px;
  background: #1f3d3b;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800;
  flex-shrink: 0;
}
.yb-profile h2 { font-size:1.7rem; font-weight:800; color:#1f3d3b; margin:0 0 2px; }
.yb-email      { color:#999; font-size:.9rem; margin:0 !important; }
.yb-profile h3 {
  font-size:1.1rem; color:#1f3d3b; font-weight:700;
  border-bottom:2px solid #e0d5c5; padding-bottom:8px;
  margin:28px 0 14px;
}

/* Credits bar */
.yb-credits-bar {
  background:#1f3d3b; color:#fff;
  border-radius:10px; padding:12px 18px;
  display:flex; gap:16px; flex-wrap:wrap;
  align-items:center; font-size:.88rem;
  margin-bottom:6px;
}
.yb-credits-none {
  background:#fff3cd; color:#856404;
  border:1px solid #ffc107;
}
.yb-credits-none a { color:#856404; font-weight:700; }

/* Table */
.yb-table-wrap { overflow-x:auto; }
.yb-table {
  width:100%; border-collapse:collapse;
  font-size:.86rem; background:#fff;
  border-radius:10px; overflow:hidden;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
}
.yb-table th {
  background:#1f3d3b; color:#fff;
  padding:11px 14px; text-align:left;
  font-weight:700; white-space:nowrap;
}
.yb-table td {
  padding:10px 14px;
  border-bottom:1px solid #f0e8e0;
  vertical-align:middle;
}
.yb-table tr:last-child td { border-bottom:none; }
.yb-table tr:hover td { background:#fdf8f3; }
.yb-small { font-size:.72rem; color:#aaa; word-break:break-all; }

/* Badges */
.yb-badge {
  display:inline-block; padding:3px 11px;
  border-radius:999px; font-size:.75rem; font-weight:700;
}
.yb-active    { background:#c6f6d5; color:#276749; }
.yb-expired   { background:#fed7d7; color:#9b2c2c; }
.yb-cancelled { background:#e2e8f0; color:#4a5568; }
.yb-confirmed { background:#bee3f8; color:#2c5282; }
.yb-attended  { background:#fefcbf; color:#744210; }

/* Empty state */
.yb-empty { color:#aaa; font-style:italic; padding:8px 0; }

/* Profile footer */
.yb-profile-footer { margin-top:30px; display:flex; gap:12px; flex-wrap:wrap; }

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width:600px) {
  .yb-class-card  { flex-direction:column; align-items:flex-start; }
  .yb-class-img   { width:100%; height:160px; }
  .yb-class-action{ width:100%; display:flex; justify-content:space-between; align-items:center; }
  .yb-plan-grid   { grid-template-columns:1fr; }
  .yb-form-row    { grid-template-columns:1fr; }
  .yb-modal       { padding:24px 18px; }
  .yb-credits-bar { flex-direction:column; gap:6px; }
  .yb-profile-header { flex-direction:column; text-align:center; }
}
