/*
Theme Name: Avada Child - Riso Scotti Snack
Template: Avada
Version: 1.0.7
Text Domain: avada-child-risoscotti
*/

/* Avada 5.9 used a persistent root scrollbar; preserve its layout width. */
html {
    overflow-y: scroll;
}

/* CF7 5.x hides this output until submission; Avada's alert layout must respect it. */
.wpcf7 .wpcf7-response-output.wpcf7-display-none {
    display: none;
}

/* Preserve custom centering after Avada renamed the button wrapper. */
.fusion-body .Container-cerchi-snack .fusion-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}
.fusion-body .Wrapper-photo-prodotto-sing .fusion-button-wrapper {
    display: flex;
    justify-content: center;
}
@media (max-width: 800px) {
    .fusion-body .Wrapper-photo-prodotto-sing .fusion-button-wrapper a {
        font-size: 20px;
    }
}
.Bottone-acquista-online .button-icon-left {
    margin-right: 10px;
}

/* LayerSlider 8 transfers the original layer blend mode to its new wrapper. */
#Home-slider .ls-container .ls-layer.Home-slider-triangolo {
    mix-blend-mode: multiply;
}

/* Keep the existing tile gutters and legacy background positioning. */
.fusion-body .Nostri-prodotti-1-4 > .fusion-column-wrapper {
    margin-left: 7.5px;
    margin-right: 7.5px;
}
.fusion-layout-column:not(.fusion-flex-column) > .fusion-column-inner-bg {
    margin-left: 0;
    margin-right: 0;
}

/* The legacy CF7 loader must not reserve space or move the newsletter button. */
.footer-input-newsletter > p {
    position: relative;
}
.footer-input-newsletter .ajax-loader {
    position: absolute;
    left: 100%;
    top: calc(50% + 10px); /* Half the existing 20px submit top margin. */
    transform: translateY(-50%);
}

/* Preserve the heading color of the original embedded PDF download link. */
body.page-id-16 .fusion-title a[download] {
    color: inherit;
}

/* Preserve the tablet portrait social-header spacing supplied by Avada 5.9. */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
    .fusion-social-links-header .fusion-social-networks {
        padding-bottom: 15px;
    }
}

/* Preserve the original custom automatic column widths against Avada responsive rules. */
body.fusion-body .fusion-layout-column.Auto-width-content {
    width: auto !important;
}

/* Preserve explicit legacy column margins now stored as Avada CSS variables. */
body.fusion-body .fusion-layout-column.Auto-width-content[style*="--awb-margin-bottom"] {
    margin-bottom: var(--awb-margin-bottom);
}

/* Preserve the two stored legacy form-column margins in Avada's existing iPad portrait query. */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
  body.page-id-20 .fusion_builder_column[style*="--awb-margin-bottom:30px"],
  body.page-id-20 #anchor-newsletter[style*="--awb-margin-bottom:0px"] {
    margin-bottom: var(--awb-margin-bottom);
  }

  /* Avada 5.9 used Arial for this field; preserve its original font metrics. */
  body.page-id-20 .footer-input-newsletter input[type="email"] {
    font-family: Arial, Helvetica, sans-serif;
  }
}
