/* Shared primary CTA treatment. The four .lpg__tab gallery filters are
   intentionally excluded and retain their existing category-control design. */
:is(
  .premium-button,
  .lz-home-about__cta,
  .lz-all-galleries,
  .lz-tiktok__cta,
  .lz-estimate-cta__button,
  .lzfc__toggle,
  .lzfc__button,
  .lz-contact-actions button[type="submit"],
  .lz-category-cta a,
  button.rform-button-submit
) {
  --lz-button-orange: #ff6600;
  --lz-button-dark: #191d1c;
  --lz-button-border: #3a3e3d;
  position: relative;
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  gap: 15px !important;
  overflow: hidden;
  border: 2px solid var(--lz-button-border) !important;
  border-radius: 0 !important;
  background-color: var(--lz-button-orange) !important;
  background-image: linear-gradient(var(--lz-button-dark), var(--lz-button-dark)) !important;
  background-position: left center !important;
  background-repeat: no-repeat !important;
  background-size: 0 100% !important;
  box-shadow: none !important;
  color: #fff !important;
  font-family: "Barlow Semi Condensed", sans-serif !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  cursor: pointer;
  transition:
    background-size 0.22s ease-out,
    border-color 0.22s ease-out,
    color 0.22s ease-out !important;
}

:is(
  .premium-button,
  .lz-home-about__cta,
  .lz-all-galleries,
  .lz-tiktok__cta,
  .lz-estimate-cta__button,
  .lzfc__toggle,
  .lzfc__button,
  .lz-contact-actions button[type="submit"],
  .lz-category-cta a,
  button.rform-button-submit
):is(:hover, :focus-visible) {
  border-color: var(--lz-button-border) !important;
  background-color: var(--lz-button-orange) !important;
  background-size: 100% 100% !important;
  color: #fff !important;
}

:is(
  .premium-button,
  .lz-home-about__cta,
  .lz-all-galleries,
  .lz-tiktok__cta,
  .lz-estimate-cta__button,
  .lzfc__toggle,
  .lzfc__button,
  .lz-contact-actions button[type="submit"],
  .lz-category-cta a,
  button.rform-button-submit
):focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 3px !important;
}

/* One SVG arrow is drawn in CSS so its shape is identical on every device. */
:is(
  .premium-button,
  .lz-home-about__cta,
  .lz-all-galleries,
  .lz-tiktok__cta,
  .lz-estimate-cta__button,
  .lzfc__toggle,
  .lzfc__button,
  .lz-contact-actions button[type="submit"],
  .lz-category-cta a,
  button.rform-button-submit
)::after {
  content: "" !important;
  display: block !important;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none'%3E%3Cpath d='M8 32 32 8M13 8h19v19' stroke='%23fff' stroke-width='2.6' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") center / contain no-repeat !important;
  transition: transform 0.22s ease-out;
}

:is(
  .premium-button,
  .lz-home-about__cta,
  .lz-all-galleries,
  .lz-tiktok__cta,
  .lz-estimate-cta__button,
  .lzfc__toggle,
  .lzfc__button,
  .lz-contact-actions button[type="submit"],
  .lz-category-cta a,
  button.rform-button-submit
):is(:hover, :focus-visible)::after {
  transform: translate(3px, -3px);
}

/* Remove legacy arrows and the old Premium Addons overlay. */
.premium-button::before {
  display: none !important;
}
.premium-button .premium-button-text-icon-wrapper {
  display: contents !important;
}
.premium-button .premium-button-text-icon-wrapper > i,
.lz-home-about__cta > span[aria-hidden="true"],
.lz-tiktok__cta > svg,
.lz-estimate-cta__button > svg,
.lzfc__toggle > span[aria-hidden="true"],
.lzfc__button > span[aria-hidden="true"],
.lz-contact-actions button[type="submit"] > span[aria-hidden="true"] {
  display: none !important;
}

.lz-contact-actions button[type="submit"]:disabled,
button.rform-button-submit:disabled {
  opacity: 0.62;
  cursor: wait;
}

.lz-contact-form .local-form-message.is-success {
  color: #d9f6df;
}
.lz-contact-form .local-form-message.is-error {
  color: #ffb28a;
}

/* This CTA sits on an orange panel, so it needs a contrasting white base. */
.lz-estimate-cta__button {
  background-color: #fff !important;
  color: #191d1c !important;
}
.lz-estimate-cta__button::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none'%3E%3Cpath d='M8 32 32 8M13 8h19v19' stroke='%23191d1c' stroke-width='2.6' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") !important;
}
.lz-estimate-cta__button:is(:hover, :focus-visible) {
  color: #fff !important;
}
.lz-estimate-cta__button:is(:hover, :focus-visible)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none'%3E%3Cpath d='M8 32 32 8M13 8h19v19' stroke='%23fff' stroke-width='2.6' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") !important;
}

@media (max-width: 767px) {
  :is(
    .premium-button,
    .lz-home-about__cta,
    .lz-all-galleries,
    .lz-tiktok__cta,
    .lz-estimate-cta__button,
    .lzfc__toggle,
    .lzfc__button,
    .lz-contact-actions button[type="submit"],
    .lz-category-cta a,
    button.rform-button-submit
  )::after {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(
    .premium-button,
    .lz-home-about__cta,
    .lz-all-galleries,
    .lz-tiktok__cta,
    .lz-estimate-cta__button,
    .lzfc__toggle,
    .lzfc__button,
    .lz-contact-actions button[type="submit"],
    .lz-category-cta a,
    button.rform-button-submit
  ),
  :is(
    .premium-button,
    .lz-home-about__cta,
    .lz-all-galleries,
    .lz-tiktok__cta,
    .lz-estimate-cta__button,
    .lzfc__toggle,
    .lzfc__button,
    .lz-contact-actions button[type="submit"],
    .lz-category-cta a,
    button.rform-button-submit
  )::after {
    transition-duration: 0.01ms !important;
  }
}

/* Keep nested builder/plugin label elements tied to the button state.
   Some source styles set their own dark text color directly on the label. */
:is(
  .premium-button,
  .lz-home-about__cta,
  .lz-all-galleries,
  .lz-tiktok__cta,
  .lz-estimate-cta__button,
  .lzfc__toggle,
  .lzfc__button,
  .lz-contact-actions button[type="submit"],
  .lz-category-cta a,
  button.rform-button-submit
):not(#lz-button-label-color-override) * {
  color: inherit !important;
}

/* The estimate CTA sits on an orange panel. Keep only its resting state white;
   the shared dark sweep remains the hover state. */
.lz-estimate-cta .lz-estimate-cta__button:not(#lz-estimate-button-state-override) {
  background-color: #fff !important;
  color: #191d1c !important;
}
.lz-estimate-cta .lz-estimate-cta__button:not(#lz-estimate-button-state-override)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none'%3E%3Cpath d='M8 32 32 8M13 8h19v19' stroke='%23191d1c' stroke-width='2.6' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") !important;
}
.lz-estimate-cta .lz-estimate-cta__button:not(#lz-estimate-button-state-override):is(:hover, :focus-visible) {
  color: #fff !important;
}
.lz-estimate-cta .lz-estimate-cta__button:not(#lz-estimate-button-state-override):is(:hover, :focus-visible)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none'%3E%3Cpath d='M8 32 32 8M13 8h19v19' stroke='%23fff' stroke-width='2.6' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") !important;
}

/* When the calculator is open, its close control matches the quiet Back link.
   It intentionally has no directional arrow. */
.lzfc .lzfc__toggle[aria-expanded="true"]:not(#lz-calculator-close-state-override) {
  min-height: 44px !important;
  padding: 12px 0 !important;
  gap: 8px !important;
  overflow: visible;
  color: var(--calculator-muted, #b8bcba) !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  line-height: 1.3 !important;
  text-transform: none !important;
}
.lzfc .lzfc__toggle[aria-expanded="true"]:not(#lz-calculator-close-state-override) * {
  color: inherit !important;
}
.lzfc .lzfc__toggle[aria-expanded="true"]:not(#lz-calculator-close-state-override)::after {
  display: none !important;
  content: none !important;
}
.lzfc .lzfc__toggle[aria-expanded="true"]:not(#lz-calculator-close-state-override):is(:hover, :focus-visible) {
  color: var(--calculator-text, #eee) !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
}

/* Separate the tax summary from the individual calculator cost lines. */
.lzfc__breakdown > :is(dt, dd):nth-last-child(6),
.lzfc__breakdown > :is(dt, dd):nth-last-child(5) {
  padding-top: 12px;
  border-top: 1px solid var(--calculator-line, #3b403e);
}

/* Prevent the project fields from becoming uneven on narrower tablets. */
@media (max-width: 900px) {
  .lzfc__project-fields,
  .lzfc__gate-options {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}
