/* ==========================================================================
   RBA site components (2026-11). Loaded globally from
   resources/views/client/components/head.blade.php after the theme CSS.
   Header lives in rba-header.css.
   ========================================================================== */

/* --- Other courses (course page sidebar) ---------------------------------
   Markup: resources/views/client/pages/course.blade.php (.rba-others) */
.rba-others {
  margin-top: 30px;
  padding: 2rem 1.75rem 1rem;
  border: 2px solid #f1f1f1;
  background: #fff;
  line-height: 1.3;
}
.rba-others__title {
  margin: 0 0 .5rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
}
.rba-others__list { margin: 0; padding: 0; list-style: none; }
.rba-others__list > li + li { border-top: 1px solid #ececec; }

.rba-others__item,
.rba-others__item:hover,
.rba-others__item:focus {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  color: inherit;
  text-decoration: none;
}
.rba-others__item:focus-visible { outline: 2px solid #d2b169; outline-offset: 4px; }

.rba-others__media {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f1f1f1;
}
.rba-others__media img,
.rba-others__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.rba-others__item:hover .rba-others__media img,
.rba-others__item:hover .rba-others__media video { transform: scale(1.06); }

.rba-others__body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.rba-others__kind {
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a857c;
}
.rba-others__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.3;
  color: #111;
  transition: color .15s ease;
}
.rba-others__item:hover .rba-others__name { color: #96773a; } /* darker gold: #d2b169 is too light on white */
.rba-others__price {
  font-size: .875rem;
  font-weight: 700;
  color: #000;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 575px) {
  .rba-others { padding: 1.5rem 1.25rem .75rem; }
  .rba-others__item,
  .rba-others__item:hover,
  .rba-others__item:focus { grid-template-columns: 5rem minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .rba-others__media img, .rba-others__media video { transition: none; }
  .rba-others__item:hover .rba-others__media img,
  .rba-others__item:hover .rba-others__media video { transform: none; }
}

/* --- Checkout (payment / registration page) -------------------------------
   Markup: resources/views/client/pages/payment.blade.php (.rba-co).
   Same tokens as the shop checkout (shop custom.css, "RBA checkout v2", --co-*). */
.rba-co {
  --co-bg: #f6f5f2; --co-card: #fff; --co-line: #e6e1d8; --co-line-strong: #cfc8bb;
  --co-ink: #111; --co-muted: #6b665e; --co-tint: #faf6ee; --co-gold: #d2b169;
  --co-r-card: 14px; --co-r-ctl: 10px;
  --co-focus: 0 0 0 3px rgba(210, 177, 105, .38);
  padding: 2rem 0 4.5rem;
  background: var(--co-bg);
  color: var(--co-ink);
  font-size: 1rem;
  line-height: 1.45;
}
.rba-co svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.rba-co__back,
.rba-co__back:hover,
.rba-co__back:focus {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .875rem; color: var(--co-muted); text-decoration: none;
}
.rba-co__back:hover { color: var(--co-ink); }
.rba-co__back svg { width: 1rem; height: 1rem; }
.rba-co__title { margin: .5rem 0 1.5rem; font-size: 1.75rem; font-weight: 400; line-height: 1.2; color: var(--co-ink); }

.rba-co__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 25rem;
  gap: 2.5rem;
  align-items: start;
}
.rba-co__main { min-width: 0; }

/* Steps */
.rba-co__step {
  margin: 0 0 .875rem;
  padding: 1.5rem 1.75rem 1.75rem;
  background: var(--co-card);
  border: 1px solid var(--co-line);
  border-radius: var(--co-r-card);
}
.rba-co__step-title {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 1.5rem;
  font-size: 1.1875rem; font-weight: 400; line-height: 1.3; color: var(--co-ink);
}
.rba-co__num {
  display: grid; place-items: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--co-ink); color: #fff;
  font-size: .875rem; line-height: 1;
}

/* Fields: 2-col grid, aligned with the step title text */
.rba-co__fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.125rem 1rem;
  padding-left: 3rem;
}
.rba-field { grid-column: span 3; min-width: 0; }
.rba-field--full { grid-column: 1 / -1; }
.rba-field--wide { grid-column: span 4; }
.rba-field--narrow { grid-column: span 2; }
.rba-field__label { display: block; margin: 0 0 .375rem; font-size: .875rem; font-weight: 400; line-height: 1.3; color: var(--co-ink); }
.rba-co .rba-field__input {
  display: block; width: 100%;
  height: 3rem; padding: 0 .9375rem;
  border: 1px solid var(--co-line-strong); border-radius: var(--co-r-ctl);
  background: #fff; box-shadow: none;
  font-size: 1rem; line-height: 1.2; color: var(--co-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
.rba-co .rba-field__input::placeholder { color: #a39d92; opacity: 1; }
.rba-co .rba-field__input:hover { border-color: #b3ab9d; }
.rba-co .rba-field__input:focus { border-color: var(--co-ink); box-shadow: var(--co-focus); outline: none; }
.rba-co .was-validated .rba-field__input:invalid { border-color: #b3261e; }

/* Errors */
.rba-co__alert {
  display: flex; gap: .75rem;
  margin: 0 0 .875rem; padding: 1rem 1.25rem;
  border: 1px solid #f0c9c4; border-radius: var(--co-r-card);
  background: #fdf3f2; color: #8c1d18; font-size: .9375rem;
}
.rba-co__alert svg { width: 1.25rem; height: 1.25rem; margin-top: .0625rem; }
.rba-co__alert ul { margin: 0; padding: 0; list-style: none; }

/* Payment option (single, preselected) */
.rba-pay-opt {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 1.5rem 3rem; padding: 1.125rem 1.25rem;
  border: 1px solid var(--co-ink); border-radius: 12px;
  background: var(--co-tint);
}
.rba-pay-opt__radio {
  position: relative; flex: none;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  border: 1.5px solid var(--co-ink); background: #fff;
}
.rba-pay-opt__radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--co-ink); }
.rba-pay-opt__body { display: flex; flex-direction: column; gap: .125rem; flex: 1; min-width: 0; }
.rba-pay-opt__name { font-size: 1rem; color: var(--co-ink); }
.rba-pay-opt__note { font-size: .8125rem; color: var(--co-muted); }
.rba-pay-opt__icon { width: 1.75rem; height: 1.75rem; color: var(--co-muted); }

/* Checkboxes */
.rba-checks { display: flex; flex-direction: column; gap: .875rem; margin: 0 0 1.75rem 3rem; }
.rba-check {
  position: relative;
  display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: .75rem;
  margin: 0; font-size: .9375rem; font-weight: 400; line-height: 1.45; color: var(--co-ink); cursor: pointer;
}
.rba-check input { position: absolute; width: 1.25rem; height: 1.25rem; margin: 0; opacity: 0; }
.rba-check__box {
  width: 1.25rem; height: 1.25rem; margin-top: .0625rem;
  border: 1.5px solid var(--co-line-strong); border-radius: 5px; background: #fff;
  transition: background-color .15s ease, border-color .15s ease;
}
.rba-check:hover .rba-check__box { border-color: var(--co-ink); }
.rba-check input:checked + .rba-check__box {
  border-color: var(--co-ink);
  background: var(--co-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.rba-check input:focus-visible + .rba-check__box { box-shadow: var(--co-focus); }
.was-validated .rba-check input:invalid + .rba-check__box { border-color: #b3261e; }
.rba-check a { color: var(--co-ink); text-decoration: underline; text-decoration-color: var(--co-gold); text-underline-offset: 3px; }

/* Submit */
.rba-co__submit {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 14rem; height: 3.25rem; margin-left: 3rem; padding: 0 2rem;
  border: 0; border-radius: var(--co-r-ctl);
  background: var(--co-ink); color: #fff;
  font-size: 1rem; font-weight: 400; cursor: pointer;
  transition: background-color .15s ease, transform .1s ease-out;
}
.rba-co__submit:hover { background: #2b2b2b; }
.rba-co__submit:active { transform: scale(.985); }
.rba-co__submit:focus-visible { outline: none; box-shadow: var(--co-focus); }
.rba-co__submit:disabled { cursor: progress; opacity: .7; }
.rba-co__submit.is-loading::after {
  content: ""; width: 1rem; height: 1rem; margin-left: .75rem;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  animation: rba-spin .7s linear infinite;
}
@keyframes rba-spin { to { transform: rotate(360deg); } }
.rba-co__secure { display: flex; align-items: center; gap: .375rem; margin: .875rem 0 0 3rem; font-size: .8125rem; color: var(--co-muted); }
.rba-co__secure svg { width: .875rem; height: .875rem; }

.rba-co__note { display: flex; align-items: flex-start; gap: .625rem; margin: 0 0 1.5rem 3rem; font-size: .9375rem; color: var(--co-muted); }
.rba-co__note svg { width: 1.25rem; height: 1.25rem; color: var(--co-ink); }

/* Summary */
.rba-co__aside { position: sticky; top: calc(5rem + 1.5rem); }
.rba-sum {
  padding: 1.5rem;
  background: var(--co-card);
  border: 1px solid var(--co-line);
  border-radius: var(--co-r-card);
}
.rba-sum__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1.25rem; }
.rba-sum__title { margin: 0; font-size: 1.1875rem; font-weight: 400; line-height: 1.3; color: var(--co-ink); }
.rba-sum__kind { font-size: .8125rem; color: var(--co-muted); white-space: nowrap; }
.rba-sum__item { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; align-items: center; }
.rba-sum__media { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: #f1eee8; }
.rba-sum__media img, .rba-sum__media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.rba-sum__name { font-size: .9375rem; line-height: 1.35; color: var(--co-ink); }
.rba-sum__name small { display: block; margin-top: .25rem; font-size: .8125rem; color: var(--co-muted); }

.rba-sum__meta,
.rba-sum__totals { margin: 1.25rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--co-line); }
.rba-sum__meta > div,
.rba-sum__totals > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .9375rem; line-height: 1.4; }
.rba-sum__meta > div + div,
.rba-sum__totals > div + div { margin-top: .5rem; }
.rba-sum__meta dt, .rba-sum__totals dt { font-weight: 400; color: var(--co-muted); }
.rba-sum__meta dd, .rba-sum__totals dd { margin: 0; color: var(--co-ink); text-align: right; font-variant-numeric: tabular-nums; }
.rba-sum__saving dd { color: #2e7d4f; }
.rba-sum__totals > .rba-sum__total { align-items: baseline; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--co-line); }
.rba-sum__total dt { font-size: 1.0625rem; font-weight: 700; color: var(--co-ink); }
.rba-sum__total dd { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.rba-sum__totals > div[hidden] { display: none; }
.rba-sum__totals > .rba-sum__total:first-child { margin-top: 0; padding-top: 0; border-top: 0; } /* registration: price only */

/* Discount code */
.rba-promo { margin: 1.25rem 0 0; }
.rba-promo > summary {
  display: inline-block; list-style: none; cursor: pointer;
  font-size: .875rem; color: var(--co-ink);
  text-decoration: underline; text-decoration-color: var(--co-gold); text-underline-offset: 3px;
}
.rba-promo > summary::-webkit-details-marker { display: none; }
.rba-promo > summary:focus-visible { outline: 2px solid var(--co-gold); outline-offset: 3px; border-radius: 2px; }
.rba-promo__row { display: flex; margin-top: .875rem; }
.rba-promo .rba-field__input { flex: 1; min-width: 0; border-radius: var(--co-r-ctl) 0 0 var(--co-r-ctl); text-transform: uppercase; }
.rba-promo .rba-field__input::placeholder { text-transform: none; }
.rba-promo__btn {
  flex: none; height: 3rem; padding: 0 1.125rem;
  border: 0; border-radius: 0 var(--co-r-ctl) var(--co-r-ctl) 0;
  background: var(--co-ink); color: #fff; font-size: .875rem; cursor: pointer;
}
.rba-promo__btn:hover { background: #2b2b2b; }
.rba-promo__btn:disabled { opacity: .6; cursor: progress; }
.rba-promo__btn:focus-visible { outline: none; box-shadow: var(--co-focus); }
.rba-promo__msg { margin: .5rem 0 0; font-size: .8125rem; line-height: 1.4; }
.rba-promo__msg:empty { display: none; }
.rba-promo__msg[data-state="ok"] { color: #2e7d4f; }
.rba-promo__msg[data-state="bad"] { color: #b3261e; }

/* Tablet / mobile: summary first, single column */
@media (max-width: 991px) {
  .rba-co__grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .rba-co__aside { position: static; order: -1; }
}
@media (max-width: 575px) {
  .rba-co { padding: 1.25rem 0 3rem; }
  .rba-co__title { margin-bottom: 1.25rem; font-size: 1.5rem; }
  .rba-co__step { padding: 1.25rem 1.125rem 1.375rem; }
  .rba-co__step-title { margin-bottom: 1.25rem; gap: .75rem; }
  .rba-co__fields { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
  .rba-field, .rba-field--wide, .rba-field--narrow { grid-column: 1 / -1; }
  .rba-pay-opt, .rba-checks, .rba-co__note, .rba-co__secure { margin-left: 0; }
  .rba-co__submit { width: 100%; margin-left: 0; }
  .rba-co__secure { justify-content: center; }
  .rba-sum { padding: 1.25rem 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rba-co__submit, .rba-co .rba-field__input, .rba-check__box { transition: none; }
  .rba-co__submit.is-loading::after { animation-duration: 2s; }
}
