/* Legacy UAG block styles — PART 2 (added 2026-09-08)
 *
 * Companion to uag-legacy.css. That file covered the block types found on
 * post 1576 during the 2026-09-01 migration cleanup: container,
 * advanced-heading, buttons(+child/repeater), star-rating, faq(+child),
 * marketing-button. A full site audit on 2026-09-08
 * (SEO/UAGB_BLOCK_AUDIT_2026-09-08.md) found five more UAG block types still
 * present in published content that the first file does not cover.
 *
 * Three of those five are STATIC blocks — their markup persists in
 * post_content after plugin removal, so CSS alone restores them:
 *
 *     call-to-action   9 pages    20 occurrences
 *     icon-list       10 pages   404 occurrences (incl. children)
 *     review           2 pages     6 occurrences
 *
 * This file styles those three, covering 21 pages with no post edits.
 *
 * The other two are DYNAMIC blocks (server-rendered by the plugin). With UAG
 * gone they output NOTHING AT ALL, so no stylesheet can recover them and they
 * are deliberately not attempted here:
 *
 *     image-gallery    4 pages  (4378, 4534, 4627, 6010)
 *     table-of-contents 2 pages (3693, 4853)
 *
 * Those six pages need content replacement — tracked separately in BACKLOG.md.
 *
 * Palette matches uag-legacy.css and the Astra child theme:
 *     brand green #319b42, hover #26802f, navy #004986,
 *     accent orange #f78a0c, rules #eaeaea / #ccd6df, muted text #5b6770
 */

/* ============================================================
 * Call to action
 * ------------------------------------------------------------
 * Markup (static):
 *   .wp-block-uagb-call-to-action.wp-block-button
 *     .uagb-cta__wrap
 *       h3.uagb-cta__title
 *       p.uagb-cta__desc
 *     .uagb-cta__buttons
 *       a.uagb-cta__button-link-wrapper.wp-block-button__link
 *
 * Note the outer element carries `wp-block-button`, which makes core/Astra
 * treat the whole panel as a button. That has to be neutralised first or the
 * layout collapses into an inline pill.
 *
 * These blocks are promotional panels — on /how-to-choose-golf-balls/ and
 * friends the job is to pull readers into /ball-selector/. So this is styled
 * as a deliberate, confident callout card rather than a plain bordered box.
 * ============================================================ */
.wp-block-uagb-call-to-action,
.wp-block-uagb-call-to-action.wp-block-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    position: relative;
    box-sizing: border-box;
    /* reset anything inherited from wp-block-button */
    width: auto;
    font-size: inherit;
    /* the panel itself */
    margin: 2em 0;
    padding: 26px 28px;
    background: linear-gradient(135deg, #f4f8fb 0%, #eaf2f7 100%);
    border: 1px solid #ccd6df;
    border-left: 5px solid #319b42;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 73, 134, 0.07);
}

.wp-block-uagb-call-to-action .uagb-cta__wrap {
    display: block;
    width: 100%;
}

.wp-block-uagb-call-to-action .uagb-cta__title {
    margin: 0 0 10px;
    color: #004986;
    font-size: 1.45em;
    font-weight: 700;
    line-height: 1.25;
}

.wp-block-uagb-call-to-action .uagb-cta__desc {
    margin: 0;
    color: #3c4a54;
    font-size: 1.02em;
    line-height: 1.6;
}

/* Authors used <strong> inside the description as the actual hook line
 * ("GIVE OUR GOLF BALL SELECTOR TOOL A TRY!"). Let it carry real emphasis. */
.wp-block-uagb-call-to-action .uagb-cta__desc strong {
    display: inline-block;
    margin-top: 6px;
    color: #004986;
    font-weight: 700;
}

.wp-block-uagb-call-to-action .uagb-cta__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.wp-block-uagb-call-to-action .uagb-cta__button-link-wrapper,
.wp-block-uagb-call-to-action a.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #319b42;
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    padding: 13px 30px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
    text-align: center;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 5px rgba(38, 128, 47, 0.28);
    transition: background-color 0.15s ease, box-shadow 0.15s ease,
        transform 0.05s ease;
    cursor: pointer;
    max-width: 100%;
}

.wp-block-uagb-call-to-action .uagb-cta__button-link-wrapper:hover,
.wp-block-uagb-call-to-action a.wp-block-button__link:hover {
    background-color: #26802f;
    color: #ffffff !important;
    box-shadow: 0 3px 9px rgba(38, 128, 47, 0.36);
}

.wp-block-uagb-call-to-action .uagb-cta__button-link-wrapper:active,
.wp-block-uagb-call-to-action a.wp-block-button__link:active {
    transform: translateY(1px);
}

.wp-block-uagb-call-to-action .uagb-cta__button-link-wrapper:focus-visible,
.wp-block-uagb-call-to-action a.wp-block-button__link:focus-visible {
    outline: 3px solid #f78a0c;
    outline-offset: 2px;
}

/* Roomier side-by-side treatment once there's space for it. */
@media (min-width: 782px) {
    .wp-block-uagb-call-to-action,
    .wp-block-uagb-call-to-action.wp-block-button {
        flex-direction: row;
        align-items: center;
        gap: 28px;
        padding: 30px 34px;
    }

    .wp-block-uagb-call-to-action .uagb-cta__wrap {
        flex: 1 1 auto;
    }

    .wp-block-uagb-call-to-action .uagb-cta__buttons {
        flex: 0 0 auto;
        width: auto;
    }
}

/* ============================================================
 * Icon list
 * ------------------------------------------------------------
 * Markup (static):
 *   .wp-block-uagb-icon-list
 *     .uagb-icon-list__wrap
 *       .wp-block-uagb-icon-list-child
 *         a[href]                              <- EMPTY, overlay link
 *         span.uagb-icon-list__source-wrap > svg
 *         span.uagb-icon-list__label
 *
 * The anchor is empty and precedes the content: UAG absolutely positioned it
 * over the whole row to make the item clickable. Without that rule the anchor
 * is a zero-size element and the list items stop being links — a real
 * functional loss, not just cosmetic, since several of these are in-page
 * jump links (e.g. #speedtraining on /increase-golf-swing-speed/).
 * ============================================================ */
.wp-block-uagb-icon-list {
    margin: 1.5em 0;
}

.wp-block-uagb-icon-list .uagb-icon-list__wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wp-block-uagb-icon-list-child {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    line-height: 1.55;
}

/* Restore the click target over the whole row. */
.wp-block-uagb-icon-list-child > a {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    border-radius: 4px;
    text-indent: -9999px;
    overflow: hidden;
}

.wp-block-uagb-icon-list-child > a:focus-visible {
    outline: 3px solid #f78a0c;
    outline-offset: 2px;
}

/* Only hint at interactivity when the row is actually linked. */
.wp-block-uagb-icon-list-child:has(> a[href]):hover
    .uagb-icon-list__label {
    color: #004986;
    text-decoration: underline;
}

.wp-block-uagb-icon-list__source-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    /* nudge down so the glyph sits on the first text baseline */
    margin-top: 2px;
}

.wp-block-uagb-icon-list__source-wrap svg,
.uagb-icon-list__source-wrap svg {
    width: 20px;
    height: 20px;
    fill: #319b42;
    display: block;
}

.uagb-icon-list__source-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 2px;
}

.uagb-icon-list__label {
    flex: 1 1 auto;
    color: inherit;
    font-size: 1em;
}

/* ============================================================
 * Review
 * ------------------------------------------------------------
 * Markup (static; the JSON-LD schema script also survives, which is worth
 * keeping — it is the only structured review data on these two posts):
 *   .wp-block-uagb-review.uagb-ratings__outer-wrap
 *     script[application/ld+json]
 *     .uagb_review_block
 *       a.uagb-rating-link-wrapper > h3.uagb-rating-title
 *       p.uagb-rating-desc
 *       p.uagb-rating-author
 *       .uagb-rating__source-wrap > img.uagb-howto__source-image
 *       .uagb_review_entry  (per-criterion rows; .star children)
 *
 * Note: the numeric star fills were rendered by UAG's JS/inline CSS and do
 * not survive. The criterion labels do. Styled so the block reads as a clean
 * review summary card rather than attempting fake stars.
 * ============================================================ */
.wp-block-uagb-review,
.uagb-ratings__outer-wrap {
    margin: 2em 0;
}

.uagb_review_block {
    box-sizing: border-box;
    padding: 24px 26px;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-top: 4px solid #004986;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.uagb-rating-link-wrapper {
    text-decoration: none !important;
}

.uagb-rating-title {
    margin: 0 0 12px;
    color: #004986;
    font-size: 1.35em;
    font-weight: 700;
    line-height: 1.3;
}

.uagb-rating-link-wrapper:hover .uagb-rating-title {
    text-decoration: underline;
}

.uagb-rating-desc {
    margin: 0 0 14px;
    line-height: 1.65;
}

.uagb-rating-author {
    margin: 0 0 16px;
    color: #5b6770;
    font-style: italic;
    font-size: 0.95em;
}

.uagb-rating__source-wrap {
    margin: 0 0 18px;
}

.uagb-rating__source-wrap .uagb-howto__source-image {
    height: auto;
    max-width: 300px;
    border-radius: 8px;
}

.uagb_review_entry {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid #eaeaea;
}

.uagb_review_entry > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-weight: 600;
    color: #3c4a54;
}

.uagb_review_entry .star {
    flex: 0 0 auto;
    color: #f78a0c;
}

@media (min-width: 782px) {
    .uagb-rating__source-wrap {
        float: right;
        margin: 0 0 14px 24px;
    }

    .uagb_review_entry {
        clear: both;
    }
}
