/* ==========================================================================
   Button style variations
   ========================================================================== */

/* Shared transition */
.wp-block-button .wp-block-button__link {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Primary (default): action-blue bg, white text, hover fills navy */
.wp-block-button:not(.is-style-secondary):not(.is-style-tertiary-dark-mode):not(.is-style-text-link-primary):not(.is-style-text-link-secondary):not(.is-style-text-link-tertiary) .wp-block-button__link {
    background-color: var(--wp--preset--color--action-blue);
    color: var(--wp--preset--color--white);
    border-color: var(--wp--preset--color--action-blue);
}
.wp-block-button:not(.is-style-secondary):not(.is-style-tertiary-dark-mode):not(.is-style-text-link-primary):not(.is-style-text-link-secondary):not(.is-style-text-link-tertiary) .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--navy);
    color: var(--wp--preset--color--white);
    border-color: var(--wp--preset--color--navy);
}
.wp-block-button:not(.is-style-secondary):not(.is-style-tertiary-dark-mode):not(.is-style-text-link-primary):not(.is-style-text-link-secondary):not(.is-style-text-link-tertiary) .wp-block-button__link.disabled {
    background-color: var(--wp--preset--color--light-blue);
    border-color: var(--wp--preset--color--light-blue);
    pointer-events: none;
}

/* Secondary: graphite outline, hover fills graphite */
.wp-block-button.is-style-secondary .wp-block-button__link {
    background-color: transparent;
    color: var(--wp--preset--color--graphite);
    border-color: var(--wp--preset--color--graphite);
    border-style: solid;
}
.wp-block-button.is-style-secondary .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--graphite);
    color: var(--wp--preset--color--white);
    border-color: var(--wp--preset--color--graphite);
}
.wp-block-button.is-style-secondary .wp-block-button__link.disabled {
    color: var(--wp--preset--color--ivory);
    border-color: var(--wp--preset--color--ivory);
    pointer-events: none;
}

/* Outline button on dark backgrounds (cover + groups with dark preset colors) */
.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link,
.has-action-blue-background-color .wp-block-button.is-style-outline .wp-block-button__link,
.has-navy-background-color .wp-block-button.is-style-outline .wp-block-button__link,
.has-graphite-background-color .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--wp--preset--color--white);
    border-color: var(--wp--preset--color--white);
    border-style: solid;
}
.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link:hover,
.has-action-blue-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover,
.has-navy-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover,
.has-graphite-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--graphite);
    border-color: var(--wp--preset--color--white);
}

/* Tertiary (dark mode): white bg, action-blue text, hover fills sand */
.wp-block-button.is-style-tertiary-dark-mode .wp-block-button__link {
    background-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--action-blue);
    border-color: transparent;
}
.wp-block-button.is-style-tertiary-dark-mode .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--sand);
    color: var(--wp--preset--color--action-blue);
    border-color: transparent;
}
.wp-block-button.is-style-tertiary-dark-mode .wp-block-button__link.disabled {
    color: var(--wp--preset--color--light-blue);
    border-color: transparent;
    pointer-events: none;
}

/* Promo banner: clip image to border-radius */
.els-promo-banner {
    overflow: hidden;
}

/* Formstack iframe embed */
.els-form-embed {
    width: 100%;
}
.els-form-embed iframe {
    display: block;
    width: 100%;
    border: 0;
}

/* Feature list: force image first on mobile for reversed rows */
@media (max-width: 781px) {
    .els-feature-reversed .wp-block-column:first-child {
        order: 2 !important;
    }
    .els-feature-reversed .wp-block-column:last-child {
        order: 1 !important;
    }
}

/* Column gap utilities for block patterns */
.els-col-gap-24 { column-gap: 24px; }
.els-col-gap-64 { column-gap: 64px; }
.els-gap-24     { gap: 24px; }

/* Full-width block escape — makes alignfull blocks inside post-content
   escape the root body padding defined in theme.json (clamp 20px→68px). */
.wp-block-post-content > .alignfull {
    margin-left: calc(-1 * clamp(20px, 5vw, 68px)) !important;
    margin-right: calc(-1 * clamp(20px, 5vw, 68px)) !important;
    max-width: none !important;
    width: calc(100% + 2 * clamp(20px, 5vw, 68px)) !important;
}

/* 2-col CTA: constrain to 840px, equal-height cards, CTA pinned to bottom */
.els-2col-cards {
    max-width: 840px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.els-2col-cards .wp-block-columns {
    align-items: stretch !important;
}
.els-2col-cards .wp-block-column {
    display: flex !important;
    flex-direction: column !important;
}
.els-card {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}
.els-card > .wp-block-buttons {
    margin-top: auto !important;
    padding-top: 24px !important;
}

/* ==========================================================================
   Text link button style variations
   ========================================================================== */

/* Base reset: remove pill shape, bg, border and padding from all text link styles */
.wp-block-button.is-style-text-link-primary .wp-block-button__link,
.wp-block-button.is-style-text-link-secondary .wp-block-button__link,
.wp-block-button.is-style-text-link-tertiary .wp-block-button__link {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: var(--wp--preset--color--graphite);
}

/* Primary text link: bold, no underline, circle-arrow icon via ::after */
.wp-block-button.is-style-text-link-primary .wp-block-button__link {
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.wp-block-button.is-style-text-link-primary .wp-block-button__link::after {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='14' cy='14' r='13' stroke='%232354FF' stroke-width='2'/%3E%3Cpath d='M10 14H18M15 11L18 14L15 17' stroke='%232354FF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.wp-block-button.is-style-text-link-primary .wp-block-button__link:hover {
    text-decoration: underline;
    color: var(--wp--preset--color--graphite);
}
.wp-block-button.is-style-text-link-primary .wp-block-button__link:hover::after {
    background-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='14' cy='14' r='14' fill='%232354FF'/%3E%3Cpath d='M10 14H18M15 11L18 14L15 17' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.wp-block-button.is-style-text-link-primary .wp-block-button__link.disabled {
    color: var(--wp--preset--color--ivory);
    pointer-events: none;
    text-decoration: none;
}
.wp-block-button.is-style-text-link-primary .wp-block-button__link.disabled::after {
    background-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='14' cy='14' r='13' stroke='%23E1DFDB' stroke-width='2'/%3E%3Cpath d='M10 14H18M15 11L18 14L15 17' stroke='%23E1DFDB' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Secondary text link: bold, no underline, no icon */
.wp-block-button.is-style-text-link-secondary .wp-block-button__link {
    font-weight: 700;
    text-decoration: none;
}
.wp-block-button.is-style-text-link-secondary .wp-block-button__link:hover {
    text-decoration: underline;
    color: var(--wp--preset--color--graphite);
}
.wp-block-button.is-style-text-link-secondary .wp-block-button__link.disabled {
    color: var(--wp--preset--color--ivory);
    pointer-events: none;
}

/* Tertiary text link: regular weight, underlined by default, no underline on hover */
.wp-block-button.is-style-text-link-tertiary .wp-block-button__link {
    font-weight: 400;
    text-decoration: underline;
}
.wp-block-button.is-style-text-link-tertiary .wp-block-button__link:hover {
    text-decoration: none;
    color: var(--wp--preset--color--graphite);
}
.wp-block-button.is-style-text-link-tertiary .wp-block-button__link.disabled {
    color: var(--wp--preset--color--ivory);
    pointer-events: none;
    text-decoration: none;
}

/* Stats 3-col: equal-height cards, top section centered, bottom pinned */
.wp-block-columns.els-stats-cols {
    align-items: stretch !important;
}
.wp-block-columns.els-stats-cols > .wp-block-column {
    display: flex !important;
    flex-direction: column !important;
}
.els-stat-card {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}
.els-stat-number {
    min-height: 140px;
    text-align: center;
}
.els-stats-light .els-stat-number {
    min-height: 120px;
    text-align: left;
}
.els-stat-bottom {
    /* always at same distance from top via els-stat-number min-height */
}

/* Constrain cover block content to contentSize (1304px) + match site padding.
   Needed because layout:constrained on wp:cover doesn't apply to inner-container. */
.wp-block-cover.alignfull > .wp-block-cover__inner-container {
    max-width: calc(1304px + 2 * clamp(20px, 5vw, 68px)) !important;
    padding-left: clamp(20px, 5vw, 68px) !important;
    padding-right: clamp(20px, 5vw, 68px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* ==========================================================================
   Fullscreen cover
   ========================================================================== */

.wp-block-cover.is-fullscreen {
    height: 100vh;
    min-height: unset !important;
}

/* ==========================================================================
   Microsite Navigation Bar
   ========================================================================== */

.els-microsite-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    border-top: 1px solid var(--wp--preset--color--ivory);
    border-bottom: 1px solid var(--wp--preset--color--ivory);
}

.admin-bar .els-microsite-nav {
    top: 32px;
}

@media (max-width: 600px) {
    .admin-bar .els-microsite-nav {
        top: 46px;
    }
}

/* Toggle button — hidden on desktop, revealed via mobile CSS */
.els-microsite-nav__toggle {
    display: none;
}

@media (max-width: 781px) {
    /* Allow inner flex to wrap: row 1 = title + toggle, row 2 = links */
    .els-microsite-nav .wp-block-group.is-layout-flex {
        flex-wrap: wrap !important;
        gap: 0 !important;
    }

    /* Title/logo stretches to fill row 1 — works for any element type */
    .els-microsite-nav .wp-block-group.is-layout-flex > :not(.wp-block-buttons):not(.els-microsite-nav__toggle) {
        flex: 1;
    }

    /* Chevron toggle */
    .els-microsite-nav__toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: var(--wp--preset--spacing--xxx-small);
        color: var(--wp--preset--color--graphite);
    }

    .els-microsite-nav__toggle svg {
        transition: transform 0.2s ease;
    }

    .els-microsite-nav.is-open .els-microsite-nav__toggle svg {
        transform: rotate(180deg);
    }

    /* Links: full width, hidden by default, stack vertically when open */
    .els-microsite-nav .wp-block-buttons {
        display: none !important;
        flex: 0 0 100%;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        gap: var(--wp--preset--spacing--xx-small) !important;
        padding: var(--wp--preset--spacing--xx-small) 0;
        border-top: 1px solid var(--wp--preset--color--ivory);
    }

    /* Show links when open */
    .els-microsite-nav.is-open .wp-block-buttons {
        display: flex !important;
    }

    .els-microsite-nav .wp-block-buttons .wp-block-button .wp-block-button__link {
        padding-left: var(--wp--preset--spacing--xx-small);
    }
}

/* ==========================================================================
   Pricing cards
   ========================================================================== */

/* Equal-height columns, CTA pinned to bottom (reuses els-card) */
.els-pricing-cols .wp-block-columns {
    align-items: stretch !important;
}
.els-pricing-cols .wp-block-column {
    display: flex !important;
    flex-direction: column !important;
}

/* Feature list: filled orange circle bullets */
ul.wp-block-list.els-list-pricing {
    list-style: none !important;
    padding-left: 0 !important;
}
ul.wp-block-list.els-list-pricing li {
    padding-left: 22px !important;
    position: relative !important;
    margin-bottom: 8px !important;
}
ul.wp-block-list.els-list-pricing li::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 6px !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background-color: var(--wp--preset--color--vital-orange) !important;
}

/* Active link: editor adds is-active class via Block › Advanced */
.els-microsite-nav .wp-block-button.is-active .wp-block-button__link {
    color: var(--wp--preset--color--action-blue);
    text-decoration: underline;
}
