/*
 * Overrides for the static clone of rccfiber.com.
 * Loaded after every Elementor stylesheet, so it wins on equal specificity.
 * Do not add a CSS reset here — it would fight the Elementor/Hello theme CSS.
 */

html {
  scroll-behavior: smooth;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100000;
  padding: 8px 16px;
  background: #fff;
  color: #000;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* Show Elementor background images without their JS lazy-loader. */
.e-con.e-parent:nth-of-type(n + 4):not(.e-lazyloaded):not(.e-no-lazyload),
.e-con.e-parent:nth-of-type(n + 4):not(.e-lazyloaded):not(.e-no-lazyload) * {
  background-image: unset;
}

.elementor-invisible {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Section background slideshows are rendered as static slides (see the
   clone script); Elementor's JS would otherwise size them via Swiper. */
.elementor-background-slideshow__slide {
  position: absolute;
  inset: 0;
}

/* Desktop dropdowns without SmartMenus. */
@media (min-width: 1025px) {
  .elementor-nav-menu--layout-horizontal .menu-item-has-children {
    position: relative;
  }

  .elementor-nav-menu--layout-horizontal .menu-item-has-children > .sub-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 20;
    min-width: 240px;
  }

  .elementor-nav-menu--layout-horizontal .menu-item-has-children:hover > .sub-menu,
  .elementor-nav-menu--layout-horizontal .menu-item-has-children:focus-within > .sub-menu {
    display: block;
  }
}

/* Mobile dropdown menu: full-width, tappable rows. */
@media (max-width: 1024px) {
  .elementor-nav-menu--dropdown .menu-item-has-children > .sub-menu {
    display: none;
  }

  .elementor-nav-menu--dropdown .menu-item-has-children.open > .sub-menu {
    display: block;
  }

  .elementor-nav-menu--dropdown a.elementor-item,
  .elementor-nav-menu--dropdown a.elementor-sub-item {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .elementor-menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }
}

/* WPForms-style replacement */
.rcc-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 100%;
}

.rcc-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.rcc-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rcc-form-label,
.rcc-sublabel {
  font-size: 16px;
  line-height: 19px;
  color: inherit;
  padding: 0;
}

.rcc-sublabel {
  font-size: 13px;
  opacity: 0.7;
  display: block;
  margin-top: 4px;
}

.rcc-form input,
.rcc-form select,
.rcc-form textarea {
  height: 43px;
  padding: 0 14px;
  font-size: 16px;
  line-height: 19px;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  color: #333;
  width: 100%;
  font-family: inherit;
}

.rcc-form textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
}

.rcc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .rcc-form-row {
    grid-template-columns: 1fr;
  }
}

.rcc-req {
  color: #c00;
}

.rcc-form-submit {
  margin-top: 10px;
  cursor: pointer;
  border: 0;
}

.rcc-form-success {
  padding: 1rem 0;
}

.rcc-form-error {
  color: #b00020;
  font-size: 14px;
}

.rcc-form-error[hidden] {
  display: none;
}

.map_aspect_ratio {
  min-height: 320px;
}

/* WPForms column widths, reproduced without the plugin stylesheet. */
.rcc-form-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.rcc-form-fields > * {
  flex: 1 1 100%;
  min-width: 0;
}

@media (min-width: 600px) {
  .rcc-form-fields > .rcc-one-half {
    flex-basis: calc(50% - 8px);
  }

  .rcc-form-fields > .rcc-one-third {
    flex-basis: calc(33.333% - 10px);
  }

  .rcc-form-fields > .rcc-two-thirds {
    flex-basis: calc(66.666% - 5px);
  }
}

/*
 * Elementor toggles and tabs reveal their panels from JavaScript. Here the
 * `elementor-active` class does it, so the initially open panel is visible in
 * the prerendered HTML (see lib/dom/elementor-widgets.ts).
 */
.elementor-toggle .elementor-tab-content.elementor-active,
.elementor-widget-tabs .elementor-tab-content.elementor-active,
.elementor-accordion .elementor-tab-content.elementor-active {
  display: block;
}

/* Below Elementor's tablet breakpoint the tabs widget becomes an accordion. */
@media (max-width: 767px) {
  .elementor-tabs .elementor-tab-mobile-title {
    display: block;
  }
}

.elementor-tab-title,
.elementor-toggle-title {
  cursor: pointer;
}
