:root {
  --bb-yellow: #ffd400;
  --bb-yellow-soft: #fff8cc;
  --bb-green: #5f8a52;
  --bb-green-soft: #edf5e9;
  --bb-bg: #fbfaf6;
  --bb-card: #ffffff;
  --bb-text: #17191d;
  --bb-muted: #6f746f;
  --bb-border: #e6e1d8;
  --bb-error: #b42318;
  --bb-success: #2f7d32;
  --bb-shadow: 0 16px 40px rgba(20, 20, 20, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Barlow', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: transparent;
  color: var(--bb-text);
}

.bb-widget {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px;
  color: var(--bb-text);
}

.bb-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--bb-green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bb-intro {
  margin-bottom: 24px;
  display: flex;
  flex-direction: row;
  align-content: center;
  justify-content: flex-start;
  align-items: center;
  gap: 25px;
}
.bb-intro h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.bb-intro p {
  margin: 0;
  max-width: 640px;
  color: var(--bb-muted);
  font-size: 18px;
  line-height: 1.45;
}

.bb-layout {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.bb-help-card,
.bb-capacity-card,
.bb-form,
.bb-alert {
  background: var(--bb-card);
  border: 1px solid var(--bb-border);
  border-radius: 20px;
}

.bb-alert { padding: 16px 18px; margin: 0 0 20px; font-weight: 600; }
.bb-alert-success { border-color: rgba(47,125,50,.25); background: #f2fbf2; color: var(--bb-success); }
.bb-alert-error { border-color: rgba(180,35,24,.25); background: #fff4f2; color: var(--bb-error); }

.bb-help-card { padding: 24px; }
.bb-help-card h2 { margin: 0 0 16px; font-size: 22px; }
.bb-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(230,225,216,.65);
}
.bb-step:first-of-type { border-top: 0; padding-top: 0; }
.bb-step span {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 999px; background: var(--bb-green); color: #fff; font-weight: 800;
}
.bb-step strong { display: block; margin-bottom: 4px; font-size: 16px; }
.bb-step p { margin: 0; color: var(--bb-muted); font-size: 15px; line-height: 1.35; }

.bb-capacity-card {
  margin-top: 18px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fffdf2, #fff);
  border-color: rgba(255, 212, 0, 0.75);
}
.bb-capacity-card > span {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 999px; background: var(--bb-yellow); font-size: 24px;
}
.bb-capacity-card small { display: block; color: var(--bb-muted); font-weight: 700; }
.bb-capacity-card strong { display: block; font-size: 27px; line-height: 1; }

.bb-form {
  padding: 28px;
  box-shadow: var(--bb-shadow);
}
.bb-section { margin-bottom: 28px; }
.bb-section:last-of-type { margin-bottom: 22px; }
.bb-section h2 { margin: 0 0 14px; font-size: 21px; font-weight: 800; }

.bb-options, .bb-sessions, .bb-fields { display: grid; gap: 14px; }
.bb-options { grid-template-columns: repeat(2, 1fr); }
.bb-sessions { grid-template-columns: repeat(3, 1fr); }
.bb-fields { grid-template-columns: repeat(3, 1fr); }

.bb-option,
.bb-session {
  position: relative;
  min-height: 82px;
  padding: 18px;
  border: 1px solid var(--bb-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.bb-option:hover, .bb-session:hover { border-color: var(--bb-yellow); }
.bb-option { display: flex; align-items: center; gap: 14px; }
.bb-option input, .bb-session input { position: absolute; opacity: 0; pointer-events: none; }
.bb-radio {
  width: 22px; height: 22px; border: 2px solid #d5d5d5; border-radius: 50%; flex: 0 0 auto;
}
.bb-is-selected { border-color: var(--bb-yellow); box-shadow: 0 0 0 3px rgba(255,212,0,.18); }
.bb-is-selected .bb-radio { border-color: var(--bb-yellow); background: radial-gradient(circle, var(--bb-yellow) 45%, transparent 48%); }
.bb-option strong, .bb-session strong { display: block; color: var(--bb-text); font-size: 16px; line-height: 1.2; }
.bb-option small, .bb-session small { display: block; margin-top: 5px; color: var(--bb-muted); font-size: 14px; line-height: 1.25; }
.bb-session small { color: var(--bb-green); font-weight: 800; }
.bb-is-disabled { opacity: .55; cursor: not-allowed; background: #f7f7f7; }
.bb-is-disabled small { color: var(--bb-muted); }

.bb-field input, .bb-fields input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--bb-border);
  border-radius: 12px;
  background: #fff;
  color: var(--bb-text);
  font: inherit;
  font-size: 16px;
}
.bb-field input:focus, .bb-fields input:focus {
  outline: none;
  border-color: var(--bb-yellow);
  box-shadow: 0 0 0 3px rgba(255,212,0,.18);
}
.bb-note { margin: 8px 0 0; color: var(--bb-muted); font-size: 14px; line-height: 1.35; }
.bb-capacity-note { color: var(--bb-error); }
.bb-empty { padding: 18px; border-radius: 14px; background: #fff; border: 1px solid var(--bb-border); color: var(--bb-muted); }

.bb-legal { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; color: var(--bb-muted); font-size: 15px; line-height: 1.4; }
.bb-legal input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; }
.bb-submit {
  width: 100%; min-height: 60px; border: 0; border-radius: 12px;
  background: var(--bb-yellow); color: var(--bb-text); font: inherit;
  font-size: 20px; font-weight: 800; cursor: pointer;
}
.bb-submit:hover { filter: brightness(.97); }

@media (max-width: 860px) {
  .bb-widget { padding: 12px 10px 24px; }
  .bb-intro { margin-bottom: 20px; }
  .bb-intro h1 { font-size: 36px; }
  .bb-intro p { font-size: 16px; }
  .bb-layout { display: block; }
  .bb-help { display: none; }
  .bb-form { padding: 0; border: 0; box-shadow: none; background: transparent; }
  .bb-section { margin-bottom: 24px; }
  .bb-section h2 { font-size: 20px; }
  .bb-options, .bb-sessions, .bb-fields { grid-template-columns: 1fr; }
  .bb-option, .bb-session { background: #fff; min-height: 76px; padding: 17px; }
  .bb-submit { min-height: 58px; font-size: 19px; }
}

/* Avisos de disponibilidad baja */
.bb-session.bb-availability-warning small {
  color: #d97706;
}

.bb-session.bb-availability-critical small {
  color: #b42318;
}

.bb-session.bb-availability-full small {
  color: var(--bb-muted);
}

.bb-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}


/* Página de confirmación de reserva */
.bb-confirmation-page {
  min-height: 100vh;
  padding: 40px 20px;
  display: grid;
  place-items: center;
  font-family: 'Barlow', Arial, sans-serif;
}

.bb-confirmation-card {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border: 1px solid var(--bb-border, #e6e1d8);
  border-radius: 28px;
  box-shadow: var(--bb-shadow, 0 16px 40px rgba(20, 20, 20, 0.08));
  padding: 44px 38px;
  text-align: center;
}

.bb-confirmation-logo {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 auto 24px;
}

.bb-confirmation-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--bb-green-soft, #edf5e9);
  color: var(--bb-green, #5f8a52);
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 18px;
  border: 2px solid rgba(95, 138, 82, 0.25);
}

.bb-confirmation-card h1 {
  margin: 8px 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--bb-text, #17191d);
}

.bb-confirmation-card p {
  max-width: 540px;
  margin: 0 auto 22px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--bb-muted, #6f746f);
}

.bb-confirmation-note {
  max-width: 540px;
  margin: 0 auto 28px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--bb-yellow-soft, #fff8cc);
  border: 1px solid var(--bb-yellow, #ffd400);
  font-size: 16px;
  font-weight: 700;
  color: var(--bb-text, #17191d);
}

.bb-confirmation-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.bb-confirmation-btn {
  min-height: 50px;
  padding: 14px 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
}

.bb-confirmation-btn.primary {
  background: var(--bb-yellow, #ffd400);
  color: var(--bb-text, #17191d);
}

.bb-confirmation-btn.secondary {
  background: #ffffff;
  color: var(--bb-text, #17191d);
  border: 1px solid var(--bb-border, #e6e1d8);
}

.bb-confirmation-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .bb-confirmation-page {
    padding: 22px 14px;
  }

  .bb-confirmation-card {
    padding: 34px 22px;
    border-radius: 22px;
  }

  .bb-confirmation-logo {
    width: 96px;
  }

  .bb-confirmation-card p {
    font-size: 16px;
  }

  .bb-confirmation-actions {
    flex-direction: column;
  }

  .bb-confirmation-btn {
    width: 100%;
  }
}
