/* Project CTA system. Loaded last to keep Gutenberg and plugin buttons consistent. */
:is(
  .wp-block-button__link,
  .wp-element-button,
  .auto-header-contact,
  .auto-footer__cta,
  .vehicle-button,
  .vehicle-card__bottom a,
  .wpc-filters-submit-button,
  .wpc-filters-apply-button
) {
  align-items: center;
  background: var(--ws_rouge) !important;
  border: 1px solid var(--ws_rouge) !important;
  border-radius: 5px !important;
  box-shadow: none;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  text-decoration: none !important;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

:is(
  .wp-block-button__link,
  .wp-element-button,
  .auto-header-contact,
  .auto-footer__cta,
  .vehicle-button,
  .vehicle-card__bottom a,
  .wpc-filters-submit-button,
  .wpc-filters-apply-button
):hover {
  background: var(--ws_rouge) !important;
  border-color: var(--ws_rouge) !important;
  box-shadow: 0 9px 24px rgba(var(--ws_rouge-rgb),.3);
  color: #fff !important;
  transform: translateY(-2px);
}

:is(
  .wp-block-button__link,
  .wp-element-button,
  .auto-header-contact,
  .auto-footer__cta,
  .vehicle-button,
  .vehicle-card__bottom a,
  .wpc-filters-submit-button,
  .wpc-filters-apply-button
):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

:is(
  .wp-block-button__link,
  .wp-element-button,
  .auto-header-contact,
  .auto-footer__cta,
  .vehicle-button,
  .vehicle-card__bottom a,
  .wpc-filters-submit-button,
  .wpc-filters-apply-button
):active {
  box-shadow: 0 4px 12px rgba(var(--ws_rouge-rgb),.22);
  transform: translateY(0);
}

.vehicle-card__bottom a {
  padding: 10px 13px;
}

.auto-language,
.wpc-filters-widget-select {
  border-radius: 5px !important;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.auto-language:hover,
.wpc-filters-widget-select:hover {
  background-color: #101012 !important;
  border-color: rgba(var(--ws_rouge-rgb),.7) !important;
  box-shadow: 0 7px 20px rgba(var(--ws_rouge-rgb),.14);
  color: #fff !important;
  transform: translateY(-1px);
}

.auto-language:focus-visible,
.wpc-filters-widget-select:focus-visible {
  background-color: #101012 !important;
  border-color: var(--ws_rouge) !important;
  box-shadow: 0 0 0 2px rgba(var(--ws_rouge-rgb),.2), 0 7px 20px rgba(var(--ws_rouge-rgb),.14);
  color: #fff !important;
  outline: 0;
  transform: translateY(-1px);
}

.auto-native-select {
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  overflow: hidden !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}

.auto-custom-select {
  color: #fff;
  min-width: 0;
  position: relative;
  width: 100%;
  z-index: 1;
}

.auto-custom-select.is-open { z-index: 300; }

.auto-custom-select__trigger {
  align-items: center;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.76);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 13px;
  height: 28px;
  justify-content: space-between;
  overflow: hidden;
  padding: 0 22px 0 0;
  position: relative;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.auto-custom-select__trigger::after {
  border-bottom: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(255,255,255,.65);
  content: "";
  position: absolute;
  right: 2px;
  top: 11px;
  transition: border-color .2s ease, transform .2s ease;
}

.auto-custom-select.is-open .auto-custom-select__trigger::after {
  border-top-color: var(--ws_rouge);
  transform: rotate(180deg);
}

.auto-custom-select__list {
  background: #111;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 5px;
  box-shadow: 0 16px 34px rgba(0,0,0,.46);
  display: none;
  left: -12px;
  max-height: 260px;
  min-width: calc(100% + 24px);
  overflow-y: auto;
  padding: 5px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 400;
}

.auto-custom-select.is-open .auto-custom-select__list {
  display: grid;
  gap: 2px;
}

.auto-custom-select__option {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: rgba(255,255,255,.82);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.auto-custom-select__option:hover,
.auto-custom-select__option:focus-visible {
  background: var(--ws_rouge);
  color: #fff;
  outline: 0;
}

.auto-custom-select__option[aria-selected="true"] {
  background: var(--ws_rouge);
  color: #fff;
  font-weight: 800;
}

.auto-custom-select--language {
  background: transparent;
  border: 0;
  border-radius: 5px;
  flex: 0 0 auto;
  height: 42px;
  width: 34px;
}

.auto-custom-select--language .auto-custom-select__trigger {
  font-size: 11px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  padding: 0;
}

.auto-custom-select--language .auto-custom-select__trigger::after { display: none; }

.auto-custom-select--language .auto-custom-select__list {
  left: auto;
  min-width: 132px;
  right: 0;
}

.auto-custom-select--language .auto-custom-select__option {
  align-items: center;
  display: flex;
  gap: 9px;
}

.auto-language-flag {
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
  display: inline-block;
  flex: 0 0 22px;
  height: 22px;
  overflow: hidden;
  width: 22px;
}

.auto-language-flag--fr { background: linear-gradient(90deg, #1b45a0 0 33.333%, #fff 33.333% 66.666%, #ed2939 66.666%); }
.auto-language-flag--es { background: linear-gradient(180deg, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75%); }
.auto-language-flag--en {
  background:
    linear-gradient(90deg, transparent 42%, #cf142b 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, #cf142b 42% 58%, transparent 58%),
    linear-gradient(90deg, transparent 35%, #fff 35% 65%, transparent 65%),
    linear-gradient(0deg, transparent 35%, #fff 35% 65%, transparent 65%),
    linear-gradient(32deg, transparent 44%, #fff 44% 56%, transparent 56%),
    linear-gradient(-32deg, transparent 44%, #fff 44% 56%, transparent 56%),
    #012169;
}

.auto-custom-select--filter-everything .auto-custom-select__trigger {
  background: transparent;
  border: 0;
  height: 34px;
  padding-left: 0;
}

.auto-custom-select--filter-everything .auto-custom-select__list {
  left: 0;
  min-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  :is(
    .wp-block-button__link,
    .wp-element-button,
    .auto-header-contact,
    .auto-footer__cta,
    .vehicle-button,
    .vehicle-card__bottom a,
    .wpc-filters-submit-button,
    .wpc-filters-apply-button
  ) {
    transition: none;
  }

  :is(
    .wp-block-button__link,
    .wp-element-button,
    .auto-header-contact,
    .auto-footer__cta,
    .vehicle-button,
    .vehicle-card__bottom a,
    .wpc-filters-submit-button,
    .wpc-filters-apply-button
  ):hover {
    transform: none;
  }

  .auto-language,
  .wpc-filters-widget-select {
    transition: none;
  }

  .auto-language:hover,
  .auto-language:focus-visible,
  .wpc-filters-widget-select:hover,
  .wpc-filters-widget-select:focus-visible {
    transform: none;
  }
}
