@media (hover: none) {
  [title] {
    position: relative;
    display: inline-flex;
    justify-content: center;
  }
  [title]:focus::after {
    content: attr(title);
    position: absolute;
    top: -2px;
    color: #000;
    background-color: #fff;
    border: 1px solid;
    width: fit-content;
    padding: 3px;
  }
}

html, body {
  min-height: 100vh;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Keep main content within the viewport; breakout layouts opt in on md+ only */
.towapp-main-wrap {
  max-width: 100%;
  overflow-x: clip;
}

@media (max-width: 767.98px) {
  .container-fluid {
    --bs-gutter-x: 1rem;
  }

  .wpx-200,
  .wpx-250,
  .wpx-300,
  .wpx-400 {
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
  }

  .searchable-select-dropdown {
    max-width: 100%;
    width: 100%;
  }
}

.image-thumb {
  border: 1px solid #c0c0c0;
  border-radius: 4px;
  padding: 5px;
  margin-right:4px;
  height:85px;
  width: 130px;
  object-fit:scale-down;
}

/* not used may delete later */
#gradred {
/*  background: linear-gradient(to right, rgba(255,0,0,1), rgba(255,0,0,0) 2%);
  height: 120px; */
  background: red;
}

.status {
  width: 7px !important;
  max-width: 7px !important;
  min-width: 7px !important;
  padding: 0;
}

.nowrap {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.wpx-50 {
  min-width:50px!important;
}
.wpx-200 {
  min-width:200px!important;
}
.wpx-250 {
  min-width:250px!important;
}
.wpx-300 {
  min-width:300px!important;
}
.wpx-400 {
  width:400px!important;
  min-width:400px!important;
  max-width:400px!important;
}

.font14 {
  font-size: 14px !important;
}
.font13 {
  font-size: 13px !important;
}
.font12 {
  font-size: 12px !important;
}
.font11 {
  font-size: 11px !important;
}
.font10 {
  font-size: 10px !important;
}
.font9 {
  font-size: 9px !important;
}

.btn, .form-control {
  border-radius: 0;
}

/* Dropdown arrows for all select elements (native selects) - theme uses appearance:none which removes native arrow */
select.form-control:not([multiple]):not([size]) {
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 16px 12px;
}
[data-theme="dark"] select.form-control:not([multiple]):not([size]) {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23adb5bd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Activity history / audit log expandable change rows */
.activity-history-expand {
  width: 1.75rem;
  height: 1.75rem;
  line-height: 1;
  color: inherit;
  text-decoration: none;
}
.activity-history-expand:hover,
.activity-history-expand:focus {
  color: inherit;
  text-decoration: none;
}
.activity-history-detail td {
  background: rgba(var(--bs-secondary-rgb, 108, 117, 125), 0.08);
}
.activity-history-detail code {
  color: inherit;
}

.bg-custom {
  background-color: #dddddd;
}

input[type="text"][readonly] {
  color: #777777; /* Text color for readonly input */
  background-color: #f3f3f3; /* Light grey background for readonly */
  outline: none;
}

.custom-col {
  flex: 0 0 12.5%; /* Each column takes up 12.5% of the row */
  max-width: 12.5%;
}

.navbar-search-form {
  margin-right: 1rem;
}

/* Collapsed hamburger menu: scroll when items exceed the viewport */
@media (max-width: 991.98px) {
  .top-navbar-wrap .navbar-collapse.show,
  .top-navbar-wrap .navbar-collapse.collapsing {
    max-height: calc(100dvh - 3.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

/* Navbar dropdown menus - limit height and add scroll to prevent extending beyond viewport */
.navbar-nav .dropdown-menu {
  max-height: 70vh;
  overflow-y: auto;
}

/* Searchable-select dropdown (e.g. Account field) - match native select (e.g. Color) styling.
   Max-height and position are set dynamically in JS to fit viewport space. */
.searchable-select-dropdown {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  border-radius: 0;
  border: 1px solid #000000;
  box-shadow: none;
  min-width: 100%;
  width: max-content;
}
[data-theme="light"] .searchable-select-dropdown {
  background-color: #fff;
  border-color: #ced4da;
}
[data-theme="light"] .searchable-select-dropdown .dropdown-item {
  color: #212529;
}
[data-theme="light"] .searchable-select-dropdown .dropdown-item:hover,
[data-theme="light"] .searchable-select-dropdown .dropdown-item:focus,
[data-theme="light"] .searchable-select-dropdown .dropdown-item.active {
  background-color: #e9ecef;
  color: #212529;
}
[data-theme="dark"] .searchable-select-dropdown {
  background-color: #2b2a33;
  color: #eeeeee;
}
[data-theme="dark"] .searchable-select-dropdown .dropdown-item {
  color: #eeeeee;
  padding: 0.25rem 0.5rem;
}
[data-theme="dark"] .searchable-select-dropdown .dropdown-item:hover,
[data-theme="dark"] .searchable-select-dropdown .dropdown-item:focus,
[data-theme="dark"] .searchable-select-dropdown .dropdown-item.active {
  background-color: #3a3f44;
  color: #eeeeee;
}
.searchable-select-dropdown .dropdown-item {
  padding: 0.25rem 0.5rem;
  font-size: 13px;
  font-family: inherit;
  white-space: nowrap;
}
/* When more space above than below, show dropdown above the input */
.searchable-select-wrapper.searchable-select-dropup .searchable-select-dropdown {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 0.125rem;
}

/* Vehicle Make/Model autocomplete dropdown - match Color dropdown styling.
   Max-height is set dynamically in JS to fit viewport space. */
.vehicle-autocomplete-dropdown {
  overflow-y: auto;
  padding: 0;
  border-radius: 0;
  border: 1px solid #000000;
  box-shadow: none;
  -webkit-overflow-scrolling: touch;
}
[data-theme="light"] .vehicle-autocomplete-dropdown {
  background-color: #fff;
  border-color: #ced4da;
}
[data-theme="dark"] .vehicle-autocomplete-dropdown {
  background-color: #2b2a33;
}
.vehicle-autocomplete-dropdown-item {
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .vehicle-autocomplete-dropdown-item {
  color: #212529;
}
[data-theme="light"] .vehicle-autocomplete-dropdown-item:hover {
  background-color: #e9ecef;
}
[data-theme="light"] .vehicle-autocomplete-dropdown-item.active {
  background-color: #e9ecef;
}
[data-theme="dark"] .vehicle-autocomplete-dropdown-item {
  color: #eeeeee;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .vehicle-autocomplete-dropdown-item:hover {
  background-color: #3a3f44;
}
[data-theme="dark"] .vehicle-autocomplete-dropdown-item.active {
  background-color: #3a3f44;
}
.vehicle-autocomplete-dropdown-empty {
  color: #6c757d;
}
[data-theme="dark"] .vehicle-autocomplete-dropdown-empty {
  color: #adb5bd;
}

/* Searchable-select: match native select appearance while keeping search functionality */
.searchable-select-wrapper {
  display: block;
}
.searchable-select-wrapper .searchable-select-input {
  cursor: pointer;
  padding-right: 2rem;
}
.searchable-select-wrapper .searchable-select-input:focus {
  cursor: text;
}
.searchable-select-wrapper::after {
  content: '';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  pointer-events: none;
  opacity: 0.7;
}

@media (max-width: 991.98px) {
  .navbar-search-form {
    margin-right: 0;
  }
}

.image-add-tile {
  border: 2px dashed #999;
  border-radius: 4px;
  margin-right:4px;
  height:85px;
  width:130px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#888;
  font-size:2rem;
  background-color:transparent;
  cursor:pointer;
  user-select:none;
}
.image-add-tile.disabled {
  cursor:not-allowed;
  opacity:0.6;
}
.image-add-tile-icon {
  width: 1em;
  height: 1em;
  display: block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
}

.image-thumb-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 4px;
}
.image-thumb-delete {
  position: absolute !important;
  bottom: 2px;
  right: 6px;
  width: 22px !important;
  height: 22px !important;
  padding: 0;
  padding-top: 1px !important;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: rgba(255,255,255,0.6);
  color: #dc3545 !important;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 2;
  box-sizing: border-box;
}
.image-thumb-delete:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Theme-aware checkboxes */
.form-check-input[type="checkbox"],
.swal2-checkbox input[type="checkbox"] {
  border-radius: 0.25em;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.swal2-checkbox input[type="checkbox"] {
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

[data-theme="light"] .form-check-input[type="checkbox"],
[data-theme="light"] .swal2-checkbox input[type="checkbox"] {
  background-color: #fff;
  border: 1px solid #adb5bd;
}

[data-theme="light"] .form-check-input[type="checkbox"]:checked,
[data-theme="light"] .swal2-checkbox input[type="checkbox"]:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

[data-theme="light"] .form-check-input[type="checkbox"]:indeterminate {
  background-color: #0d6efd;
  border-color: #0d6efd;
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

[data-theme="dark"] .form-check-input[type="checkbox"],
[data-theme="dark"] .swal2-checkbox input[type="checkbox"] {
  background-color: #2d3035;
  border: 1px solid #adb5bd;
}

[data-theme="dark"] .form-check-input[type="checkbox"]:checked,
[data-theme="dark"] .swal2-checkbox input[type="checkbox"]:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

[data-theme="dark"] .form-check-input[type="checkbox"]:indeterminate {
  background-color: #0d6efd;
  border-color: #0d6efd;
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

/* Radio buttons: open circle with a centered dot when selected (overrides theme ring/fill styles) */
.form-check-input[type="radio"],
.swal2-radio input[type="radio"] {
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.swal2-radio input[type="radio"] {
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

[data-theme="light"] .form-check-input[type="radio"],
[data-theme="light"] .swal2-radio input[type="radio"] {
  background-color: #fff;
  border: 1px solid #adb5bd;
}

[data-theme="light"] .form-check-input[type="radio"]:checked,
[data-theme="light"] .swal2-radio input[type="radio"]:checked {
  background-color: #fff;
  border-color: #0d6efd;
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='1.5' fill='%230d6efd'/%3e%3c/svg%3e");
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='1.5' fill='%230d6efd'/%3e%3c/svg%3e");
}

[data-theme="dark"] .form-check-input[type="radio"],
[data-theme="dark"] .swal2-radio input[type="radio"] {
  background-color: #2d3035;
  border: 1px solid #6c757d;
}

[data-theme="dark"] .form-check-input[type="radio"]:checked,
[data-theme="dark"] .swal2-radio input[type="radio"]:checked {
  background-color: #2d3035;
  border-color: #dee2e6;
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='1.5' fill='%23f0f0f0'/%3e%3c/svg%3e");
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='1.5' fill='%23f0f0f0'/%3e%3c/svg%3e");
}

/* VIN verification status (vin-verify.js) — icon beside field label title */
.vin-verify-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  max-width: 100%;
}
.vin-verify-status {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.vin-verify-expected {
  font-size: 0.85em;
  line-height: 1.2;
  pointer-events: none;
}
.vin-verify-icon {
  width: 1.125rem;
  height: 1.125rem;
  pointer-events: none;
}
.vin-verify-status--valid {
  color: var(--bs-success, #198754);
}
.vin-verify-status--invalid {
  color: var(--bs-danger, #dc3545);
  pointer-events: auto;
  cursor: help;
}
.vin-verify-status--apply-suggestion {
  cursor: pointer;
}
.vin-verify-status--apply-suggestion:hover,
.vin-verify-status--apply-suggestion:focus {
  opacity: 0.85;
  outline: 1px dotted currentColor;
  outline-offset: 2px;
}
.vin-verify-status--empty-suggestion {
  /* Muted vs body text; follows active Bootswatch / light-dark body colors */
  color: color-mix(
    in srgb,
    var(--bs-body-color, currentColor) 72%,
    var(--bs-body-bg, transparent)
  );
  pointer-events: auto;
}
@supports not (color: color-mix(in srgb, red, blue)) {
  .vin-verify-status--empty-suggestion {
    color: var(--bs-gray-500, #adb5bd);
  }
}
.vin-verify-status--empty-suggestion.vin-verify-status--apply-suggestion {
  cursor: pointer;
}

/* 17-cell VIN field (vin-segmented.js) — --vin-slot set in JS = wrap width / 17 */
.vin-segmented-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.vin-segmented-cells {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: calc(1.5em + 0.5rem + 2px);
  pointer-events: none;
  user-select: none;
  border: 1px solid var(--vin-segmented-outer-border, var(--bs-border-color, #ced4da));
  border-radius: var(--bs-border-radius-sm, 0.2rem);
  --vin-segmented-model-year-edge: rgba(13, 110, 253, 0.45);
  background-color: var(--bs-body-bg, #fff);
  background-image: repeating-linear-gradient(
    to right,
    transparent,
    transparent calc(var(--vin-slot, 1px) - 1px),
    var(--vin-segmented-inner-line, var(--bs-border-color, #ced4da)) calc(var(--vin-slot, 1px) - 1px),
    var(--vin-segmented-inner-line, var(--bs-border-color, #ced4da)) var(--vin-slot, 1px)
  );
}
/* 10th VIN position (model year code) — slot index 9 */
.vin-segmented-cells::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--vin-slot, 0px) * 9);
  width: var(--vin-slot, 0px);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--vin-segmented-model-year-edge);
  pointer-events: none;
  z-index: 0;
}
.vin-segmented-char-probe,
.vin-segmented-color-probe {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  white-space: pre;
  left: 0;
  top: 0;
}
.vin-segmented-display {
  position: absolute;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(17, var(--vin-slot, 1fr));
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
}
.vin-segmented-display > span {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  line-height: 1;
  color: var(--vin-segmented-text-color, inherit);
}
.vin-segmented-caret {
  position: absolute;
  z-index: 3;
  width: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: var(--vin-segmented-text-color, currentColor);
  pointer-events: none;
  display: none;
}
.vin-segmented-wrap .vin-segmented-input {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: left;
  text-indent: 0;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.vin-segmented-wrap .vin-segmented-input::selection {
  background: transparent;
  color: transparent;
}
.vin-segmented-wrap .vin-segmented-input::-moz-selection {
  background: transparent;
  color: transparent;
}
.vin-segmented-wrap .vin-segmented-input:focus {
  box-shadow: none;
}
/* Released-call readonly/disabled rules paint form controls opaque; keep overlay clear so slot 9 tint shows. */
.vin-segmented-wrap .vin-segmented-input[readonly],
.vin-segmented-wrap .vin-segmented-input:disabled,
.vin-segmented-wrap .vin-segmented-input.call-form-locked-readonly,
form.mainform.call-form-locked .vin-segmented-wrap .vin-segmented-input.call-form-locked-readonly {
  background-color: transparent !important;
  background: transparent !important;
}
/* Match theme .form-control:focus (blackblue1 light / slate dark) */
.vin-segmented-wrap:focus-within .vin-segmented-cells {
  border-color: #95cfeb;
}
.vin-segmented-wrap:focus-within .vin-segmented-input {
  outline: 0;
}
.vin-segmented-wrap:focus-within {
  box-shadow: 0 0 0 0.25rem rgba(42, 159, 214, 0.25);
  border-radius: var(--bs-border-radius-sm, 0.2rem);
}
[data-theme="dark"] .vin-segmented-cells {
  --vin-segmented-outer-border: rgba(255, 255, 255, 0.14);
  --vin-segmented-inner-line: rgba(255, 255, 255, 0.07);
  --vin-segmented-model-year-edge: rgba(147, 197, 253, 0.35);
  background-color: var(--bs-body-bg, #212529);
}
[data-theme="dark"] .vin-segmented-wrap:focus-within .vin-segmented-cells {
  border-color: #9d9fa2;
  --vin-segmented-inner-line: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .vin-segmented-wrap:focus-within {
  box-shadow: 0 0 0 0.25rem rgba(58, 63, 68, 0.25);
}

/* Dispatch board ID column (rows loaded via AJAX; styles must live in global CSS) */
#dispatch-table .call-id .id-number {
  line-height: 1.2;
  white-space: nowrap;
}

/* Live map page: map fills viewport below nav; page does not scroll */
body.tow-live-map-body {
  height: 100vh;
  overflow: hidden;
}

/* Wrapper carries a 1rem top margin (mt-3), so full viewport height would push its bottom edge past the clipped body */
body.tow-live-map-body .towapp-main-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100% - 1rem);
  max-height: calc(100vh - 1rem);
  min-height: 0;
  overflow: hidden;
}

body.tow-live-map-body .tow-live-map-page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0.25rem;
}

body.tow-live-map-body .tow-live-map-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  overflow: hidden;
}

body.tow-live-map-body .tow-live-map-map-col {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

body.tow-live-map-body .tow-live-map-map-wrap {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

body.tow-live-map-body .tow-live-map-map-wrap #live-map-container {
  grid-area: 1 / 1;
  min-height: 0;
  width: 100%;
  height: 100%;
}

body.tow-live-map-body .tow-live-map-driver-list-anchor {
  align-self: start;
  grid-area: 1 / 1;
  justify-self: start;
  margin: 10px 0 0 10px;
  max-width: min(100% - 20px, 16rem);
  pointer-events: none;
  position: relative;
  z-index: 10;
}

body.tow-live-map-body .tow-live-map-driver-list {
  max-height: min(50vh, 22rem);
  overflow: hidden;
  pointer-events: auto;
  width: 100%;
}

body.tow-live-map-body .tow-live-map-driver-list .card-body {
  display: flex;
  flex-direction: column;
  max-height: min(50vh, 22rem);
  min-height: 0;
}

body.tow-live-map-body .tow-live-map-driver-list-items {
  flex: 1 1 auto;
  max-height: min(42vh, 16rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.tow-live-map-body .tow-live-map-driver-list-item {
  align-items: center;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem;
}

body.tow-live-map-body .tow-live-map-driver-list-item:hover,
body.tow-live-map-body .tow-live-map-driver-list-item:focus {
  background: rgba(13, 110, 253, 0.12);
  outline: none;
}

body.tow-live-map-body .tow-live-map-driver-list-item.is-selected {
  background: rgba(13, 110, 253, 0.18);
  font-weight: 600;
}

body.tow-live-map-body .tow-live-map-driver-status-dot {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  flex: 0 0 auto;
  height: 10px;
  width: 10px;
}

body.tow-live-map-body .tow-live-map-driver-list-name {
  flex: 1 1 auto;
  font-size: 0.8125rem;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tow-live-map-body .tow-live-map-focus-halo {
  border: 3px solid #0d6efd;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 2px 12px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 5;
}

body.tow-live-map-body .tow-live-map-controls-anchor {
  align-self: start;
  grid-area: 1 / 1;
  justify-self: end;
  margin: 10px 75px 0 0;
  pointer-events: none;
  position: relative;
  z-index: 10;
}

body.tow-live-map-body .tow-live-map-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.875rem;
  gap: 0.75rem;
  line-height: 1.5;
  padding: 5px 10px;
  pointer-events: auto;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

body.tow-live-map-body .tow-live-map-controls .form-check {
  margin-bottom: 0;
  min-height: 0;
  white-space: nowrap;
}

body.tow-live-map-body .tow-live-map-controls .form-check-label {
  font-size: inherit;
  line-height: inherit;
  white-space: nowrap;
}

body.tow-live-map-body .tow-live-map-controls .form-check-input[type="checkbox"] {
  background-color: #fff;
  border: 1px solid #adb5bd;
}

body.tow-live-map-body .tow-live-map-controls .form-check-input[type="checkbox"]:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

body.tow-live-map-body .tow-live-map-marker-label {
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  max-width: 140px;
  overflow: hidden;
  padding: 2px 6px;
  pointer-events: none;
  position: absolute;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  user-select: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

body.tow-live-map-body .tow-live-map-replay-sidebar {
  align-self: flex-end;
  flex: 0 1 auto;
  margin-bottom: 0;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  transition: width 0.28s ease;
  width: 100%;
}

body.tow-live-map-body .tow-live-map-replay-sidebar:not(.is-collapsed) {
  max-height: min(42vh, 100%);
}

body.tow-live-map-body .tow-live-map-replay-shell {
  align-items: flex-start;
  background-color: var(--bs-card-bg, #282828);
  display: flex;
  flex-direction: row;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

body.tow-live-map-body .tow-live-map-replay-toggle-bar {
  align-items: center;
  align-self: center;
  border-right: 1px solid #000;
  display: flex;
  flex: 0 0 0.85rem;
  height: 2rem;
  justify-content: center;
  min-width: 0.85rem;
}

body.tow-live-map-body .tow-live-map-replay-toggle {
  align-items: center;
  align-self: auto;
  background-color: var(--bs-primary, #2a9fd6);
  border: 0;
  border-radius: 0;
  color: var(--bs-white, #fff);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--bs-font-monospace, monospace);
  font-size: 0.5rem;
  font-weight: 700;
  height: 2rem;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  min-height: 0;
  min-width: 0;
  padding: 0;
  width: 100%;
  z-index: 1;
}

body.tow-live-map-body .tow-live-map-replay-toggle:hover,
body.tow-live-map-body .tow-live-map-replay-toggle:focus,
body.tow-live-map-body .tow-live-map-replay-toggle:active,
body.tow-live-map-body .tow-live-map-replay-toggle:focus-visible {
  background-color: var(--bs-primary, #2a9fd6);
  box-shadow: none;
  color: var(--bs-white, #fff);
  filter: none;
  outline: none;
}

body.tow-live-map-body .tow-live-map-replay-toggle-glyph {
  white-space: nowrap;
}

body.tow-live-map-body .tow-live-map-replay-toggle-glyph::before {
  content: '[-]';
}

body.tow-live-map-body .tow-live-map-replay-sidebar.is-collapsed .tow-live-map-replay-toggle-glyph::before {
  content: '[+]';
}

body.tow-live-map-body .tow-live-map-replay-panel {
  align-self: stretch;
  flex: 1 1 auto;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  opacity: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
  scrollbar-color: var(--bs-gray-500, #888) var(--bs-gray-800, #222);
  scrollbar-width: thin;
  transition:
    max-width 0.28s ease,
    opacity 0.22s ease,
    flex-basis 0.28s ease;
  -webkit-overflow-scrolling: touch;
}

body.tow-live-map-body .tow-live-map-replay-panel::-webkit-scrollbar {
  width: 4px;
}

body.tow-live-map-body .tow-live-map-replay-panel::-webkit-scrollbar-track {
  background: var(--bs-gray-800, #222);
}

body.tow-live-map-body .tow-live-map-replay-panel::-webkit-scrollbar-thumb {
  background-color: var(--bs-gray-500, #888);
  border-radius: 4px;
}

body.tow-live-map-body .tow-live-map-replay-panel::-webkit-scrollbar-thumb:hover {
  background-color: var(--bs-primary, #2a9fd6);
}

body.tow-live-map-body .tow-live-map-replay-sidebar.is-collapsed .tow-live-map-replay-panel {
  flex-basis: 0;
  max-height: 0;
  max-width: 0;
  min-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

body.tow-live-map-body .tow-live-map-replay-sidebar.is-collapsed {
  align-self: center;
  width: 0.85rem;
}

body.tow-live-map-body .tow-live-map-replay-sidebar.is-collapsed .tow-live-map-replay-shell {
  height: 2rem;
  max-height: 2rem;
  min-height: 2rem;
}

body.tow-live-map-body .tow-live-map-replay-sidebar:not(.is-collapsed) .tow-live-map-replay-shell {
  height: 100%;
  max-height: 100%;
  min-height: 0;
}

body.tow-live-map-body .tow-live-map-replay-sidebar:not(.is-collapsed) .tow-live-map-replay-panel {
  flex-basis: auto;
  max-height: min(42vh, 100%);
  max-width: 100%;
  opacity: 1;
  overflow-x: hidden;
  overflow-y: auto;
  pointer-events: auto;
}

body.tow-live-map-body .tow-live-map-replay-info {
  font-size: 0.65rem;
  line-height: 1.35;
}

body.tow-live-map-body .tow-live-map-replay-transport {
  align-items: center;
  display: flex;
  gap: 0.7rem;
}

body.tow-live-map-body .tow-live-map-replay-play-btn {
  align-items: center;
  background: var(--bs-gray-700, #282828);
  border: 1px solid var(--bs-gray-500, #888);
  border-radius: var(--bs-border-radius-sm, 0.25rem);
  color: var(--bs-white, #fff);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 1.75rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 1.75rem;
}

body.tow-live-map-body .tow-live-map-replay-play-btn:hover,
body.tow-live-map-body .tow-live-map-replay-play-btn:focus,
body.tow-live-map-body .tow-live-map-replay-play-btn:focus-visible {
  background: var(--bs-gray-600, #555);
  border-color: var(--bs-primary, #2a9fd6);
  box-shadow: none;
  color: var(--bs-white, #fff);
  outline: none;
}

body.tow-live-map-body .tow-live-map-replay-play-btn.is-playing {
  background: var(--bs-primary, #2a9fd6);
  border-color: var(--bs-primary, #2a9fd6);
  color: var(--bs-white, #fff);
}

body[data-theme="light"].tow-live-map-body .tow-live-map-replay-play-btn,
body.tow-live-map-body[data-theme="light"] .tow-live-map-replay-play-btn {
  background: var(--bs-white, #fff);
  border-color: var(--bs-primary, #2a9fd6);
  color: var(--bs-primary, #2a9fd6);
}

body[data-theme="light"].tow-live-map-body .tow-live-map-replay-play-btn:hover,
body[data-theme="light"].tow-live-map-body .tow-live-map-replay-play-btn:focus,
body[data-theme="light"].tow-live-map-body .tow-live-map-replay-play-btn:focus-visible,
body.tow-live-map-body[data-theme="light"] .tow-live-map-replay-play-btn:hover,
body.tow-live-map-body[data-theme="light"] .tow-live-map-replay-play-btn:focus,
body.tow-live-map-body[data-theme="light"] .tow-live-map-replay-play-btn:focus-visible {
  background: rgba(var(--bs-primary-rgb, 42, 159, 214), 0.12);
  border-color: var(--bs-primary, #2a9fd6);
  color: var(--bs-link-hover-color, #227fab);
}

body[data-theme="light"].tow-live-map-body .tow-live-map-replay-play-btn.is-playing,
body.tow-live-map-body[data-theme="light"] .tow-live-map-replay-play-btn.is-playing {
  background: var(--bs-primary, #2a9fd6);
  border-color: var(--bs-primary, #2a9fd6);
  color: var(--bs-white, #fff);
}

body.tow-live-map-body .tow-live-map-replay-scrub-wrap {
  flex: 1 1 auto;
  margin-top: 4px;
  min-width: 0;
}

body.tow-live-map-body #replay-playback .tow-live-map-replay-range {
  accent-color: var(--bs-primary, #2a9fd6);
  background-color: transparent;
}

body.tow-live-map-body #replay-playback .tow-live-map-replay-range::-webkit-slider-runnable-track {
  background-color: var(--bs-gray-600, #555);
  border: 1px solid var(--bs-gray-500, #888);
  border-radius: 1rem;
  height: 0.5rem;
}

body.tow-live-map-body #replay-playback .tow-live-map-replay-range::-moz-range-track {
  background-color: var(--bs-gray-600, #555);
  border: 1px solid var(--bs-gray-500, #888);
  border-radius: 1rem;
  height: 0.5rem;
}

body.tow-live-map-body #replay-playback .tow-live-map-replay-range::-webkit-slider-thumb {
  background-color: var(--bs-primary, #2a9fd6);
  border: 2px solid var(--bs-white, #fff);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
  height: 1rem;
  margin-top: -0.3rem;
  width: 1rem;
}

body.tow-live-map-body #replay-playback .tow-live-map-replay-range::-moz-range-thumb {
  background-color: var(--bs-primary, #2a9fd6);
  border: 2px solid var(--bs-white, #fff);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
  height: 1rem;
  width: 1rem;
}

body.tow-live-map-body #replay-playback .tow-live-map-replay-range:active::-webkit-slider-thumb {
  background-color: #bfe2f3;
}

body.tow-live-map-body #replay-playback .tow-live-map-replay-range:active::-moz-range-thumb {
  background-color: #bfe2f3;
}

body.tow-live-map-body #replay-playback .tow-live-map-replay-range:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px var(--bs-body-bg, #060606), 0 0 0 0.25rem rgba(var(--bs-primary-rgb, 42, 159, 214), 0.45);
}

body.tow-live-map-body #replay-playback .tow-live-map-replay-range:focus::-moz-range-thumb {
  box-shadow: 0 0 0 1px var(--bs-body-bg, #060606), 0 0 0 0.25rem rgba(var(--bs-primary-rgb, 42, 159, 214), 0.45);
}

body.tow-live-map-body .tow-replay-activity-calendar {
  border: 1px solid var(--bs-gray-600, #555);
  border-radius: var(--bs-border-radius, 0.375rem);
  padding: 0.35rem;
  background: var(--bs-gray-800, #222);
  overflow: hidden;
  position: relative;
}

body.tow-live-map-body .tow-replay-activity-calendar.is-disabled {
  opacity: 0.65;
  pointer-events: none;
}

body.tow-live-map-body .tow-replay-calendar-loading {
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  border-radius: inherit;
  display: none;
  inset: 0;
  justify-content: center;
  pointer-events: auto;
  position: absolute;
  z-index: 1;
}

body.tow-live-map-body .tow-replay-activity-calendar.is-loading {
  opacity: 1;
  pointer-events: auto;
}

body.tow-live-map-body .tow-replay-activity-calendar.is-loading .tow-replay-calendar-loading {
  display: flex;
}

body.tow-live-map-body .tow-replay-calendar-loading .spinner-border {
  color: var(--bs-primary, #2a9fd6);
}

body.tow-live-map-body .tow-replay-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

body.tow-live-map-body .tow-replay-calendar-nav-btn {
  border: 0;
  background: transparent;
  color: var(--bs-body-color, #adafae);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.1rem 0.35rem;
  border-radius: 0.2rem;
}

body.tow-live-map-body .tow-replay-calendar-nav-btn:disabled {
  color: var(--bs-gray-600, #555);
}

body.tow-live-map-body .tow-replay-calendar-weekdays,
body.tow-live-map-body .tow-replay-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
}

body.tow-live-map-body .tow-replay-calendar-weekdays {
  color: var(--bs-gray-400, #adafae);
  margin-bottom: 0.15rem;
  text-align: center;
}

body.tow-live-map-body .tow-replay-calendar-day {
  border: 0;
  background: transparent;
  color: var(--bs-body-color, #adafae);
  font-size: 0.75rem;
  line-height: 1.6;
  padding: 0;
  text-align: center;
  border-radius: 0.2rem;
  min-height: 1.6rem;
}

body.tow-live-map-body .tow-replay-calendar-day.is-empty {
  visibility: hidden;
}

body.tow-live-map-body .tow-replay-calendar-day.is-disabled,
body.tow-live-map-body .tow-replay-calendar-day.is-inactive {
  color: var(--bs-gray-600, #555);
  cursor: default;
}

body.tow-live-map-body .tow-replay-calendar-day.is-active {
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background-color: rgba(42, 159, 214, 0.5);
  box-shadow: inset 0 0 0 1px rgba(42, 159, 214, 0.92);
}

body.tow-live-map-body .tow-replay-calendar-day.is-active:hover {
  background-color: rgba(42, 159, 214, 0.62);
  color: #fff;
}

body.tow-live-map-body[data-theme="light"] .tow-replay-calendar-day.is-active {
  color: #15658a;
  background-color: rgba(42, 159, 214, 0.28);
  box-shadow: inset 0 0 0 1px rgba(42, 159, 214, 0.62);
}

body.tow-live-map-body[data-theme="light"] .tow-replay-calendar-day.is-active:hover {
  background-color: rgba(42, 159, 214, 0.4);
  color: #0f4d6a;
}

/* Selected day — transparent green (overrides active blue) */
body.tow-live-map-body .tow-replay-calendar-day.is-selected {
  color: #fff;
  background-color: rgba(119, 179, 0, 0.42);
  box-shadow: inset 0 0 0 1px rgba(119, 179, 0, 0.88);
}

body.tow-live-map-body .tow-replay-calendar-day.is-selected:hover {
  background-color: rgba(119, 179, 0, 0.55);
  color: #fff;
}

body.tow-live-map-body[data-theme="light"] .tow-replay-calendar-day.is-selected {
  color: #3d5c00;
  background-color: rgba(119, 179, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(119, 179, 0, 0.55);
}

body.tow-live-map-body[data-theme="light"] .tow-replay-calendar-day.is-selected:hover {
  background-color: rgba(119, 179, 0, 0.4);
  color: #3d5c00;
}

body.tow-live-map-body .tow-replay-calendar-day.is-active.is-data-only {
  font-weight: 400;
  background-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(42, 159, 214, 0.72);
  color: rgba(42, 159, 214, 0.95);
}

body.tow-live-map-body .tow-replay-calendar-day.is-active.is-data-only:hover {
  background-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(42, 159, 214, 0.92);
  color: #fff;
}

body.tow-live-map-body[data-theme="light"] .tow-replay-calendar-day.is-active.is-data-only {
  color: #15658a;
  background-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(42, 159, 214, 0.62);
}

body.tow-live-map-body[data-theme="light"] .tow-replay-calendar-day.is-active.is-data-only:hover {
  background-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(42, 159, 214, 0.85);
  color: #0f4d6a;
}

body.tow-live-map-body .tow-replay-window-list {
  border: 1px solid var(--bs-gray-600, #555);
  border-radius: var(--bs-border-radius, 0.375rem);
  max-height: 10rem;
  overflow-y: auto;
  padding: 0.25rem;
  background: var(--bs-gray-800, #222);
}

body.tow-live-map-body .tow-replay-window-list.is-disabled {
  opacity: 0.65;
  pointer-events: none;
}

body.tow-live-map-body .tow-replay-window-option {
  border: 0;
  background: transparent;
  color: var(--bs-body-color, #adafae);
  display: block;
  font-size: 0.75rem;
  line-height: 1.35;
  padding: 0.3rem 0.4rem;
  text-align: left;
  width: 100%;
  border-radius: 0.2rem;
}

body.tow-live-map-body .tow-replay-window-option.is-has-movement {
  font-weight: 700;
}

body.tow-live-map-body .tow-replay-window-list.is-all-hours .tow-replay-window-option.is-has-movement {
  background-color: rgba(251, 188, 4, 0.14);
  box-shadow: inset 0 0 0 1px rgba(251, 188, 4, 0.45);
  color: #fcd663;
}

body.tow-live-map-body[data-theme="light"] .tow-replay-window-list.is-all-hours .tow-replay-window-option.is-has-movement {
  background-color: rgba(251, 188, 4, 0.2);
  box-shadow: inset 0 0 0 1px rgba(210, 160, 0, 0.55);
  color: #7a5f00;
}

body.tow-live-map-body .tow-replay-window-list.is-all-hours .tow-replay-window-option.is-has-movement:hover {
  background-color: rgba(251, 188, 4, 0.24);
}

body.tow-live-map-body[data-theme="light"] .tow-replay-window-list.is-all-hours .tow-replay-window-option.is-has-movement:hover {
  background-color: rgba(251, 188, 4, 0.32);
}

body.tow-live-map-body .tow-replay-window-list.is-all-hours .tow-replay-window-option.is-has-movement.is-selected {
  background-color: rgba(119, 179, 0, 0.42);
  box-shadow: inset 0 0 0 1px rgba(251, 188, 4, 0.75);
  color: #fff;
}

body.tow-live-map-body[data-theme="light"] .tow-replay-window-list.is-all-hours .tow-replay-window-option.is-has-movement.is-selected {
  background-color: rgba(119, 179, 0, 0.28);
  color: #3d5c00;
}

body.tow-live-map-body .tow-replay-window-option:hover {
  background-color: rgba(42, 159, 214, 0.18);
}

body.tow-live-map-body .tow-replay-window-option.is-selected {
  background-color: rgba(119, 179, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(119, 179, 0, 0.75);
}

body.tow-live-map-body .tow-replay-window-empty {
  padding: 0.3rem 0.4rem;
}

@media (min-width: 768px) {
  body.tow-live-map-body .tow-live-map-main {
    flex-direction: row;
    align-items: stretch;
  }

  body.tow-live-map-body .tow-live-map-replay-sidebar:not(.is-collapsed) {
    align-self: stretch;
    max-height: 100%;
    width: 17rem;
  }

  body.tow-live-map-body .tow-live-map-replay-sidebar:not(.is-collapsed) .tow-live-map-replay-panel {
    max-height: 100%;
  }

  body.tow-live-map-body .tow-live-map-replay-panel {
    max-height: 100%;
  }

  body.tow-live-map-body .tow-live-map-replay-sidebar.is-collapsed {
    align-self: center;
    width: 0.85rem;
  }

  body.tow-live-map-body .tow-live-map-replay-sidebar.is-collapsed .tow-live-map-replay-shell {
    height: 2rem;
    max-height: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.tow-live-map-body .tow-live-map-replay-sidebar,
  body.tow-live-map-body .tow-live-map-replay-panel {
    transition: none;
  }
}

/* Ekko Lightbox — circular close button overlapping the top-right corner */
.ekko-lightbox .modal-content {
  position: relative;
  overflow: visible;
}

.ekko-lightbox-close-btn {
  position: absolute;
  top: -0.85rem;
  right: -0.85rem;
  z-index: 205;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 2px solid rgba(0, 0, 0, 0.65);
  border-radius: 50%;
  background: #fff;
  color: #222;
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ekko-lightbox-close-btn span {
  display: block;
  margin-top: -0.1rem;
}

.ekko-lightbox-close-btn:hover,
.ekko-lightbox-close-btn:focus {
  background: #f0f0f0;
  transform: scale(1.05);
  outline: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .ekko-lightbox-close-btn {
  background: #2a2a2a;
  color: #eee;
  border-color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .ekko-lightbox-close-btn:hover,
[data-theme="dark"] .ekko-lightbox-close-btn:focus {
  background: #3a3a3a;
}

@media (prefers-reduced-motion: reduce) {
  .ekko-lightbox-close-btn {
    transition: none;
  }
}

/* Paginated list headers: title + page size on one row; pagination centered on full toolbar width */
.paginated-list-toolbar {
  position: relative;
}

.paginated-list-toolbar__sides {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.5rem;
}

.paginated-list-toolbar__heading {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  max-width: 100%;
}

.paginated-list-toolbar__page-size {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  margin-left: auto;
}

.paginated-list-toolbar__pagination {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  max-width: min(100%, 100vw - 2rem);
  pointer-events: none;
}

.paginated-list-toolbar__pagination nav,
.paginated-list-toolbar__pagination .pagination,
.paginated-list-toolbar__pagination a,
.paginated-list-toolbar__pagination button,
.paginated-list-toolbar__pagination select,
.paginated-list-toolbar__pagination label {
  pointer-events: auto;
}