/*
 * Builder-local styles.
 *
 * Generic SESAM utilities (.sesam-blur, .sesam-cursor-help, .sesam-content-height,
 * .sesam-btn-outline-secondary, the .btn-success /
 * .btn-outline-light / .accordion-button / :focus baseline, inline-rename
 * input for #id_scenarioName) live in static/css/base.css and
 * components.css. Only true builder-specific rules remain here.
 */

/* Builder pages render edge-to-edge: drop the default container horizontal
   padding inherited from the central app shell. */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl {
  padding-left: 0;
  padding-right: 0;
}

.map {
  height: 100%;
  width: 100%;
  background-color: transparent;
}

/* Search results popover above the map. */
#searchresults {
  background-color: rgba(255, 255, 255, 1);
  border-radius: 10px;
  line-height: 2;
  display: inline-block;
  padding: 12px 0 0 0 !important;
}

ul.resultitems {
  list-style: none !important;
  font-size: 14px !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

.resultitems li {
  margin: 14px 0 !important;
}

.osm-relation-id,
.result-item-type {
  font-size: smaller;
  color: #6e707e;
}

.suggestion-popover {
  --bs-popover-header-bg: red !important;
  --bs-popover-header-font-size: 5px;
}

/* Secondary button uses the SESAM blue. */
.btn-secondary {
  background-color: var(--sesam-blue);
}

/* Builder modal accordion stays scrollable up to a max height. */
.accordion-body {
  overflow-y: scroll;
  max-height: 450px;
  padding: 1rem;
}

.duration-input {
  border: 1px solid #ced4da;
}

/* Slightly tighter btn-group sizing inside the builder options panel. */
.btn-group-sm > .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.6rem;
  line-height: 1.5;
  border-radius: 0.2rem;
}

#generateModalHeader { border-bottom: none !important; }
#generateModalFooter { border-top: none !important; }

.form-check {
  padding-left: 1.5em;
}

/* Builder list-groups need flush top/bottom padding. */
.list-group-item:first-child { padding-top: 0 !important; }
.list-group-item:last-child  { padding-bottom: 0 !important; }

/* Traffic demand UI block (custom OD / random flows configuration). */
.traffic_demand label {
  margin-bottom: 0 !important;
}

.traffic_demand .col {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.traffic_demand_collapse {
  margin-top: 0.5rem;
  color: #6e707e;
  font-size: x-small;
}

.traffic_demand_collapse input {
  border: 1px solid #ced4da;
  color: #6e707e;
  border-radius: 0.35rem;
  padding: 0.3rem;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
  background-color: #fff;
}

.traffic_demand_collapse input:first-of-type {
  margin-right: 0.6rem;
}

.traffic_demand_collapse input:read-only {
  background-color: #e9ecef;
  cursor: default;
}

input[type="checkbox"][disabled] {
  background-color: #e9ecef;
  cursor: default;
}

.car-only-warning-text {
  font-size: smaller;
}

/* Hide the spinner arrows on the number input. */
.no-input-arrows {
  -moz-appearance: textfield;
}

/* Coordinate readout overlay on the map. */
.mouseposition {
  font-size: 11px;
  line-height: 1.1;
  padding: 2px 5px 1px;
  background: rgba(255, 255, 255, 0.8);
  color: #333;
  margin-left: 5px !important;
  margin-bottom: 5px !important;
}

/* Sidebar column for builder options. */
.builder-options-col {
  width: 400px !important;
}

@media (max-width: 991px) {
  .builder-options-col {
    width: 100% !important;
  }
}

/* Empty/limit-reached pane shown in place of the map+sidebar layout. */
.sesam-builder-empty-state {
  height: 80vh !important;
  width: calc(100% - 6rem);
}

/* Floating search box anchored to the top-left of the builder map. */
.sesam-builder-mapsearch {
  margin-top: 9px;
  margin-left: 9px;
  margin-right: 15px;
}

/* Selected-area lat/lon summary card inside the area-selection accordion. */
.sesam-builder-selected-area {
  background-color: #FDFDFD;
  padding: 5px;
  border: 2px solid rgb(51, 136, 255);
}

/* Scrollable vehicle list inside the "Random traffic" accordion. */
.sesam-builder-vehicles-body { max-height: 400px; }

/* Narrow numeric input for builder random-traffic TTF / count fields. */
.sesam-builder-num-input { width: 55px; }
