h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
span {
    text-wrap: pretty;
}
.sponsor_logo {
    padding: 4% 1%;
}
.sponsor_logo a img {
    width: unset !important;
    aspect-ratio: 21/8;
    object-fit: contain;
}

/* ── Speaker Company Logo ─────────────────────────────────────────────────
   Displayed inside .hp-speaker-info when show_logo="yes" is set.
   The wrapper is always 200×90 so the layout stays consistent regardless
   of the logo's original aspect ratio.
──────────────────────────────────────────────────────────────────────── */

.hp-speaker-company-logo-wrap {
    max-width: 100px;
    max-height: 45px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* align left to match text above */
    margin-top: 4px;
}

.hp-speaker-company-logo-wrap .hp-speaker-company-logo {
    max-width: 100px;
    max-height: 45px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ── Session field block ──────────────────────────────────────────────────
   Output of [hp_session_field]. Deliberately understated so it sits inside a
   loop-grid card without competing with the session title. Nothing here renders
   at all when the field is empty — the wrapper is part of the shortcode output,
   not an Elementor container.
──────────────────────────────────────────────────────────────────────── */

.hp-session-field {
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.035);
    border-radius: 6px;
}

.hp-session-field__title {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.7;
}

.hp-session-field__body,
.hp-session-field__body p {
    margin: 0;
}

.hp-session-field__body p + p {
    margin-top: 0.6em;
}

/* ── Experience Type pill ─────────────────────────────────────────────────
   Output of [hp_experience_type]. One pill per tagged Experience Type; where
   the term has a description the pill also carries an "i" icon and reveals a
   tooltip on hover, tap or keyboard focus.

   Everything is driven by the custom properties below, so a placement can be
   restyled from Elementor by setting a variable on an ancestor rather than
   fighting specificity.

   The tooltip has two positioning modes. js/experience-type.js adds .hp-xt-js
   to <html>, which switches it to position: fixed with script-set coordinates
   so a loop-grid card with overflow:hidden or a transform cannot clip it. With
   JS blocked the html:not(.hp-xt-js) rules give a plain CSS hover tooltip
   positioned above the pill — no flip, no clamp, but still readable.
──────────────────────────────────────────────────────────────────────── */

.hp-experience-types {
    --hp-xt-bg: #fff1e8;
    --hp-xt-color: var(--e-global-color-accent, #190f22);
    --hp-xt-bg-active: #ff6a00;
    --hp-xt-color-active: #ffffff;
    --hp-xt-focus: #190f22;
    --hp-xt-radius: 999px;
    --hp-xt-pad-y: 4px;
    --hp-xt-pad-x: 14px;
    --hp-xt-gap: 6px;
    --hp-xt-pill-gap: 6px;
    --hp-xt-tip-bg: #190f22;
    --hp-xt-tip-color: #ffffff;
    --hp-xt-tip-radius: 8px;
    --hp-xt-tip-width: 280px;

    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--hp-xt-pill-gap);
}

.hp-experience-type {
    position: relative;
    display: inline-flex;
}

/* Covers both the <button> (described terms) and the <span> (undescribed),
   so the two are visually identical. The reset is what stops the button
   inheriting theme button styling. */
.hp-experience-type__pill {
    display: inline-flex;
    align-items: center;
    gap: var(--hp-xt-gap);
    margin: 0;
    padding: var(--hp-xt-pad-y) var(--hp-xt-pad-x);
    border: 0;
    border-radius: var(--hp-xt-radius);
    background-color: var(--hp-xt-bg);
    box-shadow: none;
    color: var(--hp-xt-color);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

button.hp-experience-type__pill {
    cursor: help;
}

/* Active state — scoped to pills that actually have something to reveal. A
   description-less pill is a non-interactive span, so colouring it on hover
   would promise a tooltip that never arrives. `.is-open` is included because
   on touch there is no hover at all, and a tapped-open pill still needs to
   look active. */
.hp-experience-type--has-info:hover .hp-experience-type__pill,
.hp-experience-type--has-info.is-open .hp-experience-type__pill,
.hp-experience-type__pill:focus-visible {
    background-color: var(--hp-xt-bg-active);
    color: var(--hp-xt-color-active);
}

/* The accent outline would sit on orange once the pill is active, so the focus
   ring uses the dark tooltip colour, which contrasts on both cream and orange. */
.hp-experience-type__pill:focus-visible {
    outline: 2px solid var(--hp-xt-focus);
    outline-offset: 2px;
}

.hp-experience-type__icon {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    /* Sits on the cap-height centre line rather than the em-box centre. */
    margin-top: -1px;
    opacity: 0.65;
    transition: opacity 0.15s ease;
}

.hp-experience-type--has-info:hover .hp-experience-type__icon,
.hp-experience-type.is-open .hp-experience-type__icon,
.hp-experience-type__pill:focus-visible .hp-experience-type__icon {
    opacity: 1;
}

/* ── Tooltip ───────────────────────────────────────────────────────────── */

.hp-experience-type__tip {
    z-index: 9999;
    width: max-content;
    max-width: min(var(--hp-xt-tip-width), calc(100vw - 24px));
    /* The script promotes this to the top layer with the Popover API, which is
       the only reliable escape from a loop-grid card that has overflow:hidden
       and a transform. These five declarations undo the UA stylesheet for
       [popover], which would otherwise set inset:0 (fighting the script's
       top/left), a visible border, auto margins, and overflow:auto — the last
       of which would clip the arrow. Harmless when popover is not in play. */
    inset: auto;
    height: auto;
    margin: 0;
    border: 0;
    overflow: visible;
    padding: 10px 12px;
    border-radius: var(--hp-xt-tip-radius);
    background-color: var(--hp-xt-tip-bg);
    box-shadow: 0 6px 24px rgba(25, 15, 34, 0.28);
    color: var(--hp-xt-tip-color);
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    /* Non-interactive, so it never swallows a click meant for the card beneath
       it, and on touch a tap on the tooltip counts as a tap outside and closes
       it. The script relies on this: it does not try to keep the tooltip open
       while the cursor is over the tooltip itself. */
    pointer-events: none;
}

.hp-experience-type__tip-title {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
    opacity: 0.7;
}

.hp-experience-type__tip-body,
.hp-experience-type__tip-body p {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.45;
    text-transform: none;
}

.hp-experience-type__tip-body p + p {
    margin-top: 0.6em;
}

.hp-experience-type__tip-arrow {
    position: absolute;
    bottom: -4px;
    left: var(--hp-xt-arrow-x, 50%);
    width: 10px;
    height: 10px;
    margin-left: -5px;
    background-color: var(--hp-xt-tip-bg);
    transform: rotate(45deg);
}

/* Tooltip flipped underneath the pill: arrow moves to the top edge. */
.hp-experience-type--below .hp-experience-type__tip-arrow {
    top: -4px;
    bottom: auto;
}

/* ── Positioned mode (JS present) ──────────────────────────────────────── */

.hp-xt-js .hp-experience-type__tip {
    position: fixed;
    top: 0;
    left: 0;
}

.hp-xt-js .hp-experience-type.is-open .hp-experience-type__tip {
    opacity: 1;
    visibility: visible;
}

/* Without this the popover appears at full opacity, because it goes from
   display:none straight to display:block with no start value to animate from. */
@starting-style {
    .hp-xt-popover .hp-experience-type.is-open .hp-experience-type__tip {
        opacity: 0;
    }
}

/* ── Fallback mode (no JS) ─────────────────────────────────────────────── */

html:not(.hp-xt-js) .hp-experience-type__tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
}

html:not(.hp-xt-js) .hp-experience-type--has-info:hover .hp-experience-type__tip,
html:not(.hp-xt-js) .hp-experience-type--has-info:focus-within .hp-experience-type__tip {
    opacity: 1;
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    .hp-experience-type__pill,
    .hp-experience-type__tip,
    .hp-experience-type__icon {
        transition: none;
    }
}
