  /*------------------------------------*\
    
    WebFX WYSIWYG Customizations - Global styling for all ACF WYSIWYG's

    Add custom WYSIWYG styling to this file if it should be applied to all ACF WYSIWYG's on the site
    Otherwise, put your block-specific styles in individual block stylesheets

\*------------------------------------*/

.wysiwyg {
    position: relative;
}

/* WYSIWYG Content Spacing */
.wysiwyg__content > *:last-child {
    margin-bottom: 0;
}

/*
 * Iframes embedded via the WYSIWYG (e.g. Zinfi concierge pages) often come
 * with width="100%" height="100%". Because the parent <p> has no defined
 * height, percentage heights collapse and the iframe renders at the UA
 * default (~150px).
 *
 * Give non-video iframes a usable minimum height so editors don't have to
 * remember to set pixel heights on every embed. Video iframes wrapped by
 * FitVids (.fluid-width-video-wrapper) are excluded so their aspect-ratio
 * sizing isn't broken. An explicit height attribute on the iframe will
 * still win over this min-height when needed.
 */
.wysiwyg__content iframe {
    display: block;
    max-width: 100%;
    border: 0;
}

.wysiwyg__content > p > iframe,
.wysiwyg__content > iframe {
    width: 100%;
    min-height: 800px;
}

/* Heading Top Spacing (after paragraphs/lists) */
.wysiwyg__content p + h2,
.wysiwyg__content p + h3,
.wysiwyg__content p + h4,
.wysiwyg__content ul + h2,
.wysiwyg__content ul + h3,
.wysiwyg__content ul + h4,
.wysiwyg__content ol + h2,
.wysiwyg__content ol + h3,
.wysiwyg__content ol + h4 {
    margin-top: 24px;
}

/* Image Alignments within WYSIWYG */
.wysiwyg__content .alignleft,
.wysiwyg__content .alignright {
    display: block;
    margin-bottom: 12px;
}

.wysiwyg__content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 12px;
}

/* Image + Text Layout */
.wysiwyg__content .wp-block-media-text {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 12px;
}

.wysiwyg__content .wp-block-media-text__media {
    width: 100%;
}

.wysiwyg__content .wp-block-media-text__media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.wysiwyg__content .wp-block-media-text__content {
    width: 100%;
}

.wysiwyg__content .wp-block-media-text__content > *:last-child {
    margin-bottom: 0;
}

/* Button Groups in WYSIWYG */
.wysiwyg__content .btn-group {
    margin-top: 0;
}

/* List Utilities */
.font-color li {
    color: var(--black);
}

/* Tablet Styles */
@media (min-width: 768px) {
    .wysiwyg__content p + h2,
    .wysiwyg__content p + h3,
    .wysiwyg__content p + h4,
    .wysiwyg__content ul + h2,
    .wysiwyg__content ul + h3,
    .wysiwyg__content ul + h4,
    .wysiwyg__content ol + h2,
    .wysiwyg__content ol + h3,
    .wysiwyg__content ol + h4 {
        margin-top: 30px;
    }

    .wysiwyg__content .alignleft,
    .wysiwyg__content .alignright {
        margin-bottom: 16px;
    }

    .wysiwyg__content .aligncenter {
        margin-bottom: 16px;
    }

    .wysiwyg__content .wp-block-media-text {
        margin-bottom: 16px;
    }
}

/* Desktop Styles */
@media (min-width: 1200px) {
    .wysiwyg__content p + h2,
    .wysiwyg__content p + h3,
    .wysiwyg__content p + h4,
    .wysiwyg__content ul + h2,
    .wysiwyg__content ul + h3,
    .wysiwyg__content ul + h4,
    .wysiwyg__content ol + h2,
    .wysiwyg__content ol + h3,
    .wysiwyg__content ol + h4 {
        margin-top: 40px;
    }

    .wysiwyg__content .alignleft {
        float: left;
        margin-right: 18px;
        margin-bottom: 12px;
        max-width: 50%;
    }

    .wysiwyg__content .alignright {
        float: right;
        margin-left: 18px;
        margin-bottom: 12px;
        max-width: 50%;
    }

    .wysiwyg__content .aligncenter {
        margin-bottom: 25px;
    }

    .wysiwyg__content .wp-block-media-text {
        grid-template-columns: 1fr 1fr;
        margin-bottom: 25px;
    }
}
