/* Shared treatment for ordinary inner-page lead forms. Markup is enhanced in service-page.js. */
[data-estimate-form] [data-inner-method-field] {
  min-width: 0;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

[data-estimate-form] [data-inner-method-field] legend {
  margin: 0 0 10px;
  padding: 0;
  color: var(--sv-navy-ink, #0f2340);
  font-size: 12px;
  font-weight: 750;
}

[data-estimate-form] [data-inner-methods] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(0, 47, 108, 0.14);
  border-radius: 10px;
  background: #f3f5f8;
}

[data-estimate-form] [data-inner-contact-method] {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 6px;
  border-radius: 7px;
  color: var(--sv-gray-500, #6b7789);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s, color .15s, box-shadow .15s;
}

[data-estimate-form] [data-inner-contact-method] input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

[data-estimate-form] [data-inner-contact-method]:has(input:checked) {
  background: var(--sv-navy, #002f6c);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 47, 108, 0.12);
}

[data-estimate-form] [data-inner-contact-method]:has(input:focus-visible) {
  outline: 2px solid var(--sv-navy, #002f6c);
  outline-offset: 3px;
}

[data-estimate-form] [data-inner-contact-method]:hover:not(:has(input:checked)) {
  background: #e7edf5;
  color: var(--sv-navy, #002f6c);
}

[data-inner-method-icon] { flex-shrink: 0; }

[data-estimate-form] [data-inner-consents] { margin-top: 20px; }
[data-estimate-form] [data-inner-consents] .consent { margin-top: 0; }
[data-estimate-form] [data-inner-consents] .consent + .consent { margin-top: 10px; }
[data-estimate-form] [data-inner-consents] .consent-note { margin: 7px 0 0 30px; }

[data-estimate-form] [data-submit] {
  border-color: var(--sv-navy, #002f6c);
  background-color: var(--sv-navy, #002f6c);
  background-image: linear-gradient(90deg, var(--sv-red, #ff0000) 50%, transparent 50%);
  background-position: 100% 0;
  background-size: 200% 100%;
  transition: background-position 240ms ease, border-color 180ms ease, color 180ms ease;
}

[data-estimate-form] [data-submit]:enabled:focus-visible {
  border-color: var(--sv-red, #ff0000);
  background-position: 0 0;
  transition: none;
}

@media (hover: hover) and (pointer: fine) {
  [data-estimate-form] [data-submit]:enabled:hover {
    border-color: var(--sv-red, #ff0000);
    background-position: 0 0;
  }
}

@media (hover: none), (pointer: coarse) {
  [data-estimate-form] [data-submit]:enabled:not(:focus-visible):hover {
    border-color: var(--sv-navy, #002f6c);
    background-position: 100% 0;
  }
}

[data-estimate-form] [data-submit]:disabled {
  border-color: #cbd3df;
  background-color: #dfe4ec;
  background-image: none;
  color: #748095;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  body:where(:not(.glonass-page)) [data-estimate-form] [data-submit] { transition: none; }
}

@media (max-width: 380px) {
  [data-estimate-form] [data-inner-contact-method] { gap: 4px; font-size: 12px; }
  [data-estimate-form] [data-inner-method-icon] { width: 14px; height: 14px; }
}

/* Inline cost forms only: leave callback, account, filter and dialog forms alone. */
:is(.skzi-page #price, .glonass-page #professional-installation, .video-page #price) {
  background-color: #d7e1ee !important;
}

:is(.skzi-page #price, .glonass-page #professional-installation, .video-page #price) .price-copy__proof {
  color: #42556e !important;
}

:is(.skzi-page #price, .glonass-page #professional-installation, .video-page #price) .estimate-card[data-estimate-card] {
  border-color: transparent;
  box-shadow: none;
}

/* Match the width of one contact-method column without changing the form grid. */
:is(.skzi-page #price, .glonass-page #professional-installation, .video-page #price) .estimate-submit[data-submit] {
  width: calc((100% - 18px) / 3) !important;
  max-width: 100%;
  min-height: 54px !important;
  padding-inline: 4px !important;
  white-space: nowrap;
}

/* Native selects keep their options and keyboard behavior. */
:is(.skzi-page #price, .glonass-page #professional-installation, .video-page #price) .estimate-form select[name="vehicle"] {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%230f2340' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}

@media (max-width: 600px) {
  :is(.skzi-page #price, .glonass-page #professional-installation, .video-page #price) .estimate-submit[data-submit] {
    width: min(330px, 100%) !important;
    min-height: 50px !important;
  }
}

@media (forced-colors: active) {
  :is(.skzi-page #price, .glonass-page #professional-installation, .video-page #price) .estimate-form select[name="vehicle"] {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none;
  }
}

/* The homepage's lead form is an existing inline cost form on a dark section. */
#lead-form[data-lead-section] [data-lead-form] {
  border-color: transparent;
  box-shadow: none;
}

#lead-form[data-lead-section] [data-lead-form] [data-lead-methods] {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
  padding: 4px;
}

#lead-form[data-lead-section] [data-lead-form] [data-lead-methods] [data-contact-method] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  justify-content: center;
  white-space: nowrap;
}

#lead-form[data-lead-section] [data-lead-form] [data-lead-methods] [data-contact-method]:has(input:checked) {
  border-color: transparent !important;
  background: var(--sv-navy, #002f6c) !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(0, 47, 108, 0.12) !important;
}

#lead-form[data-lead-section] [data-lead-form] [data-lead-methods] [data-contact-method]:has(input:focus-visible) {
  outline: 2px solid var(--sv-navy, #002f6c) !important;
  outline-offset: 3px;
}

#lead-form[data-lead-section] [data-lead-form] [data-lead-submit] {
  width: calc((100% - 18px) / 3) !important;
  max-width: 100%;
  min-height: 54px !important;
  padding: 0 4px !important;
  white-space: nowrap;
}

@media (min-width: 901px) and (max-width: 1100px) {
  #lead-form[data-lead-section] [data-lead-form] [data-lead-submit] {
    font-size: 13px !important;
  }
}

@media (max-width: 600px) {
  #lead-form[data-lead-section] [data-lead-form] [data-lead-methods] [data-contact-method] {
    gap: 4px !important;
    padding-inline: 4px !important;
    font-size: 12px !important;
  }

  #lead-form[data-lead-section] [data-lead-form] [data-lead-submit] {
    width: min(330px, 100%) !important;
    min-height: 50px !important;
  }
}

/* Decorative arrows on existing native selectors and catalog filters only. */
:is(.conditioners-page [data-conditioner-selector] select,
    .object-video-page [data-object-catalog-filter] select) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%230f2340' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}

[data-promo-calculator] select[data-promo-service] {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}

@media (forced-colors: active) {
  :is(.conditioners-page [data-conditioner-selector] select,
      .object-video-page [data-object-catalog-filter] select,
      [data-promo-calculator] select[data-promo-service]) {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none;
  }
}
