:root {
  --asc-action-navy: #142e46;
  --asc-action-red: #c62e36;
  --asc-action-pale: #f4f7fa;
  --asc-action-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15m-6-6 6 6-6 6'/%3E%3C/svg%3E");
  --asc-action-handset: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4H5.5A1.5 1.5 0 0 0 4 5.6 15.3 15.3 0 0 0 18.4 20a1.5 1.5 0 0 0 1.6-1.5V16l-4.1-1.4-1.4 1.5a10.7 10.7 0 0 1-6.6-6.6l1.5-1.4L8 4Z' stroke='%23142e46' stroke-width='1.55'/%3E%3Cpath d='M14.2 4.2a6.6 6.6 0 0 1 5.6 5.6' stroke='%23c62e36' stroke-width='1.8'/%3E%3C/svg%3E");
}

.asc-action,
#main-content :is(a.button, .wp-block-button__link):not(:where(.patriot-hero *, .asd *, .asc-action)),
.asc-estimate-form button.asc-submit,
.asc-paid-page :is(.asc-paid-button, .asc-paid-next) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid #a8b6c2;
  border-radius: 8px;
  background: #fff;
  color: var(--asc-action-navy);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.asc-action:not(.asc-action--primary):hover,
#main-content :is(a.button, .wp-block-button__link):not(:where(.patriot-hero *, .asd *, .asc-action)):hover {
  border-color: var(--asc-action-navy);
  background-color: var(--asc-action-pale);
  text-decoration: none;
}

.asc-action.asc-action--primary,
#main-content :is(a.button, .wp-block-button__link)[href$="/free-inspection/"]:not(:where(.patriot-hero *, .asd *)),
#main-content :is(a.button, .wp-block-button__link)[href$="/request-estimate/"]:not(:where(.patriot-hero *, .asd *)),
.header #main-nav .nav-list .menu-item a.asc-action--primary,
.asc-estimate-form button.asc-submit,
.asc-paid-page :is(.asc-paid-button, .asc-paid-next) {
  --asc-arrow-width: 51px;
  position: relative;
  justify-content: flex-start;
  min-height: 56px;
  padding: 11px calc(var(--asc-arrow-width) + 12px) 11px 16px;
  border-color: var(--asc-action-navy);
  background-color: var(--asc-action-navy);
  color: #fff;
  text-align: start;
}

.asc-action.asc-action--primary:hover,
#main-content :is(a.button, .wp-block-button__link):is([href$="/free-inspection/"], [href$="/request-estimate/"]):not(:where(.patriot-hero *, .asd *)):hover,
.header #main-nav .nav-list .menu-item a.asc-action--primary:hover,
.asc-estimate-form button.asc-submit:hover,
.asc-paid-page :is(.asc-paid-button, .asc-paid-next):hover {
  background-color: #24465f;
}

.asc-action.asc-action--primary:active,
.asc-estimate-form button.asc-submit:active {
  background-color: #0b2134;
}

.asc-action.asc-action--primary.asc-action--inverse {
  border-color: #fff;
  background-color: #fff;
  color: var(--asc-action-navy);
}

.asc-action.asc-action--primary.asc-action--inverse:hover {
  background-color: var(--asc-action-pale);
}

.asc-action--primary::after,
#main-content :is(a.button, .wp-block-button__link):is([href$="/free-inspection/"], [href$="/request-estimate/"]):not(:where(.patriot-hero *, .asd *))::after,
.asc-estimate-form button.asc-submit::after,
.asc-paid-page :is(.asc-paid-button, .asc-paid-next)::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: var(--asc-arrow-width);
  border-radius: 0 7px 7px 0;
  background: var(--asc-action-red) var(--asc-action-arrow) center right 10px / 20px no-repeat;
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.asc-action--primary .link-arrow,
#main-content :is(a.button, .wp-block-button__link):is([href$="/free-inspection/"], [href$="/request-estimate/"]):not(:where(.patriot-hero *, .asd *)) .link-arrow {
  display: none;
}

.asc-estimate-form button.asc-submit:disabled {
  opacity: .72;
  cursor: wait;
}

.asc-action.asc-action--call,
#main-content a[href^="tel:"]:not(:where(.patriot-hero *, .asd *, .asc-action)),
.contact-map-section .map-contact-line a[href^="tel:"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid #a8b6c2;
  border-radius: 8px;
  background: #fff;
  color: var(--asc-action-navy);
  font-weight: 700;
  line-height: 1.3;
  text-align: start;
  text-decoration: none;
}

.asc-action--call::before,
#main-content a[href^="tel:"]:not(:where(.patriot-hero *, .asd *, .asc-action))::before {
  content: "";
  box-sizing: border-box;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  border: 1px solid #c2cdd6;
  border-radius: 6px;
  background: var(--asc-action-pale) var(--asc-action-handset) center / 18px no-repeat;
}

.asc-action--call:hover,
#main-content a[href^="tel:"]:not(:where(.patriot-hero *, .asd *, .asc-action)):hover {
  border-color: var(--asc-action-navy);
  background-color: var(--asc-action-pale);
}

.asc-action__number {
  display: block;
  font-size: .8125em;
  font-weight: 650;
  white-space: nowrap;
}

.footer .asc-action--call {
  margin-block: 3px;
  font-size: .92rem;
}

.contact-map-copy .asc-action--primary {
  margin: 6px 0 22px;
}

#main-content .asc-action--editorial,
.journal-hero-link,
.map-box-caption a,
.footer-links a,
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 44px;
  text-underline-offset: .22em;
}

#main-content :is(.wp-block-details, .asc-anatomy-explanations details) > summary {
  box-sizing: border-box;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
}

#main-content .wp-block-details[open] > summary {
  color: var(--asc-action-navy);
  text-decoration: underline;
  text-underline-offset: .22em;
}

#main-content :is(.asc-anatomy-tag, .asc-anatomy-reset, .asc-anatomy-picker select, .page-numbers:not(ul), .wp-lightbox-container button, .wp-lightbox-overlay button),
.header .mobile-menu {
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
}

#main-content .page-numbers:not(ul) {
  display: inline-grid;
  place-items: center;
  padding-inline: 8px;
}

#main-content .page-numbers.current {
  background: var(--asc-action-navy);
  color: #fff;
}

.asc-estimate-form :is(input:not([type]), input:is([type="email"], [type="text"], [type="tel"]), select, textarea) {
  border-radius: 8px;
  min-height: 44px;
}

.asc-estimate-form label:has(input:is([type="radio"], [type="checkbox"])) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 44px;
  cursor: pointer;
}

.asc-estimate-form .asc-contact-choice label {
  margin: 4px 6px 4px 0;
  padding: 7px 10px;
  border: 1px solid #a8b6c2;
  border-radius: 8px;
}

.asc-estimate-form label input:is([type="radio"], [type="checkbox"]) {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  accent-color: var(--asc-action-navy);
}

.asc-estimate-form label:has(input[type="radio"]:checked) {
  border-color: var(--asc-action-navy);
  background-color: var(--asc-action-pale);
}

.ascp-consent button,
.ascp-preferences {
  min-height: 44px;
  border-radius: 8px;
}

:is(.asc-action, #main-content :is(a.button, .wp-block-button__link, .page-numbers, .wp-block-details > summary):not(:where(.patriot-hero *)), .asc-estimate-form :is(input, select, textarea, button), .header .mobile-menu, .footer-links a):focus-visible {
  outline: 3px solid var(--asc-action-navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}

.asc-mobile-dock {
  display: none;
}

@media (min-width: 1201px) and (max-width: 1350px) {
  .header #main-nav .nav-list { gap: 10px; }
  .header #main-nav .nav-list a.asc-action--primary { --asc-arrow-width: 39px; }
}

@media (max-width: 767px) {
  .asc-estimate-form button.asc-submit {
    padding-block: 7px;
  }

  html:has(body[data-asc-dock]) {
    scroll-padding-bottom: var(--asc-dock-space, 75px);
  }

  body[data-asc-dock] {
    padding-bottom: var(--asc-dock-space, 75px);
  }

  .asc-mobile-dock:not([hidden]) {
    position: fixed;
    z-index: 19;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 8px;
    padding: 8px max(9px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left));
    border-top: 1px solid #c4cfda;
    background: #fff;
  }

  .asc-mobile-dock .asc-action {
    min-height: 56px;
    padding-left: 8px;
    font-size: .875rem;
  }

  .asc-mobile-dock .asc-action--primary {
    --asc-arrow-width: 34px;
    padding-right: 36px;
  }

  .asc-mobile-dock .asc-action--primary::after {
    background-position: center right 6px;
    background-size: 17px;
  }

  body.nav-is-open .asc-mobile-dock,
  body:has(dialog[open], [aria-modal="true"]:not([hidden]), .ascp-consent:not([hidden]), .wp-lightbox-overlay.active, .asd-compare-tray:not([hidden]), :fullscreen) .asc-mobile-dock,
  body:has(:is(input:not([type="hidden"]), textarea, select, [contenteditable="true"]):focus, .asd-project :focus-visible) .asc-mobile-dock {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .asc-action,
  #main-content :is(a.button, .wp-block-button__link):not(:where(.patriot-hero *, .asd *)),
  .asc-estimate-form button.asc-submit,
  .asc-paid-page :is(.asc-paid-button, .asc-paid-next) {
    transition: none;
  }
}
