/* Complemento padronizado da maquete 3D de carregador veicular (.lab-garage) */

.lab-garage {
  position: relative;
  border-top: 1px solid #1d2b44;
  scroll-margin-top: 84px;
}

.lab-garage.is-standalone {
  border-top: 0;
  padding-top: clamp(.75rem, 2vw, 1.5rem);
}

.lab-garage .lab-header > * {
  min-width: 0;
}

.lab-garage .lab-options-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lab-garage .lab-options button {
  min-width: 0;
}

.lab-garage .lab-options button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.lab-garage .lab-top-controls {
  position: absolute;
  top: .85rem;
  right: .85rem;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: calc(100% - 1.7rem);
}

.lab-garage .lab-top-controls .lab-camera {
  position: static;
}

.lab-garage .lab-camera button {
  white-space: nowrap;
}

.lab-garage .lab-camera button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Seletor animado de tema Claro / Escuro no canto superior direito */
.garage-theme-box {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  padding: 4px;
  background: rgba(13, 19, 33, .86);
  backdrop-filter: blur(8px);
  border: 1px solid #3d4f6b;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .28s ease, box-shadow .35s ease, transform .22s cubic-bezier(.22, 1, .36, 1);
}

.garage-theme-box[data-night="true"] {
  border-color: rgba(242, 89, 33, .65);
  box-shadow: 0 6px 20px rgba(242, 89, 33, .16);
}

.garage-theme-box.is-toggling {
  animation: theme-box-pulse 420ms cubic-bezier(.22, 1, .36, 1);
}

.garage-theme-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 4px;
  z-index: 0;
  pointer-events: none;
  background: #eef3fa;
  box-shadow: 0 2px 10px rgba(255, 255, 255, .18);
  transition: transform .42s cubic-bezier(.22, 1.18, .36, 1), background-color .3s ease, box-shadow .32s ease;
}

.garage-theme-box[data-night="true"] .garage-theme-thumb {
  transform: translateX(100%);
  background: #f25921;
  box-shadow: 0 4px 14px rgba(242, 89, 33, .36);
}

.garage-theme-box button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  min-height: 36px;
  padding: .35rem .72rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: .8rem;
  font-weight: 680;
  color: #a9bacf;
  white-space: nowrap;
  cursor: pointer;
  transition: color .24s ease, transform .16s ease;
}

.garage-theme-box button:hover {
  color: #ffffff;
}

.garage-theme-box button:active {
  transform: scale(.94);
}

.garage-theme-box button[aria-pressed="true"] {
  color: #0d1321;
  font-weight: 760;
}

.garage-theme-sun,
.garage-theme-moon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transform-origin: center;
  transition: transform .44s cubic-bezier(.34, 1.56, .64, 1), color .26s ease, opacity .26s ease;
}

.garage-theme-sun {
  transform: rotate(-32deg) scale(.9);
}

.garage-theme-box[data-night="false"] .garage-theme-sun {
  color: #d94b16;
  transform: rotate(0deg) scale(1.06);
  animation: theme-sun-pop 460ms cubic-bezier(.34, 1.56, .64, 1);
}

.garage-theme-moon {
  transform: rotate(22deg) scale(.92);
}

.garage-theme-star {
  transform-origin: 18.5px 5.7px;
  transition: opacity .28s ease, transform .36s cubic-bezier(.34, 1.56, .64, 1);
  opacity: .35;
  transform: scale(.55);
}

.garage-theme-box[data-night="true"] .garage-theme-moon {
  color: #0d1321;
  transform: rotate(0deg) scale(1.06);
  animation: theme-moon-rock 480ms cubic-bezier(.34, 1.56, .64, 1);
}

.garage-theme-box[data-night="true"] .garage-theme-star {
  opacity: 1;
  transform: scale(1.05);
}

.lab-garage .lab-viewport {
  transition: background 420ms ease, border-color 320ms ease, box-shadow 420ms ease;
}

.lab-garage .lab-viewport.is-night {
  background: radial-gradient(ellipse at 50% 42%, #1a2740 0%, #09101d 78%);
  border-color: #2f4363;
  box-shadow: inset 0 0 64px rgba(10, 16, 30, .55);
}

.lab-garage .lab-pin-specs {
  margin: .65rem 0 0;
  padding-top: .6rem;
  border-top: 1px solid #25344c;
  display: grid;
  gap: .36rem;
}

.lab-garage .lab-pin-spec {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: .5rem;
  align-items: baseline;
  font-size: .78rem;
  line-height: 1.38;
}

.lab-garage .lab-pin-spec dt {
  margin: 0;
  color: #93a6c4;
  font-weight: 700;
}

.lab-garage .lab-pin-spec dd {
  margin: 0;
  color: #dde5f3;
}

.lab-garage .lab-pin-card-foot {
  margin-top: .55rem;
  display: flex;
  justify-content: flex-end;
}

.lab-garage .lab-pin-reset-link {
  padding: 0;
  border: 0;
  background: none;
  color: #ff9872;
  font: inherit;
  font-size: .78rem;
  font-weight: 650;
  cursor: pointer;
}

.lab-garage .lab-pin-reset-link:hover {
  text-decoration: underline;
}

.lab-garage .lab-fallback {
  position: absolute;
  inset: auto 16px 16px;
  z-index: 4;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #495d7e;
  background: rgba(13, 19, 33, .92);
  color: #cbd6e6;
  font-size: .86rem;
}

@keyframes theme-box-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes theme-sun-pop {
  0% { transform: rotate(-70deg) scale(.7); }
  65% { transform: rotate(12deg) scale(1.12); }
  100% { transform: rotate(0deg) scale(1.06); }
}

@keyframes theme-moon-rock {
  0% { transform: rotate(35deg) scale(.72); }
  60% { transform: rotate(-10deg) scale(1.14); }
  100% { transform: rotate(0deg) scale(1.06); }
}

@media (max-width: 820px) {
  .lab-garage .lab-options-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lab-garage .lab-options-3 button:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 580px) {
  .lab-garage .lab-top-controls {
    top: .55rem;
    right: .55rem;
    left: .55rem;
    gap: 6px;
    max-width: none;
  }
  .lab-garage .lab-camera {
    padding: 3px;
    gap: 2px;
  }
  .lab-garage .lab-camera button {
    min-height: 32px;
    min-width: 32px;
    padding: .28rem;
  }
  .lab-garage .lab-camera button span {
    display: none;
  }
  .garage-theme-box {
    padding: 3px;
  }
  .garage-theme-thumb {
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
  }
  .garage-theme-box button {
    min-height: 32px;
    padding: .26rem .5rem;
    gap: .28rem;
    font-size: .74rem;
  }
  .lab-garage .lab-pin-card {
    left: .6rem;
    right: .6rem;
    bottom: .6rem;
    width: auto;
    padding: .75rem .85rem;
  }
  .lab-garage .lab-pin-specs {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lab-garage .lab-viewport,
  .garage-theme-box,
  .garage-theme-thumb,
  .garage-theme-sun,
  .garage-theme-moon,
  .garage-theme-star {
    animation: none;
    transition: none;
  }
}

.lab-garage .lab-poster { background: #0c1424; }
.garage-legend { margin-top: clamp(24px, 3vw, 38px); }
.garage-legend-head { max-width: 46rem; margin-bottom: 1.25rem; }
.garage-legend-head .eyebrow { color: var(--fire); margin-bottom: .45rem; }
.garage-legend-head h2 { font-size: clamp(1.35rem, 2.3vw, 1.95rem); letter-spacing: -.03em; line-height: 1.15; }
.garage-legend-head p:not(.eyebrow) { margin-top: .5rem; color: var(--light-text); font-size: .95rem; }
.garage-legend-disclosure {
  margin-top: 1rem;
  border: 1px solid #273751;
  background: #0d1524;
  border-radius: 6px;
}
.garage-legend-disclosure summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: .75rem 1rem;
  font-size: .92rem;
  font-weight: 700;
  color: #eef3fb;
}
.garage-legend-disclosure summary::-webkit-details-marker { display: none; }
.garage-legend-disclosure summary:focus-visible { outline: 2px solid var(--fire); outline-offset: -2px; }
.garage-legend-disclosure .disclosure-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--fire);
  background:
    linear-gradient(currentColor, currentColor) center/100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center/2px 100% no-repeat;
}
.garage-legend-disclosure[open] .disclosure-icon { background-size: 100% 2px, 0 0; }
.garage-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #273751;
  border: 1px solid #273751;
}
.garage-legend-disclosure .garage-legend-grid {
  border-width: 1px 0 0;
}
.garage-topic-item {
  background: #0d1524;
  padding: clamp(16px, 2vw, 24px);
  display: grid;
  align-content: start;
  gap: .55rem;
}
.garage-topic-item h3 {
  font-size: 1rem;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: #f4f7fc;
  margin: 0;
}
.garage-topic-item > p {
  margin: 0;
  font-size: .9rem;
  color: #c7d3e3;
  line-height: 1.5;
}
.garage-topic-specs {
  display: grid;
  gap: .4rem;
  margin: .35rem 0 0;
  padding-top: .65rem;
  border-top: 1px solid #223047;
}
.garage-topic-specs div {
  display: grid;
  gap: .1rem;
}
.garage-topic-specs dt {
  font-size: .72rem;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffab8b;
}
.garage-topic-specs dd {
  margin: 0;
  font-size: .85rem;
  color: #d6e0ee;
  line-height: 1.45;
}
@media (max-width: 820px) {
  .garage-legend-grid { grid-template-columns: minmax(0, 1fr); }
}
