/* =====================================================================
   Portal shell (Vendor Portal + Platform Admin Portal)
   Sidebar uses Bootstrap's responsive offcanvas (.offcanvas-lg):
   static navigation ≥992px, accessible off-canvas menu below.
   ===================================================================== */

.rp-portal { background: var(--rp-bg); }

.rp-shell { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.rp-sidebar {
  --rp-sidebar-bg: var(--rp-surface);
  --bs-offcanvas-bg: var(--rp-sidebar-bg);
  --rp-nav-color: var(--rp-slate-700);
  --rp-nav-hover-bg: var(--rp-surface-hover);
  --rp-nav-active-bg: var(--rp-primary-subtle);
  --rp-nav-active-color: var(--rp-brand-900);
  --rp-nav-heading: var(--rp-text-muted);
  background: var(--rp-sidebar-bg);
  border-right: 1px solid var(--rp-border);
}

@media (min-width: 992px) {
  /* Bootstrap's .offcanvas-lg forces a transparent background ≥992px; restore the skin's surface. */
  .rp-sidebar.offcanvas-lg { background-color: var(--rp-sidebar-bg) !important; }
  .rp-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    width: var(--rp-sidebar-w);
    flex: 0 0 var(--rp-sidebar-w);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
}

.rp-sidebar .offcanvas-header { border-bottom: 1px solid var(--rp-border); }

.rp-brand {
  display: flex;
  align-items: center;
  gap: var(--rp-space-3);
  padding: var(--rp-space-5) var(--rp-space-5) var(--rp-space-4);
  text-decoration: none;
  color: var(--rp-text);
}
.rp-brand__mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--rp-radius);
  background: var(--rp-primary);
  color: #fff;
  font-weight: var(--rp-fw-bold);
  font-size: var(--rp-fs-md);
}
/* Venuza symbol inside the brand tile. The glyph is a CSS mask, so it takes the tile's own
   text colour: white on brand blue, dark slate on the inverted admin tile. */
.rp-brand__mark--venuza::before {
  content: "";
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask: url("/assets/brand/venuza-glyph.svg") center / 100% 100% no-repeat;
  mask: url("/assets/brand/venuza-glyph.svg") center / 100% 100% no-repeat;
}
.rp-brand__name { display: flex; flex-direction: column; line-height: 1.2; }
.rp-brand__title { font-weight: var(--rp-fw-bold); font-size: var(--rp-fs-base); letter-spacing: -0.01em; }
.rp-brand__sub { font-size: var(--rp-fs-sm); color: var(--rp-nav-heading); font-weight: var(--rp-fw-medium); }

.rp-nav { list-style: none; margin: 0; padding: var(--rp-space-2) var(--rp-space-3) var(--rp-space-5); display: flex; flex-direction: column; gap: 2px; }
.rp-nav__section {
  font-size: var(--rp-fs-xs);
  font-weight: var(--rp-fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rp-nav-heading);
  padding: var(--rp-space-4) var(--rp-space-3) var(--rp-space-2);
}
.rp-nav__link {
  display: flex;
  align-items: center;
  gap: var(--rp-space-3);
  min-height: var(--rp-target-touch);
  padding: 0.5rem 0.75rem;
  border-radius: var(--rp-radius);
  color: var(--rp-nav-color);
  font-weight: var(--rp-fw-medium);
  font-size: var(--rp-fs-sm);
  text-decoration: none;
  transition: background-color var(--rp-dur-fast) var(--rp-ease-out), color var(--rp-dur-fast) var(--rp-ease-out);
}
.rp-nav__link .bi { font-size: 1.1rem; }
.rp-nav__link:hover { background: var(--rp-nav-hover-bg); color: var(--rp-text); }
.rp-nav__link[aria-current="page"] { background: var(--rp-nav-active-bg); color: var(--rp-nav-active-color); font-weight: var(--rp-fw-semibold); }
.rp-nav__badge {
  margin-left: auto;
  font-size: var(--rp-fs-xs);
  font-weight: var(--rp-fw-bold);
  background: var(--rp-warning-subtle);
  color: var(--rp-warning-emphasis);
  border: 1px solid var(--rp-warning-border);
  border-radius: var(--rp-radius-pill);
  padding: 0.05rem 0.5rem;
}

.rp-sidebar__footer { margin-top: auto; padding: var(--rp-space-4) var(--rp-space-5); border-top: 1px solid var(--rp-border); font-size: var(--rp-fs-sm); color: var(--rp-text-muted); }

/* Admin skin: dark navigation so admins never confuse the portals (UI spec 7.1) */
.rp-app-admin .rp-sidebar {
  --rp-sidebar-bg: var(--rp-slate-900);
  --bs-offcanvas-color: #e2e8f0;
  --rp-nav-color: #cbd5e1;
  --rp-nav-hover-bg: rgba(255, 255, 255, 0.08);
  --rp-nav-active-bg: rgba(255, 255, 255, 0.14);
  --rp-nav-active-color: #ffffff;
  --rp-nav-heading: #94a3b8;
  border-right-color: var(--rp-slate-800);
  color: #e2e8f0;
}
.rp-app-admin .rp-brand { color: #fff; }
.rp-app-admin .rp-brand__mark { background: #fff; color: var(--rp-slate-900); }
.rp-app-admin .rp-sidebar__footer { border-top-color: var(--rp-slate-800); color: #94a3b8; }
.rp-app-admin .rp-sidebar .offcanvas-header { border-bottom-color: var(--rp-slate-800); }
.rp-app-admin .rp-sidebar .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.rp-app-admin .rp-sidebar :focus-visible { outline-color: #ffffff; }
.rp-app-admin .rp-nav__badge { background: rgba(253, 232, 164, 0.15); color: #fde8a4; border-color: rgba(253, 232, 164, 0.4); }

/* ---------- Main column ---------- */
.rp-shell__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.rp-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: var(--rp-header-h);
  display: flex;
  align-items: center;
  gap: var(--rp-space-3);
  padding: 0 var(--rp-space-5);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--rp-border);
}
.rp-topbar__title { font-size: var(--rp-fs-sm); font-weight: var(--rp-fw-semibold); color: var(--rp-text-muted); margin: 0; }
.rp-topbar__actions { margin-left: auto; display: flex; align-items: center; gap: var(--rp-space-2); }
.rp-avatar {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--rp-radius-pill);
  background: var(--rp-primary-subtle);
  color: var(--rp-brand-900);
  font-size: var(--rp-fs-sm);
  font-weight: var(--rp-fw-bold);
}
.rp-app-admin .rp-avatar { background: var(--rp-slate-900); color: #fff; }
.rp-portal-tag {
  font-size: var(--rp-fs-xs);
  font-weight: var(--rp-fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--rp-radius-sm);
  background: var(--rp-slate-900);
  color: #fff;
}

.rp-main { flex: 1 1 auto; padding: var(--rp-space-6) var(--rp-space-6) var(--rp-space-8); max-width: 90rem; width: 100%; }
.rp-main:focus { outline: none; }

/* ---------- Page header ---------- */
.rp-page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--rp-space-4); margin-bottom: var(--rp-space-6); }
.rp-page-header h1 { font-size: var(--rp-fs-2xl); margin: 0; }
.rp-page-header__text p { margin: var(--rp-space-2) 0 0; color: var(--rp-text-muted); }
.rp-page-header__actions { display: flex; flex-wrap: wrap; gap: var(--rp-space-2); }

.rp-section + .rp-section { margin-top: var(--rp-space-6); }
.rp-section__title { font-size: var(--rp-fs-lg); margin-bottom: var(--rp-space-4); }

/* Detail layout: main + aside */
.rp-detail { display: grid; grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); gap: var(--rp-space-5); align-items: start; }
.rp-detail__aside { display: flex; flex-direction: column; gap: var(--rp-space-5); }

/* Sticky action bar used on detail pages (mobile) */
.rp-action-bar { display: flex; flex-wrap: wrap; gap: var(--rp-space-2); }

/* ---------- Auth screens ---------- */
.rp-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--rp-surface); }
.rp-auth__panel { display: flex; flex-direction: column; justify-content: center; padding: var(--rp-space-7) var(--rp-space-6); }
.rp-auth__form { width: 100%; max-width: 26rem; margin: 0 auto; }
.rp-auth__form h1 { font-size: var(--rp-fs-2xl); margin-bottom: var(--rp-space-2); }
.rp-auth__form > p { color: var(--rp-text-muted); margin-bottom: var(--rp-space-6); }
.rp-auth__aside {
  background: var(--rp-slate-50);
  border-left: 1px solid var(--rp-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--rp-space-7);
}
.rp-app-admin .rp-auth__aside { background: var(--rp-slate-900); color: #e2e8f0; border-left-color: var(--rp-slate-800); }
.rp-app-admin .rp-auth__aside h2 { color: #fff; }
.rp-app-admin .rp-auth__aside p,
.rp-app-admin .rp-auth__aside li { color: #cbd5e1; }
.rp-auth__aside h2 { font-size: var(--rp-fs-xl); max-width: 26rem; }
.rp-auth__aside ul { list-style: none; padding: 0; margin: var(--rp-space-5) 0 0; display: flex; flex-direction: column; gap: var(--rp-space-3); }
.rp-auth__aside li { display: flex; gap: var(--rp-space-3); color: var(--rp-text-muted); }
.rp-auth__aside li .bi { color: var(--rp-primary); font-size: 1.15rem; }
.rp-app-admin .rp-auth__aside li .bi { color: #93c5fd; }
.rp-auth__footer { font-size: var(--rp-fs-sm); color: var(--rp-text-muted); margin-top: var(--rp-space-6); }

.rp-otp-input { font-size: var(--rp-fs-xl); letter-spacing: 0.35em; font-variant-numeric: tabular-nums; text-align: center; font-weight: var(--rp-fw-semibold); }
.rp-qr { width: 11rem; height: 11rem; border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); padding: var(--rp-space-2); background: #fff; }
.rp-secret { font-family: var(--rp-font-mono); font-size: var(--rp-fs-md); letter-spacing: 0.08em; word-break: break-all; background: var(--rp-surface-muted); border: 1px dashed var(--rp-border-strong); border-radius: var(--rp-radius); padding: var(--rp-space-3) var(--rp-space-4); }
.rp-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rp-space-2); list-style: none; padding: var(--rp-space-4); margin: 0; background: var(--rp-surface-muted); border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); font-family: var(--rp-font-mono); }

.rp-steps-mini { display: flex; gap: var(--rp-space-2); list-style: none; padding: 0; margin: 0 0 var(--rp-space-5); font-size: var(--rp-fs-sm); color: var(--rp-text-muted); }
.rp-steps-mini li { display: flex; align-items: center; gap: var(--rp-space-1); }
.rp-steps-mini li[aria-current="step"] { color: var(--rp-primary); font-weight: var(--rp-fw-semibold); }

/* Wizard stepper (event creation) */
.rp-wizard-steps { list-style: none; display: flex; gap: var(--rp-space-2); padding: 0; margin: 0 0 var(--rp-space-5); counter-reset: step; flex-wrap: wrap; }
.rp-wizard-steps li { display: flex; align-items: center; gap: var(--rp-space-2); font-size: var(--rp-fs-sm); font-weight: var(--rp-fw-medium); color: var(--rp-text-muted); padding-right: var(--rp-space-3); }
.rp-wizard-steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--rp-radius-pill);
  border: 1.5px solid var(--rp-border-strong);
  font-weight: var(--rp-fw-semibold);
  background: var(--rp-surface);
}
.rp-wizard-steps li[aria-current="step"] { color: var(--rp-text); font-weight: var(--rp-fw-semibold); }
.rp-wizard-steps li[aria-current="step"]::before { background: var(--rp-primary); border-color: var(--rp-primary); color: #fff; }
.rp-wizard-steps li.is-complete::before { content: "\2713"; background: var(--rp-success-subtle); border-color: var(--rp-success); color: var(--rp-success-emphasis); }

/* Schedule rule rows */
.rp-rule { border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); padding: var(--rp-space-4); background: var(--rp-surface); }
.rp-weekdays { display: flex; flex-wrap: wrap; gap: var(--rp-space-2); }
.rp-weekdays .btn-check + .btn { min-width: 3.25rem; }
.btn-check:checked + .btn-outline-primary { background: var(--rp-primary); color: #fff; border-color: var(--rp-primary); }
.btn-check:focus-visible + .btn { outline: var(--rp-focus-width) solid var(--rp-focus); outline-offset: var(--rp-focus-offset); }

/* Option cards (radio cards used for pricing type, event type, capacity mode) */
.rp-option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--rp-space-3); }
.rp-option { position: relative; }
.rp-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rp-option label {
  display: flex;
  flex-direction: column;
  gap: var(--rp-space-1);
  height: 100%;
  padding: var(--rp-space-4);
  border: 1.5px solid var(--rp-border-strong);
  border-radius: var(--rp-radius-lg);
  background: var(--rp-surface);
  cursor: pointer;
  transition: border-color var(--rp-dur-fast) var(--rp-ease-out), background-color var(--rp-dur-fast) var(--rp-ease-out), box-shadow var(--rp-dur-fast);
}
.rp-option label strong { display: flex; align-items: center; gap: var(--rp-space-2); }
.rp-option label span { font-size: var(--rp-fs-sm); color: var(--rp-text-muted); }
.rp-option label:hover { border-color: var(--rp-control-border); }
.rp-option input:checked + label { border-color: var(--rp-primary); background: var(--rp-primary-subtle); box-shadow: inset 0 0 0 1px var(--rp-primary); }
.rp-option input:checked + label strong::after { content: "\f26a"; font-family: "bootstrap-icons"; margin-left: auto; color: var(--rp-primary); }
.rp-option input:focus-visible + label { outline: var(--rp-focus-width) solid var(--rp-focus); outline-offset: var(--rp-focus-offset); }

/* Filters: collapsible on phones, always visible ≥768px */
@media (min-width: 768px) {
  .rp-filters.collapse:not(.show) { display: flex; }
}
.rp-filters-toggle { margin: var(--rp-space-4) var(--rp-space-4) 0; }

/* Week calendar (reservations) — each day is a heading + list; agenda-style on phones */
.rp-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--rp-space-2); }
.rp-week__day { background: var(--rp-surface); border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); min-height: 12rem; display: flex; flex-direction: column; }
.rp-week__day.is-today { border-color: var(--rp-primary); box-shadow: inset 0 3px 0 var(--rp-primary); }
.rp-week__head { padding: var(--rp-space-3); border-bottom: 1px solid var(--rp-border); }
.rp-week__head h3 { font-size: var(--rp-fs-sm); margin: 0; }
.rp-week__head p { font-size: var(--rp-fs-xs); color: var(--rp-text-muted); margin: 0; font-weight: var(--rp-fw-medium); }
.rp-week__list { list-style: none; margin: 0; padding: var(--rp-space-2); display: flex; flex-direction: column; gap: var(--rp-space-2); }
.rp-week__item a { display: block; padding: var(--rp-space-2); border-radius: var(--rp-radius); border: 1px solid var(--rp-border); background: var(--rp-surface-muted); text-decoration: none; color: var(--rp-text); font-size: var(--rp-fs-xs); line-height: 1.35; }
.rp-week__item a:hover { border-color: var(--rp-primary); background: var(--rp-primary-subtle); }
.rp-week__item strong { display: block; font-size: var(--rp-fs-sm); }
.rp-week__empty { font-size: var(--rp-fs-xs); color: var(--rp-text-subtle); padding: var(--rp-space-3); }
@media (max-width: 1199.98px) { .rp-week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
  .rp-week { grid-template-columns: 1fr; }
  .rp-week__day { min-height: 0; }
}

/* Location / event cards */
.rp-entity-card h2 { font-size: var(--rp-fs-md); margin: 0; }
.rp-entity-card h2 a { color: var(--rp-text); text-decoration: none; }
.rp-entity-card h2 a:hover { color: var(--rp-primary); text-decoration: underline; }
.rp-entity-card__facts { display: flex; flex-wrap: wrap; gap: var(--rp-space-2) var(--rp-space-5); list-style: none; padding: 0; margin: var(--rp-space-3) 0; font-size: var(--rp-fs-sm); color: var(--rp-text-muted); }
.rp-entity-card__facts li { display: inline-flex; gap: var(--rp-space-2); align-items: center; }
.rp-link-field { display: flex; gap: var(--rp-space-2); align-items: stretch; flex-wrap: wrap; }
.rp-link-field .form-control { flex: 1 1 16rem; font-family: var(--rp-font-mono); font-size: var(--rp-fs-sm); }
