/* Customer Portal – Sessions & Classes Section */

/* Single-session detail view */
.session-detail-back-bar {
  margin-bottom: 12px;
}
.session-detail-back-btn {
  background: transparent;
  border: none;
  color: #0955a1;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 0;
  cursor: pointer;
}
.session-detail-back-btn:hover {
  text-decoration: underline;
}
.session-group-card-detail {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ============================================================================
   LANDING PAGE PREVIEW
   ============================================================================ */

.sessions-preview-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.session-preview-card {
  flex: 0 0 260px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  cursor: pointer;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.session-preview-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  border-color: #bdbdbd;
}

.session-preview-name {
  font-size: 15px;
  font-weight: 700;
  color: #212121;
  margin: 0 0 4px;
}

.session-preview-instructor {
  font-size: 13px;
  color: #777;
  margin: 0 0 6px;
}

.session-preview-when {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 8px;
}

.session-preview-when-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.35;
}

.session-preview-when-row::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.7;
}

.session-preview-when-dates {
  color: #212121;
  font-weight: 600;
}

.session-preview-when-dates::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
}

.session-preview-when-time {
  color: #555;
}

.session-preview-when-time::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>");
}

.session-preview-classes {
  font-size: 12px;
  color: #999;
  margin: 0 0 10px;
}

.session-preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.session-preview-price {
  font-size: 14px;
  font-weight: 700;
  color: #212121;
}

/* ============================================================================
   SESSION GROUP CARD (full view)
   ============================================================================ */

.session-group-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  margin-bottom: 16px;
  background: #fff;
  overflow: hidden;
}

.session-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.session-group-header:hover {
  background-color: #fafafa;
}

.session-group-info {
  flex: 1;
}

.session-group-name {
  font-size: 16px;
  font-weight: 700;
  color: #212121;
  margin-bottom: 2px;
}

.session-group-instructor {
  font-size: 13px;
  color: #777;
  margin-bottom: 4px;
}

.session-group-dates {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #212121;
  margin-bottom: 4px;
}

.session-group-dates::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.75;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23212121' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
}

.session-group-schedule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
  margin-bottom: 6px;
}

.session-group-schedule::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>");
}

.session-group-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}

.session-group-count {
  color: #777;
}

.session-group-price {
  font-weight: 600;
  color: #212121;
}

.session-group-toggle {
  padding: 0 8px;
  font-size: 14px;
  color: #999;
}

.session-toggle-arrow {
  transition: transform 0.2s ease;
}

/* ============================================================================
   SESSION GROUP BODY (expandable)
   ============================================================================ */

.session-group-body {
  border-top: 1px solid #e0e0e0;
  padding: 16px;
}

.session-group-card.session-group-auto-expanded {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.session-group-card.session-group-auto-expanded .session-group-header {
  background-color: #fafafa;
}

.session-group-card.session-group-auto-expanded .session-group-header:hover {
  background-color: #f1f1f1;
}

.session-pricing-tiers {
  background: #e3f2fd;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12px;
}

.session-select-all-bar {
  padding: 8px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.session-select-all-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.session-select-all-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #2e7d32;
}

/* ============================================================================
   INSTANCE ROWS
   ============================================================================ */

.session-instances-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-instance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.session-instance-row:hover {
  background-color: #f9f9f9;
}

.session-instance-row.enrolled {
  background-color: #e8f5e9;
}

.session-instance-row.full {
  opacity: 0.5;
}

.session-instance-checkbox-col {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.session-instance-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #2e7d32;
}

.session-enrolled-check {
  color: #2e7d32;
  font-size: 18px;
  font-weight: bold;
}

.session-no-check {
  display: inline-block;
  width: 18px;
  height: 18px;
}

.session-instance-info {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.session-instance-date {
  font-size: 14px;
  font-weight: 600;
  color: #212121;
}

.session-instance-time {
  font-size: 13px;
  color: #555;
}

.session-instance-status {
  flex: 0 0 auto;
}

/* Badges */

.enrolled-badge {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.enrolled-session-badge {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.full-badge {
  display: inline-block;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.spots-badge {
  font-size: 13px;
  font-weight: 600;
}

.spots-badge.spots-available {
  color: #1e7a37;
}

.session-instance-unenroll {
  padding: 4px 12px;
  font-size: 12px;
  min-width: auto;
}

/* ============================================================================
   ENROLL BAR
   ============================================================================ */

.session-enroll-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e0e0e0;
  flex-wrap: wrap;
}

.session-enroll-price-summary {
  flex: 1;
}

.session-discount-note {
  font-size: 12px;
  color: #2e7d32;
  font-weight: 600;
}

.session-enroll-btn {
  padding: 10px 24px;
  font-size: 14px;
  min-width: 200px;
}

.session-enroll-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================================
   UNENROLL BAR
   ============================================================================ */

.session-unenroll-bar {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.session-unenroll-session-btn {
  width: 100%;
  padding: 10px;
}

/* ============================================================================
   SECONDARY BUTTON (shared)
   ============================================================================ */

.booky-secondary-btn {
  display: inline-block;
  padding: 8px 20px;
  font-size: 14px;
  background: none;
  border: 1px solid #999;
  border-radius: 4px;
  color: #555;
  cursor: pointer;
  min-width: 100px;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.booky-secondary-btn:hover {
  border-color: #dc3545;
  color: #dc3545;
}

/* ============================================================================
   MY CLASSES (user-bookings page) — kept from previous implementation
   ============================================================================ */

.my-class-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 16px;
  background: #fff;
}

.my-class-card .class-badge {
  display: inline-block;
  background: #2196f3;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.my-class-card .class-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.my-class-card .class-meta {
  font-size: 14px;
  color: #555;
  margin-bottom: 2px;
}

.my-class-card .class-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.my-class-card.past-class {
  opacity: 0.7;
}

.my-class-card.cancelled-class {
  opacity: 0.5;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 576px) {
  .sessions-preview-container {
    gap: 10px;
  }

  .session-preview-card {
    flex: 0 0 220px;
    padding: 12px;
  }

  .session-group-header {
    padding: 12px;
  }

  .session-group-body {
    padding: 12px;
  }

  .session-instance-row {
    gap: 8px;
    padding: 8px 4px;
  }

  .session-instance-info {
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
  }

  .session-enroll-btn {
    width: 100%;
    min-width: auto;
  }

  .session-enroll-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===== Attendance Mode (Customer Portal) ===== */
.attendance-mode-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
  margin-left: 4px;
}

.attendance-mode-badge.in-person {
  background: #e3f2fd;
  color: #1565c0;
}

.attendance-mode-badge.virtual {
  background: #f3e5f5;
  color: #7b1fa2;
}

.attendance-mode-badge.hybrid {
  background: #fff3e0;
  color: #e65100;
}

/* Mode toggle for hybrid sessions */
.session-mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
}

.session-mode-toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
}

.session-mode-btn {
  padding: 6px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #666;
}

.session-mode-btn:hover {
  border-color: #2196f3;
  color: #2196f3;
}

.session-mode-btn.active {
  background: #2196f3;
  border-color: #2196f3;
  color: #fff;
}

/* Dual spots display */
.dual-spots-display {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.dual-spots-display .spots-badge {
  font-size: 11px;
}

/* Capacity bar dual (reused from admin) */
.capacity-bar-dual {
  margin: 12px 0;
}

.capacity-bar-dual-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.capacity-bar-dual-label {
  font-size: 12px;
  font-weight: 600;
  min-width: 70px;
  color: #555;
}
