#ulo-treatment-selector {
    --ulo-ingredient-line-width: 47px;
    max-width: 1300px!important;
    background: #eae8df;
    padding: 16px 24px;
    border-radius: 12px;
    margin: 40px auto;
    position: relative;
    min-width: 900px;
}

@media screen and (max-width: 1000px) {
    #ulo-treatment-selector {
        min-width: unset;
    }
}

#ulo-treatment-selector::after {
    content: '*Only if eligible, prescriptions require doctor approval';
    font-size: 12px;
    color: #716f69;
    position: absolute;
    bottom: -24px;
    left: 0;
}
#ulo-treatment-selector h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 4px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

#ulo-treatment-selector .ulo-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 240px)) 1fr;
    gap: 16px;
    min-height: 420px;
}

/* Explicit desktop column placement so results always stay at the end */
@media (min-width: 769px) {
    #ulo-treatment-selector #base-controls { grid-column: 1; }
    #ulo-treatment-selector #secondary-controls { grid-column: 2; }
    #ulo-treatment-selector .ulo-no-secondary #addon-controls { grid-column: 2; }
    #ulo-treatment-selector .ulo-no-secondary #results-section { grid-column: 3 / 5; }
    #ulo-treatment-selector #addon-controls { grid-column: 3; }
    #ulo-treatment-selector #results-section { grid-column: 4; }
}

@media (max-width: 768px) {
    #ulo-treatment-selector .ulo-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "results results"
            "base base"
            "secondary secondary"
            "addon addon";
    }
    /* Make results hero/image full-width on mobile */
    #ulo-treatment-selector #results,
    #ulo-treatment-selector .ulo-results-hero {
        width: 100%!important;
        margin: 0;
    }
    #ulo-treatment-selector #base-controls { grid-area: base; }
    #ulo-treatment-selector #secondary-controls { grid-area: secondary; }
    #ulo-treatment-selector #addon-controls { grid-area: addon; }
    #ulo-treatment-selector #results-section { grid-area: results; }
    /* Mobile CTA button appended under Add-ons */
    #ulo-treatment-selector .ulo-btn-mobile {
        display: block;
        margin: 8px 0 0 0;
        padding: 12px 16px;
        background: #333;
        color: #fff;
        border-radius: 12px;
        text-align: center;
        text-decoration: none;
        font-size: 16px;
    }
    #ulo-treatment-selector .ulo-btn-divider {
        border-top: 1px solid #d8d5c9;
        margin-top: 20px;
        margin-bottom: 20px;
    }
}
#ulo-treatment-selector .ulo-ingredients {
    margin: 0;
    padding: 0;
}
#ulo-treatment-selector .ulo-ingredients li {
    list-style: none;
    display: block;
    border-radius: 30px;
    border: 1px solid #000;
    padding: 4px 12px;
    backdrop-filter: blur(6px);
    font-size: 12px;
    font-weight: 300;
    max-width: 135px;
    position: relative;
    transition: all 0.25s;
    margin: 8px 0;
    min-width: 105px;
}
#ulo-treatment-selector .ulo-ingredients li::after {
    content: '';
    display: block;
    width: var(--ulo-ingredient-line-width);
    height: 1px;
    background: #000;
    position: absolute;
    right: calc(var(--ulo-ingredient-line-width) * -1);
    top: 50%;
}
#ulo-treatment-selector .ulo-ingredients li::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background: transparent;
    border: 2px solid #000;
    /* margin: 8px 0; */
    position: absolute;
    right: calc(var(--ulo-ingredient-line-width) * -1 - 12px);
    top: calc(50% - 6.5px);
    border-radius: 50%;
}

#ulo-treatment-selector #results[data-count="3"] .ulo-ingredients li:first-child::after,
#ulo-treatment-selector #results[data-count="4"] .ulo-ingredients li:first-child::after,
#ulo-treatment-selector #results[data-count="5"] .ulo-ingredients li:first-child::after,
#ulo-treatment-selector #results[data-count="5"] .ulo-ingredients li:nth-child(2)::after,
#ulo-treatment-selector #results[data-count="6"] .ulo-ingredients li:first-child::after,
#ulo-treatment-selector #results[data-count="6"] .ulo-ingredients li:nth-child(2)::after {
    width: calc(var(--ulo-ingredient-line-width) + 12px);
    right: calc(var(--ulo-ingredient-line-width) * -1 - 12px);
}
#ulo-treatment-selector #results[data-count="3"] .ulo-ingredients li:first-child::before,
#ulo-treatment-selector #results[data-count="4"] .ulo-ingredients li:first-child::before,
#ulo-treatment-selector #results[data-count="5"] .ulo-ingredients li:first-child::before,
#ulo-treatment-selector #results[data-count="5"] .ulo-ingredients li:nth-child(2)::before,
#ulo-treatment-selector #results[data-count="6"] .ulo-ingredients li:first-child::before,
#ulo-treatment-selector #results[data-count="6"] .ulo-ingredients li:nth-child(2)::before {
    right: calc(var(--ulo-ingredient-line-width) * -1 - 12px - 12px);
}

/* Loading and error states */
#ulo-treatment-selector .ulo-loading {
    grid-column: 1 / -1;
    padding: 16px;
    text-align: center;
}

#ulo-treatment-selector .ulo-error {
    grid-column: 1 / -1;
    padding: 16px;
    text-align: center;
    color: #b00020;
}

/* Results hero image */
#ulo-treatment-selector .ulo-results-hero {
    display: block;
    border-radius: 12px;
    height: auto;
    margin: 0 0 12px 0;
}
#ulo-treatment-selector .ulo-results-hero,
.ulo-promo-image {
    filter: blur(8px);
    transition: filter 240ms ease;
}
#ulo-treatment-selector .ulo-results-hero.is-loaded,
.ulo-promo-image.is-loaded {
    filter: blur(0);
}
#ulo-treatment-selector #results,
#ulo-treatment-selector .ulo-results-hero {
    width: 340px;
    margin: 0 0 0 auto;
}
#ulo-treatment-selector #results {
    position: relative;
    display: flex; 
    justify-content: flex-end;
}
#ulo-treatment-selector .ulo-btn {
    display: inline-block;
    margin: 8px 0 0 0;
    padding: 10px 0;
    background: #333;
    color: #ffffff;
    border-radius: 0 0 12px 12px;
    text-decoration: none;
    font-size: 14px;
    position: absolute;
    bottom: 0;
    width: 100%;
    max-width: 340px;
    text-align: center;
    left: 0;
    z-index: 2;
}
#ulo-treatment-selector .ulo-btn:hover {
    background: #333333;
}
#ulo-treatment-selector #results .ulo-grid {
    position: absolute;
    top: 10px;
    left: 10px;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Each radio/checkbox option on its own line */
#ulo-treatment-selector .ulo-controls label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: center;
}

#ulo-treatment-selector #gender-list label,
#ulo-treatment-selector #age-list label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 230px;
}

#ulo-treatment-selector #gender-list label > div {
    width: 50%;
}

#ulo-treatment-selector #age-list label > div {
    width: 50%;
}

/* Place gender and age next to each other */
#ulo-treatment-selector .ulo-top-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    #ulo-treatment-selector .ulo-top-row {
        flex-direction: column;
    }
}

/* Space between the control and its text */
#ulo-treatment-selector .ulo-controls label input[type="radio"],
#ulo-treatment-selector .ulo-controls label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}

/* Make the visible pill */
#ulo-treatment-selector .ulo-controls label > span:not(.ulo-dep) {
    display: block;
    padding: 10px 12px;
    border: 1px solid #d8d5c9;
    border-radius: 9999px;
    background: #f7f5f0;
    color: #716f69;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

/* Hover state */
#ulo-treatment-selector .ulo-controls label:hover > span:not(.ulo-dep) {
    border-color: #d8d5c9;
}

/* Checked state */
#ulo-treatment-selector .ulo-controls label input[type="radio"]:checked + span:not(.ulo-dep),
#ulo-treatment-selector .ulo-controls label input[type="checkbox"]:checked + span:not(.ulo-dep) {
    background: #333333;
    border-color: #333333;
    color: #f7f5ef;
}

/* Focus state for keyboard navigation */
#ulo-treatment-selector .ulo-controls label input[type="radio"]:focus + span:not(.ulo-dep),
#ulo-treatment-selector .ulo-controls label input[type="checkbox"]:focus + span:not(.ulo-dep) {
    outline: 2px solid #0a7cff;
    outline-offset: 2px;
}

/* Inline tooltip used in headings */
#ulo-treatment-selector .ulo-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 12px;
    line-height: 18px;
    border-radius: 50%;
    border: 1px solid #9aa6b2;
    color: #556170;
    cursor: help;
    position: relative;
    margin-left: 3px;
    top: -1px;
}

#ulo-treatment-selector .ulo-tooltip:focus {
    outline: 2px solid #0a7cff;
    outline-offset: 2px;
}

#ulo-treatment-selector .ulo-tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: normal;
    width: 260px;
    background: #111111;
    color: #ffffff;
    padding: 8px 10px;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
    transition: opacity 120ms ease, visibility 120ms ease;
    z-index: 10;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

/* Small arrow pointing to the icon */
#ulo-treatment-selector .ulo-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #111111 transparent transparent transparent;
}

#ulo-treatment-selector .ulo-tooltip:hover .ulo-tooltip-text,
#ulo-treatment-selector .ulo-tooltip:focus .ulo-tooltip-text {
    visibility: visible;
    opacity: 1;
}

#ulo-treatment-selector .ulo-tooltip.is-visible .ulo-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Gender toggle (scoped) */
#ulo-treatment-selector .ulo-toggleContainer {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: fit-content;
    border: 3px solid #343434;
    border-radius: 20px;
    background: #343434;
    font-weight: 400;
    color: #343434;
    cursor: pointer;
}
#ulo-treatment-selector .ulo-toggleContainer::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 100%;
    left: 0%;
    border-radius: 20px;
    background: #f7f5ef;
    transition: all 0.3s;
}
#ulo-treatment-selector .ulo-toggleCheckbox:checked + .ulo-toggleContainer::before {
    left: 50%;
}
#ulo-treatment-selector .ulo-toggleContainer div {
    padding: 6px;
    text-align: center;
    z-index: 1;
}
#ulo-treatment-selector .ulo-toggleCheckbox {
    display: none;
}
#ulo-treatment-selector .ulo-toggleCheckbox:checked + .ulo-toggleContainer div:first-child {
    color: #ffffff;
    transition: color 0.3s;
}
#ulo-treatment-selector .ulo-toggleCheckbox:checked + .ulo-toggleContainer div:last-child {
    color: #343434;
    transition: color 0.3s;
}
#ulo-treatment-selector .ulo-toggleCheckbox + .ulo-toggleContainer div:first-child {
    color: #343434;
    transition: color 0.3s;
}
#ulo-treatment-selector .ulo-toggleCheckbox + .ulo-toggleContainer div:last-child {
    color: #ffffff;
    transition: color 0.3s;
}
#ulo-treatment-selector .ulo-controls label > span, #ulo-treatment-selector h3, #ulo-treatment-selector .ulo-toggleContainer div, .page-wrap ul, #ulo-treatment-selector .ulo-btn { font-family: Lato, sans-serif; line-height:20px }
#ulo-treatment-selector .ulo-ingredients li { color: #000; }
/* New styles for promo shortcode */
.ulo-promo {
    background: #eaf3f8;
    border-radius: 12px;
    padding: 24px 40px;
    margin: 40px auto;
    max-width: 1300px!important;
    position: relative;
}
.ulo-promo-inner {
    display: grid;
    grid-template-columns: 75% 25%;
    gap: 24px;
    align-items: center;
}
/* Prevent themes from injecting quotes or other pseudo-elements */
.ulo-promo *::before,
.ulo-promo *::after {
    content: none !important;
}
/* Belt-and-suspenders: disable CSS-generated quotes entirely */
.ulo-promo,
.ulo-promo *,
.ulo-promo h1, .ulo-promo h2, .ulo-promo h3,
.ulo-promo p, .ulo-promo a, .ulo-promo span,
.ulo-promo q, .ulo-promo blockquote {
    quotes: none !important;
}
.ulo-promo h2,
.page-wrap .ulo-promo h2 {
    font-size: 40px;
    margin-bottom: 6px;
}
.ulo-promo h1::before, .ulo-promo h1::after,
.ulo-promo h2::before, .ulo-promo h2::after,
.ulo-promo h3::before, .ulo-promo h3::after,
.ulo-promo p::before, .ulo-promo p::after,
.ulo-promo a::before, .ulo-promo a::after,
.ulo-promo q::before, .ulo-promo q::after,
.ulo-promo blockquote::before, .ulo-promo blockquote::after {
    content: none !important;
}
.ulo-promo-title {
    font-size: 42px;
    line-height: 1.1;
    margin: 0 0 12px 0;
    font-family: 'DM Serif Display', serif;
}
.ulo-promo-subtitle {
    font-size: 22px;
    font-weight: 700;
    color: #474c54;
    margin: 0 0 18px 0;
    font-family: 'DM Serif Display', serif;
}
.ulo-promo-desc {
    font-size: 18px;
    color: #474c54;
    margin: 24px 0 30px 0;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
}
.ulo-promo-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 40px;
    margin: 0 0 16px 0;
}
.ulo-promo-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ulo-promo-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 8px 0;
    font-size: 22px;
}
.ulo-promo-list li::before {
    content: '\2022';
    color: #4a4a4a;
    font-size: 26px;
    line-height: 1;
}
.ulo-promo-cta-wrap { margin: 10px 0 0 0; }
.ulo-promo-cta {
    display: inline-block;
    background: #ff7a00;
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    padding: 14px 40px;
    font-weight: 600;
    font-size: 18px;
    font-family: 'Open Sans', sans-serif;
}
.ulo-promo-cta:hover { background: #ff8e26; }
.ulo-promo-disclaimer {
    font-size: 12px;
    color: #716f69;
    margin-top: 16px;
    margin-bottom: 0!important;
    position: absolute;
    bottom: 14px;
    left: 30px;
    line-height: 18px;
}
.ulo-promo-media { text-align: center; }
.ulo-promo-image { height: 400px; border-radius: 12px; }

@media (max-width: 768px) {
    .ulo-promo { text-align: center; padding: 24px}
    .ulo-promo-inner {
        grid-template-columns: 1fr;
    }
    .ulo-promo-media { grid-row: 1; }
    .ulo-promo-copy { grid-row: 2; }
    .ulo-promo-image { height: 300px; }
    .ulo-promo-disclaimer { position: relative; left: auto; bottom: auto; text-align: center; }
    .ulo-promo-cta { display: block; width: 100%; padding: 14px 0; }
    .ulo-promo-title { font-size: 32px; }
    .ulo-promo-subtitle { font-size: 18px; }
    .ulo-promo-desc { font-size: 18px; }
    .ulo-promo-list { grid-template-columns: 1fr; }
    .ulo-promo-media { text-align: center; }
    .ulo-promo h2, .page-wrap .ulo-promo h2 { font-size: 34px;}
}