/*
 * custom-theme/style.css
 * Loaded AFTER mrbs.css and bootstrap.min.css, so these rules win.
 */

/* ── Layout ─────────────────────────────────────────────────────────────── */

body {
  padding-top: 4.5rem;   /* clear the fixed-top navbar */
  background-color: #f5f5f5;
}

/* Main content container */
#container {
  text-align: left;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Footer */
.footer {
  background-color: #fff;
}

/* ── Navbar tweaks ───────────────────────────────────────────────────────── */

.navbar-brand .fw-semibold {
  font-size: 0.85rem;
}

/* Header forms (goto-date, search, logon/off) styled by patch.js;
   give them some breathing room */
#header_goto_date,
#header_search,
#header_logonoff,
#show_my_entries {
  display: flex;
  align-items: center;
  margin: 0.25rem 0.25rem;
}

#header_goto_date input[type="date"],
#header_search input[type="search"] {
  min-width: 9rem;
  max-width: 12rem;
}

/* outstanding / pending notification badge */
a.notification {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0 0.4rem;
}

a.notification.attention {
  background: darkorange;
  color: #fff;
}

/* ── Calendar main table ─────────────────────────────────────────────────── */

.index #container {
  width: 100%;
  overflow: auto;          /* was hidden — that clipped the flatpickr year widget */
  display: flex;
  max-width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Mini-calendars in the left sidebar — hidden to match modern-theme.
   !important needed to beat MRBS's own mrbs.css specificity. */
.minicalendars {
  display: none !important;
}

.table {
  table-layout: fixed;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  width: 100%;
}

td, th {
  vertical-align: middle;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

.standard {
  float: none;
  margin-top: 2em;
}

div.datatable_container {
  float: none;
}

div#area_form,
div#room_form {
  float: none;
}

#room_form form {
  width: 100%;
  padding: 0 0 2em 0;
}

.areaChangeForm {
  width: 100%;
}

.areaChangeForm div {
  width: 100%;
}

.selection {
  width: 100%;
  height: 100%;
}

.select2-container {
  width: 100%;
}

/* repeat / booking controls fieldsets: remove default border */
div#rep_type div.long {
  border: none;
}

fieldset#rep_info,
fieldset#booking_controls {
  border: none;
}

div#checks {
  display: none;
}

/* ── View entry ──────────────────────────────────────────────────────────── */

.view_entry #registrant_list {
  padding-left: 0;
}

.view_entry #registration .standard fieldset > div > label {
  display: none;
}

/* ── Misc Bootstrap utility fixes ───────────────────────────────────────── */

/* Bootstrap 5 dropped .ml-* / .mr-* – keep them working for patch.js output */
.mr-2, .mx-2 { margin-right: 0.5rem !important; }
.ml-2, .mx-2 { margin-left:  0.5rem !important; }

.js_none {
  display: none;
}

select::-ms-expand {
  display: none;
}

button.btn:disabled {
  pointer-events: auto !important;
  cursor: not-allowed;
}

/* QR code SVG in kiosk mode */
.qr-code svg {
  width: 80px;
  height: 80px;
}

/* ── Login page ──────────────────────────────────────────────────────────── */

.form-signin {
  width: 100%;
  max-width: 360px;
  padding: 1rem;
  margin: auto;
}

.form-signin .form-control {
  position: relative;
  box-sizing: border-box;
  height: auto;
  padding: 10px;
  font-size: 16px;
}

.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.form-label::after,
.form-check::after {
  display: none;
}

/* ── Print ───────────────────────────────────────────────────────────────── */

@media print {
  body { padding-top: 0; }
  #header_navbar, .footer { display: none; }
}
