/**
 * Real-time bottom vehicle details carousel — theme variants.
 * Applied via .rt-vehicle-hud--{template} on the panel (template from active-theme).
 */

/* ========== Shared shell ========== */
.rt-vehicle-hud.historik-result-row-details {
  position: fixed;
  top: auto;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  padding: 0;
  border: none;
  background: transparent;
}

/* Map shell: pin vehicle HUD to the bottom of the map stage (page footer) */
app-map-shell .afs-shell__map .map-container > .rt-vehicle-hud.historik-result-row-details:not(.detailsToRight):not(.detailsToTop) {
  position: absolute !important;
  top: auto !important;
  bottom: 8px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: min(560px, 45%) !important;
  max-width: calc(100% - 24px) !important;
  pointer-events: auto !important;
}

app-map-shell .afs-shell__map .map-container > .rt-vehicle-hud--accentfrance.historik-result-row-details:not(.detailsToRight):not(.detailsToTop) {
  width: min(760px, calc(100% - 24px)) !important;
  max-width: calc(100% - 24px) !important;
}

.rt-vehicle-hud__shell {
  position: relative;
  width: 100%;
}

.rt-vehicle-hud__content {
  padding: 0;
  margin: 0;
  width: 100%;
}

.rt-vehicle-hud__carousel {
  position: relative;
  width: 100%;
}

.rt-vehicle-hud__carousel .ngucarousel,
.rt-vehicle-hud__carousel .ngu-touch-container,
.rt-vehicle-hud__carousel .ngucarousel-items {
  position: relative;
  width: 100%;
}

.rt-vehicle-hud__carousel .tile {
  width: 100%;
}

.rt-vehicle-hud__nav,
.rt-vehicle-hud__nav.leftRs,
.rt-vehicle-hud__nav.rightRs {
  position: absolute !important;
  top: 50% !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: translateY(-50%) !important;
  z-index: 5;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 12px !important;
  border-radius: 50% !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.rt-vehicle-hud__nav i {
  display: block;
  line-height: 1;
  margin: 0;
  pointer-events: none;
}

.rt-vehicle-hud__nav--prev,
.rt-vehicle-hud__nav.leftRs {
  left: 2px !important;
  right: auto !important;
}

.rt-vehicle-hud__nav--next,
.rt-vehicle-hud__nav.rightRs {
  right: 2px !important;
  left: auto !important;
}

.rt-vehicle-hud__nav:hover {
  transform: translateY(-50%) scale(1.08) !important;
}

.rt-vehicle-hud__nav:active {
  transform: translateY(-50%) scale(0.96) !important;
}

.rt-vehicle-hud__nav:focus {
  outline: none;
}

.rt-vehicle-hud__nav:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 0 4px rgba(44, 53, 67, 0.55);
}

/* ========== Fleet / Finek (teal) ========== */
.rt-vehicle-hud--fleet.historik-result-row-details,
.rt-vehicle-hud--finek.historik-result-row-details {
  text-align: left;
  color: #3e5569;
  top: auto;
  bottom: 8px;
  width: 45%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(17, 147, 155, 0.25);
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(6px);
}

.rt-vehicle-hud--fleet .rt-vehicle-hud__shell,
.rt-vehicle-hud--finek .rt-vehicle-hud__shell {
  padding: 6px 36px;
}

.rt-vehicle-hud--fleet .detailvehicule,
.rt-vehicle-hud--fleet .detailtech,
.rt-vehicle-hud--finek .detailvehicule,
.rt-vehicle-hud--finek .detailtech {
  font-size: 11px;
  text-align: center;
  padding: 4px 0;
}

.rt-vehicle-hud--fleet .detailvehicule i,
.rt-vehicle-hud--fleet .detailtech i,
.rt-vehicle-hud--finek .detailvehicule i,
.rt-vehicle-hud--finek .detailtech i {
  font-weight: bold;
  color: #11939b !important;
}

.rt-vehicle-hud--fleet .detailvehicule span,
.rt-vehicle-hud--fleet .detailtech span,
.rt-vehicle-hud--finek .detailvehicule span,
.rt-vehicle-hud--finek .detailtech span {
  font-weight: 400;
  color: #3e5569 !important;
}

.rt-vehicle-hud--fleet .rt-vehicle-hud__nav,
.rt-vehicle-hud--finek .rt-vehicle-hud__nav {
  background: linear-gradient(145deg, #11939b, #0d7a81) !important;
  border: 1px solid #0a656b !important;
  color: #fff !important;
}

.rt-vehicle-hud--fleet .rt-vehicle-hud__nav:hover,
.rt-vehicle-hud--finek .rt-vehicle-hud__nav:hover {
  background: #0d7a81 !important;
  box-shadow: 0 3px 12px rgba(17, 147, 155, 0.5);
}

/* ========== Traci — AdminLTE skin-blue ========== */
.rt-vehicle-hud--traci.historik-result-row-details {
  text-align: left;
  color: #3e5569;
  top: auto;
  bottom: 8px;
  width: 45%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(44, 53, 67, 0.28);
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(6px);
}

.rt-vehicle-hud--traci .rt-vehicle-hud__shell {
  padding: 6px 36px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

.rt-vehicle-hud--traci .detailvehicule,
.rt-vehicle-hud--traci .detailtech {
  font-size: 11px;
  text-align: center;
  padding: 4px 0;
}

.rt-vehicle-hud--traci .detailvehicule i,
.rt-vehicle-hud--traci .detailtech i {
  font-weight: bold;
  color: #2C3543 !important;
}

.rt-vehicle-hud--traci .detailvehicule span,
.rt-vehicle-hud--traci .detailtech span {
  font-weight: 400;
  color: #3e5569 !important;
}

.rt-vehicle-hud--traci .rt-vehicle-hud__nav {
  background: linear-gradient(145deg, #2C3543, #242b36) !important;
  border: 1px solid #1e242d !important;
  color: #fff !important;
}

.rt-vehicle-hud--traci .rt-vehicle-hud__nav:hover {
  background: #242b36 !important;
  box-shadow: 0 3px 12px rgba(44, 53, 67, 0.5);
}

/* ========== Accent France — light glass HUD, charte violet / lime ==========
 * Shown over the map on a white panel (see accentfrance-theme.css), so text is dark. */
.rt-vehicle-hud--accentfrance.historik-result-row-details {
  top: auto;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  text-align: left;
  color: #1f1030;
  z-index: 900;
}

/* Brand stripe: violet / lime, as in the logo */
.rt-vehicle-hud--accentfrance .rt-vehicle-hud__brand-bar {
  height: 3px;
  margin-bottom: 0;
  background: linear-gradient(90deg, #3d0a4f 0 66.66%, #b5dc2e 66.66% 100%);
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__shell {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(61, 10, 79, 0.14);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 12px 32px rgba(31, 16, 48, 0.18);
  overflow: hidden;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-family: 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: #3d0a4f;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__rec {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c8ef3f;
  box-shadow: 0 0 8px rgba(200, 239, 63, 0.8);
  animation: rt-hud-rec-blink 1.2s step-end infinite;
  flex-shrink: 0;
}

@keyframes rt-hud-rec-blink {
  50% { opacity: 0.25; }
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__bar-title {
  color: #c8ef3f;
  font-weight: 700;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__bar-vehicle {
  color: #fff;
  font-weight: 700;
  margin-left: auto;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__content {
  padding: 10px 8px 12px;
  float: none;
  width: 100%;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__carousel,
.rt-vehicle-hud--accentfrance .rt-vehicle-hud__carousel .ngucarousel,
.rt-vehicle-hud--accentfrance .rt-vehicle-hud__carousel .ngu-touch-container,
.rt-vehicle-hud--accentfrance .rt-vehicle-hud__carousel .ngucarousel-items {
  position: relative;
  width: 100% !important;
  height: auto !important;
  min-height: 92px;
  overflow: hidden;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__carousel .ngucarousel-items {
  display: flex !important;
  align-items: stretch;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__carousel .item,
.rt-vehicle-hud--accentfrance .rt-vehicle-hud__carousel .tile,
.rt-vehicle-hud--accentfrance .rt-vehicle-hud__carousel ngu-tile {
  width: 100% !important;
  min-width: 100%;
  box-sizing: border-box;
  float: none !important;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__carousel .ngucarouselPoint,
.rt-vehicle-hud--accentfrance .rt-vehicle-hud__carousel ul[class*="point"] {
  display: none !important;
}

/* Side padding keeps the carousel arrows (30px) clear of the text */
.rt-vehicle-hud--accentfrance .rt-vehicle-hud__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  padding: 0 40px;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__metric {
  min-width: 0;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__metric-label {
  display: block;
  font-family: 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7b6b8c;
  margin-bottom: 3px;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__metric-label .fa {
  color: #5a1270;
  margin-right: 4px;
  font-size: 11px;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__metric-value {
  display: block;
  font-size: 13px;
  color: #1f1030;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__metric--wide {
  grid-column: 1 / -1;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__nav {
  background: #3d0a4f !important;
  border: 1px solid #22052e !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(61, 10, 79, 0.3);
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__nav--prev,
.rt-vehicle-hud--accentfrance .rt-vehicle-hud__nav.leftRs {
  left: 8px !important;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__nav--next,
.rt-vehicle-hud--accentfrance .rt-vehicle-hud__nav.rightRs {
  right: 8px !important;
}

.rt-vehicle-hud--accentfrance .rt-vehicle-hud__nav:hover {
  background: #b5dc2e !important;
  border-color: #9fc41f !important;
  color: #1f1030 !important;
}

/* Non-critical warning: amber (red is reserved for critical alerts) */
.rt-vehicle-hud--accentfrance .label.bg-yellow {
  background: rgba(240, 165, 0, 0.18) !important;
  color: #8a6200 !important;
  border: 1px solid rgba(240, 165, 0, 0.45);
}

@media (max-width: 768px) {
  .rt-vehicle-hud--accentfrance.historik-result-row-details {
    width: 98vw;
    bottom: 6px;
  }

  .rt-vehicle-hud--accentfrance .rt-vehicle-hud__metrics {
    grid-template-columns: 1fr;
    padding: 0 36px;
  }

  .rt-vehicle-hud--accentfrance .rt-vehicle-hud__bar-vehicle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rt-vehicle-hud--accentfrance .rt-vehicle-hud__rec {
    animation: none;
  }
}

/* Enhanced real-time layout (carousel in car-container) */
.rt-vehicle-hud--accentfrance.detailsToRight,
.rt-vehicle-hud--accentfrance.detailsToTop {
  background: transparent !important;
}

.rt-vehicle-hud--accentfrance.detailsToRight .rt-vehicle-hud__shell,
.rt-vehicle-hud--accentfrance.detailsToTop .rt-vehicle-hud__shell {
  width: 100%;
}


.rt-vehicle-hud--enhanced.rt-vehicle-hud--accentfrance .rt-vehicle-hud__shell {
  max-width: 640px;
  margin: 0 auto;
}

.rt-vehicle-hud--enhanced.rt-vehicle-hud--fleet .rt-vehicle-hud__shell,
.rt-vehicle-hud--enhanced.rt-vehicle-hud--finek .rt-vehicle-hud__shell,
.rt-vehicle-hud--enhanced.rt-vehicle-hud--traci .rt-vehicle-hud__shell {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  border: 1px solid rgba(17, 147, 155, 0.25);
  padding: 4px 0;
}
