/* Header garage styles used on pages that do not render the full vehicle selector. */
.psvc-garage-icon {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.psvc-garage-icon__structure {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.psvc-garage-icon__door-lines {
  animation: psvc-door-cycle 8s ease-in-out infinite;
}

@keyframes psvc-door-cycle {
  0% { transform: translateY(0); }
  12% { transform: translateY(-100%); }
  50% { transform: translateY(-100%); }
  62% { transform: translateY(0); }
  100% { transform: translateY(0); }
}

.psvc-garage-icon__content {
  position: absolute;
  bottom: 0;
  left: 15%;
  width: 70%;
  height: 65%;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.psvc-garage-icon__bike {
  width: 80%;
  height: auto;
  opacity: 0;
  transform: translateX(-60%);
  animation: psvc-bike-ride 8s ease-in-out infinite;
}

@keyframes psvc-bike-ride {
  0% { opacity: 0; transform: translateX(-60%); }
  15% { opacity: 1; transform: translateX(0); }
  47% { opacity: 1; transform: translateX(0); }
  58% { opacity: 0; transform: translateX(60%); }
  100% { opacity: 0; transform: translateX(-60%); }
}

@media (prefers-reduced-motion: reduce) {
  .psvc-garage-icon__door-lines { animation: none; transform: translateY(-100%); }
  .psvc-garage-icon__bike { animation: none; opacity: 1; transform: translateX(0); }
}

.psvc-garage-icon--static .psvc-garage-icon__door-lines {
  animation: none;
  transform: translateY(-100%);
}

.psvc-garage-icon--static .psvc-garage-icon__bike {
  animation: none;
  opacity: 1;
  transform: translateX(0);
}

.psvc-header-garage {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.psvc-header-garage__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 4px 4px 0;
  margin-right: 14px;
  border-radius: 4px;
  transition: background .15s;
  text-decoration: none;
}

.psvc-header-garage__btn:hover {
  background: rgba(0, 0, 0, .05);
}

.psvc-header-garage__svg {
  width: auto;
  height: 20px;
  fill: #073c5e;
  stroke: none;
}

.psvc-header-garage__vehicle-icon {
  display: block;
  width: 34px;
  height: 24px;
  -webkit-mask: var(--psvc-header-garage-icon) center / contain no-repeat;
  mask: var(--psvc-header-garage-icon) center / contain no-repeat;
}

.psvc-header-garage--active .psvc-header-garage__svg {
  fill: #f76300;
}

.psvc-header-garage--active .psvc-header-garage__vehicle-icon {
  background-color: #f76300;
}

.psvc-header-garage__label {
  display: none;
}

.psvc-header-garage__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 320px;
  max-width: 380px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, .18);
  z-index: 1200;
  overflow: hidden;
  color: #333;
}

.psvc-header-garage__dropdown.is-open {
  display: block;
}

.psvc-header-garage__dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #073c5e;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.psvc-header-garage__dropdown-header .psvc-garage-icon,
.psvc-header-garage__dropdown-header .psvc-garage-icon--static {
  color: #fff;
}

.psvc-header-garage__vehicle {
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
}

.psvc-header-garage__vehicle:last-child {
  border-bottom: none;
}

.psvc-header-garage__vehicle-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
  color: #222;
}

.psvc-header-garage__vehicle-status {
  font-size: 11px;
  color: #28a745;
  font-weight: 600;
  margin-bottom: 6px;
}

.psvc-header-garage__vehicle-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.psvc-header-garage__vehicle-actions .psvc-hg__remove-form {
  display: inline-flex;
  margin: 0;
}

.psvc-header-garage__vehicle-actions a,
.psvc-header-garage__vehicle-actions button {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 5px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s, color .15s;
}

.psvc-header-garage__vehicle-actions .psvc-hg__btn-products {
  background: #28a745;
  color: #fff;
}

.psvc-header-garage__vehicle-actions .psvc-hg__btn-products:hover {
  background: #218838;
}

.psvc-header-garage__vehicle-actions .psvc-hg__btn-activate {
  background: #ff5a16 !important;
  color: #fff !important;
  text-decoration: none !important;
}

.psvc-header-garage__vehicle-actions .psvc-hg__btn-activate:hover {
  background: #e94f11 !important;
  color: #fff !important;
}

.psvc-header-garage__vehicle-actions .psvc-hg__btn-activate:focus,
.psvc-header-garage__vehicle-actions .psvc-hg__btn-activate:visited {
  color: #fff !important;
}

.psvc-header-garage__vehicle-actions .psvc-hg__btn-change {
  background: #f0f0f0;
  color: #555;
}

.psvc-header-garage__vehicle-actions .psvc-hg__btn-change:hover {
  background: #e0e0e0;
  color: #333;
}

.psvc-header-garage__vehicle-actions .psvc-hg__btn-remove {
  background: transparent;
  color: #dc3545;
  padding: 5px 8px;
}

.psvc-header-garage__vehicle-actions .psvc-hg__btn-remove:hover {
  background: rgba(220, 53, 69, .08);
}

.psvc-header-garage__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  background: #f8f9fa;
  color: #073c5e;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
  border-top: 1px solid #f0f0f0;
}

.psvc-header-garage__add:hover {
  background: #eef3f8;
  color: #052d47;
}

.psvc-header-garage__add .material-icons {
  font-size: 18px;
}

.psvc-header-garage__empty {
  padding: 24px 18px;
  text-align: center;
  color: #888;
  font-size: 13px;
}

#psvc-garage-backdrop {
  display: none;
}

@media (min-width: 992px) {
  .psvc-header-garage,
  .psvc-header-garage * {
    box-sizing: border-box;
  }

  .psvc-header-garage__dropdown {
    top: calc(100% + 12px);
    min-width: 430px;
    max-width: 430px;
    padding: 0 12px 12px;
    border: 1px solid rgba(7, 60, 94, .14);
    border-radius: 18px;
    box-shadow: 0 24px 54px rgba(7, 34, 56, .18);
    overflow: visible;
    background: #f6f9fc;
    opacity: 1;
    isolation: isolate;
  }

  .psvc-header-garage__dropdown::before {
    content: '';
    position: absolute;
    top: -9px;
    right: 24px;
    width: 18px;
    height: 18px;
    background: #0b4b71;
    transform: rotate(45deg);
    border-radius: 4px;
    box-shadow: -3px -3px 10px rgba(7, 34, 56, .06);
  }

  .psvc-header-garage__dropdown-header {
    margin: 0 -12px 14px;
    padding: 18px 20px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(135deg, #073c5e 0%, #0f557f 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08);
  }

  .psvc-header-garage__vehicle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    padding: 16px 16px 14px;
    border: 1px solid #e4ebf2;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(12, 44, 68, .05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }

  .psvc-header-garage__vehicle:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(12, 44, 68, .08);
  }

  .psvc-header-garage__vehicle--selected {
    border-color: rgba(40, 167, 69, .28);
    background: #fff;
    box-shadow: 0 14px 28px rgba(29, 102, 55, .10);
  }

  .psvc-header-garage__vehicle:last-child {
    border-bottom: 1px solid #e4ebf2;
  }

  .psvc-header-garage__vehicle-name {
    width: 100%;
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: .01em;
    text-align: left;
  }

  .psvc-header-garage__vehicle-status,
  .psvc-header-garage__vehicle-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: left;
  }

  .psvc-header-garage__vehicle-status {
    color: #1b8f40;
    background: rgba(40, 167, 69, .12);
  }

  .psvc-header-garage__vehicle-meta {
    color: #5f7081;
    background: #eef3f7;
  }

  .psvc-header-garage__vehicle-actions {
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
    margin-top: 2px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .psvc-header-garage__vehicle-actions a,
  .psvc-header-garage__vehicle-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-height: 40px;
    min-width: 0;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1;
    letter-spacing: .02em;
    box-shadow: inset 0 0 0 1px transparent;
    text-align: center;
    white-space: nowrap;
  }

  .psvc-header-garage__vehicle-actions .psvc-hg__btn-products,
  .psvc-header-garage__vehicle-actions .psvc-hg__btn-activate {
    box-shadow: 0 10px 18px rgba(7, 60, 94, .14);
  }

  .psvc-header-garage__vehicle--selected .psvc-header-garage__vehicle-actions {
    margin-top: 6px;
  }

  .psvc-header-garage__vehicle-actions .psvc-hg__btn-change {
    background: #eef3f7;
    color: #244861;
  }

  .psvc-header-garage__vehicle-actions .psvc-hg__btn-change:hover {
    background: #e2ebf2;
    color: #17384f;
  }

  .psvc-header-garage__vehicle-actions .psvc-hg__btn-remove {
    flex: 0 1 auto;
    gap: 6px;
    background: #fff5f6;
    color: #d73a49;
    box-shadow: inset 0 0 0 1px rgba(215, 58, 73, .12);
  }

  .psvc-header-garage__vehicle-actions .psvc-hg__btn-remove:hover {
    background: #ffecee;
  }

  .psvc-header-garage__vehicle-actions .psvc-hg__btn-remove .material-icons {
    font-size: 16px;
    line-height: 1;
  }

  .psvc-header-garage__vehicle-actions .psvc-hg__btn-remove span {
    line-height: 1;
  }

  .psvc-header-garage__vehicle--stored .psvc-hg__btn-activate {
    flex: 1 1 auto;
  }

  .psvc-header-garage__vehicle--selected .psvc-hg__btn-products,
  .psvc-header-garage__vehicle--selected .psvc-hg__btn-change {
    flex: 1 1 calc(50% - 5px);
  }

  .psvc-header-garage__add {
    margin-top: 4px;
    border: 1px solid #dde7ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(12, 44, 68, .05);
  }

  .psvc-header-garage__empty {
    margin: 4px 0 10px;
    border: 1px dashed #d7e3ec;
    border-radius: 14px;
    background: #fff;
  }
}

@media (max-width: 991.98px) {
  .psvc-header-garage__btn {
    margin-right: 6px;
  }

  .psvc-header-garage__dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    min-width: 100vw;
    max-width: 100vw;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    animation: psvc-slide-up .2s ease-out;
    z-index: 100001;
  }

  #psvc-garage-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 100000;
  }
}

@keyframes psvc-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.psvc-compat-box .psvc-garage-icon {
  width: 36px;
  height: 21px;
}

.psvc-compat-box .psvc-compat-box__icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #1a1a2e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
