/**
 * @pendo/guide-components - Default Styles
 *
 * Library defaults are emitted UNLAYERED and rely on selector specificity (with
 * source order breaking ties) rather than CSS cascade layers. For normal
 * declarations, cascade layers always lose to unlayered styles — so a layered
 * library was overridden by a host app's unlayered reset (e.g. `* { padding: 0 }`)
 * regardless of selector specificity. Customer themes should likewise be
 * unlayered and loaded after this stylesheet so equal-specificity rules win.
 *
 * Components inherit from customer design tokens when available via CSS variables.
 */

/* =============================================================================
   CSS Custom Properties (Theming)
   Customers can override these, or they inherit from brand variables
   ============================================================================= */

pendo-guide,
.pendo-guide {
    /* Primary theming - inherit from customer's design tokens if available */
    --pendo-primary: var(--brand-primary, #E84855);
    --pendo-primary-hover: var(--brand-primary-hover, #d43d4a);
    --pendo-font: var(--brand-font, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    --pendo-radius: var(--brand-radius, 8px);
    --pendo-bg: var(--brand-surface, #ffffff);
    --pendo-text: var(--brand-text, #1a1a1a);
    --pendo-text-muted: var(--brand-text-muted, #666666);

    /* Component-specific */
    --pendo-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    --pendo-spacing: 24px;
    --pendo-spacing-sm: 12px;
    --pendo-spacing-xs: 8px;
    --pendo-focus: var(--brand-focus, #005fcc);
    --pendo-border: var(--brand-border, #e0e0e0);
    --pendo-progress-dot-inactive: var(--pendo-text-muted, var(--pendo-border));
    --pendo-close-button-size: 28px;
    /* Proportional to the button so a resized close button keeps its icon centred. */
    --pendo-close-button-icon-size: calc(var(--pendo-close-button-size) * 0.57);
}

/* =============================================================================
   CSS Reset (Light DOM protection)
   Prevents external styles from breaking components
   ============================================================================= */

pendo-guide,
pendo-guide *,
pendo-guide *::before,
pendo-guide *::after {
    box-sizing: border-box;
}

pendo-guide {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   pendo-guide (Container)
   ============================================================================= */

pendo-guide,
.pendo-guide {
    position: relative;
    display: block;
    background: var(--pendo-bg);
    border-radius: var(--pendo-radius);
    box-shadow: var(--pendo-shadow);
    padding: var(--pendo-spacing);
    font-family: var(--pendo-font);
    color: var(--pendo-text);
    max-width: 400px;
    width: 100%;
}

/* Semantic layout elements */
pendo-guide-content {
    display: block;
}

pendo-guide-footer {
    display: flex;
    gap: var(--pendo-spacing-xs);
    margin-top: var(--pendo-spacing);
    justify-content: flex-end;
}

/* Layout variants (applied by pendo-client) */
.pendo-guide--lightbox {
    /* Lightbox is centered via container positioning */
}

.pendo-guide--tooltip {
    /* Container handles absolute positioning; this is relative for caret */
    position: relative;
    min-width: 280px;
    width: max-content;
    max-width: 360px;

    /* How far the caret protrudes from the card. Its base is twice this. */
    --pendo-caret-size: 8px;
}

/**
 * The caret is a square rotated 45deg, half of it hanging off the card and half lapping back over
 * the card's border.
 *
 * `border: inherit` is what makes the caret share the card's border: it takes the card's own border
 * width, style and colour, so the outline continues down the caret's two outer sides and vanishes
 * entirely when the card has no border (`border-style: none` computes every width to 0). Each
 * direction below drops the border from the caret's two *inner* sides, and the inner half's
 * background paints over the card's border where the caret meets it — without that the card's border
 * would draw a line straight across the caret's base.
 *
 * Size and placement both work off the *content* box, i.e. the caret as it would look with no
 * border; the inherited border then mitres a matching outline around it. A square of side L spans
 * L * sqrt(2) once rotated, so a content box of sqrt(2) * --pendo-caret-size draws a caret
 * --pendo-caret-size tall and twice that wide — the same caret as before it had a border at all.
 *
 * The two side vertices of that content diamond have to land exactly *on* the card's padding-box
 * edge. Any further out and the border's mitre around them hangs down inside the card as a pair of
 * nubs, which is what makes the two borders look like they don't meet. So the placement pins the
 * diamond's far vertex --pendo-caret-size inside the card (the `calc(100% - ...)` anchors, which sit
 * the box's inner edge there) and the 20.710678% — that is 100 * (1/sqrt(2) - 1/2) — walks it back
 * out by the difference between half the box's side and half its diagonal. Both terms are in units
 * of the box, so the whole caret grows with the border width the way a mitred corner does; the tip
 * lands (sqrt(2) - 1) border-widths past the gap the card was positioned with, well under a pixel
 * at ordinary border widths.
 */
.pendo-guide--tooltip::before {
    content: '';
    position: absolute;
    box-sizing: content-box;
    width: calc(var(--pendo-caret-size) * 1.41421356);
    height: calc(var(--pendo-caret-size) * 1.41421356);
    background: var(--pendo-bg);
    border: inherit;
    border-radius: 0;
    z-index: 1;
}

/* Card below the target: caret on the card's top edge, pointing up. */
.pendo-guide--tooltip-bottom::before {
    bottom: calc(100% - var(--pendo-caret-size));
    left: 50%;
    transform: translate(-50%, -20.710678%) rotate(45deg);
    border-right-width: 0;
    border-bottom-width: 0;
}

/* Card above the target: caret on the bottom edge, pointing down. */
.pendo-guide--tooltip-top::before {
    top: calc(100% - var(--pendo-caret-size));
    left: 50%;
    transform: translate(-50%, 20.710678%) rotate(45deg);
    border-top-width: 0;
    border-left-width: 0;
}

/* Card left of the target: caret on the right edge, pointing right. */
.pendo-guide--tooltip-left::before {
    left: calc(100% - var(--pendo-caret-size));
    top: 50%;
    transform: translate(20.710678%, -50%) rotate(45deg);
    border-bottom-width: 0;
    border-left-width: 0;
}

/* Card right of the target: caret on the left edge, pointing left. */
.pendo-guide--tooltip-right::before {
    right: calc(100% - var(--pendo-caret-size));
    top: 50%;
    transform: translate(-20.710678%, -50%) rotate(45deg);
    border-top-width: 0;
    border-right-width: 0;
}

.pendo-guide--tooltip-top.hbias-right::before,
.pendo-guide--tooltip-bottom.hbias-right::before {
    left: 18px;
}

.pendo-guide--tooltip-top.hbias-left::before,
.pendo-guide--tooltip-bottom.hbias-left::before {
    left: auto;
    right: 2px;
}

.pendo-guide--banner {
    max-width: none;
    width: 100%;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* Horizontal layout for banner */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--pendo-spacing);
    padding: var(--pendo-spacing-sm) var(--pendo-spacing);
}

.pendo-guide--banner pendo-title {
    margin: 0;
    font-size: 1rem;
}

.pendo-guide--banner pendo-text {
    margin: 0;
    font-size: 0.875rem;
}

.pendo-guide--banner pendo-button + pendo-button {
    margin-left: var(--pendo-spacing-xs);
}

/* Slideout layout */
.pendo-guide--slideout {
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.pendo-guide--slideout-right,
.pendo-guide--slideout-top-right,
.pendo-guide--slideout-bottom-right {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.pendo-guide--slideout-left,
.pendo-guide--slideout-top-left,
.pendo-guide--slideout-bottom-left {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* =============================================================================
   pendo-title
   ============================================================================= */

pendo-title,
.pendo-guide__title {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--pendo-text);
    margin: 0 0 var(--pendo-spacing-sm) 0;
    line-height: 1.3;
}

/* =============================================================================
   pendo-text
   ============================================================================= */

pendo-text,
.pendo-guide__text {
    display: block;
    font-size: 0.9375rem;
    color: var(--pendo-text);
    margin: 0 0 var(--pendo-spacing) 0;
    line-height: 1.6;
}

pendo-text:last-child {
    margin-bottom: 0;
}

/* =============================================================================
   pendo-button

   The `--pendo-button-*` custom properties below are the component's public
   theming API, not decoration: `.pendo-button` is the real control (the host
   `pendo-button` element only wraps it), so a theme rule on the authored tag
   offers an inherited value that can never beat these declarations. Setting the
   variable is the only way in.

   Every fallback is the value this sheet hard-coded before the variable existed,
   so a theme that sets none of them renders exactly as it did. The names and
   fallbacks are mirrored in `theme-tokens.js`, which ships as
   `dist/theme-tokens.json` for consumers to assert against, and
   `test/theme-tokens.test.js` fails if the two drift.
   ============================================================================= */

/* The host wraps the control, so it must not paint.
 *
 * A theme written for Pendo's classic tag-based rendering styles the authored
 * `pendo-button` tag, because there that tag *was* the button. Here it is a
 * wrapper around the real `button.pendo-button`, so the same rule draws a second
 * box around the control instead. The paint cannot reach the control either:
 * `background`, `border` and `padding` do not inherit, and `all: unset` plus the
 * declarations below outrank an inherited value for the properties that do. So
 * the rule is pure decoy — it can only ever double the box.
 *
 * `!important` because a theme cannot be out-specified. Novus scopes theme rules
 * as `pendo-guide[data-pendo-theme-id="..."] pendo-button` and leaves them
 * unlayered deliberately, so they beat this sheet on specificity and, at equal
 * specificity, on source order (see the header comment). An `!important`
 * declaration is the only one that wins regardless — and it is already what a
 * consumer resorts to: Novus's preview zeroes this same host padding with it.
 *
 * Listed positively, as the variants this sheet actually paints. Anything else —
 * `variant="link"`, and equally a `variant="tertiary"` a consumer only warns
 * about — matches no `.pendo-button--*` rule, so its inner node keeps the
 * transparent background `all: unset` gives it and the host's box is the only
 * paint surface that button has. Novus's properties panel writes a plain
 * `background-color` there for exactly those variants (`buttonVariantOf` buckets
 * every unrecognised value with `link`), so resetting them would make that
 * control accept a colour and change nothing — the defect this contract exists to
 * prevent. A `:not([variant="link"])` would have caught the unknown values too,
 * which is why the list is positive rather than an exclusion.
 *
 * `[variant=""]` is listed for the same reason `:not([variant])` is: the element
 * resolves its variant as `getAttribute("variant") || "primary"`, so an empty
 * attribute paints as primary. Without it the inner node would be painted while
 * the host stayed paintable, which is the doubled box surviving in one spot.
 *
 * Padding is not scoped, because the inner control declares its own for every
 * variant, so host padding always doubles.
 *
 * `margin` is deliberately absent: the host is where a button's margin belongs,
 * and both `pendo-button + pendo-button` below and Novus's Margin control write
 * it there.
 *
 * `box-shadow` and `outline` are absent too, for a different reason. Neither
 * draws the second *box* this rule exists to remove, and once the host carries
 * no padding both hug the control closely enough to read as its own. Resetting
 * them would kill an author's inline `style` with nowhere to put the intent:
 * `border` has `--pendo-button-border` to land in and `background` has
 * `--pendo-button-bg`, but there is no outline token, and a theme's host
 * `box-shadow` is hoisted by the consumer's formatter already.
 */
pendo-button {
    display: inline-block;
    padding: 0 !important;
}

pendo-button:not([variant]),
pendo-button[variant=""],
pendo-button[variant="primary"],
pendo-button[variant="secondary"] {
    background: none !important;
    border: 0 !important;
}

pendo-button + pendo-button {
    margin-left: var(--pendo-spacing-xs);
}

.pendo-button {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Split x/y rather than one shorthand so a consumer's Padding control can stay an x/y pair. */
    padding: var(--pendo-button-padding-y, var(--pendo-spacing-sm)) var(--pendo-button-padding-x, var(--pendo-spacing));
    /* Its own token rather than `--pendo-radius`: that one is also the guide container's radius, so
       sharing it would round the modal to match its buttons. */
    border-radius: var(--pendo-button-radius, var(--pendo-radius));
    /* `all: unset` above already computes box-shadow to `none`, so this adds a destination for a
       theme's elevation without changing what an unset button renders. */
    box-shadow: var(--pendo-button-shadow, none);
    font-family: var(--pendo-font);
    font-size: var(--pendo-button-font-size, 0.9375rem);
    font-weight: var(--pendo-button-font-weight, 500);
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.pendo-button:hover {
    opacity: 0.9;
}

/**
 * `--pendo-button-bg` overrides the fill for resting primary buttons only; `:hover` below still
 * reads `--pendo-primary-hover`, so a theme that sets a fill keeps the hover feedback.
 *
 * `border` has no vendored value at all (`all: unset` computes it away), which is why a theme that
 * wants a bordered primary button needs a token rather than a rule on the host.
 */
.pendo-button--primary {
    background: var(--pendo-button-bg, var(--pendo-primary));
    border: var(--pendo-button-border, none);
    color: var(--pendo-primary-text, #ffffff);
}

.pendo-button--primary:hover {
    background: var(--pendo-primary-hover);
    opacity: 1;
}

/**
 * The token sits in the shorthand's colour slot, not in place of the whole `border`, so a theme
 * choosing a secondary border colour cannot silently drop the 1px solid along with it.
 */
.pendo-button--secondary {
    background: var(--pendo-button-secondary-bg, transparent);
    border: 1px solid var(--pendo-button-secondary-border, var(--pendo-border));
    color: var(--pendo-button-secondary-text, var(--pendo-text));
}

.pendo-button--secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    opacity: 1;
}

/* Button container for multiple buttons */
pendo-guide > pendo-button:last-child,
pendo-guide > :last-child pendo-button {
    margin-top: var(--pendo-spacing-sm);
}

/* =============================================================================
   pendo-close-button
   ============================================================================= */

pendo-close-button {
    position: absolute;
    top: var(--pendo-spacing-sm);
    right: var(--pendo-spacing-sm);
    z-index: 1;
}

.pendo-close-button {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--pendo-close-button-size);
    height: var(--pendo-close-button-size);
    border-radius: 50%;
    cursor: pointer;
    color: var(--pendo-text-muted);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pendo-close-button:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--pendo-text);
}

.pendo-close-button:focus-visible {
    outline: 2px solid var(--pendo-focus);
    outline-offset: 2px;
}

.pendo-close-button__icon {
    width: var(--pendo-close-button-icon-size);
    height: var(--pendo-close-button-icon-size);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =============================================================================
   pendo-image
   ============================================================================= */

pendo-image,
.pendo-guide__image-container {
    display: block;
    margin: var(--pendo-spacing-sm) 0;
}

.pendo-guide__image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: calc(var(--pendo-radius) / 2);
}

.pendo-guide__image-container--error {
    background: var(--pendo-border);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pendo-guide__image-container--error::after {
    content: 'Image failed to load';
    color: var(--pendo-text-muted);
    font-size: 0.875rem;
}

/* =============================================================================
   pendo-divider
   ============================================================================= */

pendo-divider,
.pendo-guide__divider {
    display: block;
    height: 1px;
    background: var(--pendo-border);
    margin: var(--pendo-spacing) 0;
    border: none;
}

/* =============================================================================
   pendo-video
   ============================================================================= */

pendo-video,
.pendo-guide__video-container {
    display: block;
    margin: var(--pendo-spacing-sm) 0;
}

.pendo-guide__video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: calc(var(--pendo-radius) / 2);
    background: #000;
}

/* =============================================================================
   pendo-link
   ============================================================================= */

pendo-link {
    display: inline;
}

.pendo-link {
    /* Same reason as the buttons: `.pendo-link` is the real anchor inside the `pendo-link` host and
       declares its own colour, so an inherited value from a theme rule on the tag never applies. */
    color: var(--pendo-link-color, var(--pendo-primary));
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.pendo-link:hover {
    color: var(--pendo-primary-hover);
}

.pendo-link:focus-visible {
    outline: 2px solid var(--pendo-focus);
    outline-offset: 2px;
    border-radius: 2px;
}

/* =============================================================================
   pendo-list
   ============================================================================= */

pendo-list,
.pendo-list {
    display: block;
    margin: var(--pendo-spacing-sm) 0;
}

.pendo-list__items {
    margin: 0;
    padding-left: 1.5em;
    list-style: none;
}

.pendo-list--bullet .pendo-list__items {
    list-style-type: disc;
}

.pendo-list--numbered .pendo-list__items {
    list-style-type: decimal;
}

.pendo-list--check .pendo-list__items {
    padding-left: 0;
}

.pendo-list__item {
    margin-bottom: 0.5em;
    font-size: 0.9375rem;
    color: var(--pendo-text);
    line-height: 1.5;
}

.pendo-list__item:last-child {
    margin-bottom: 0;
}

.pendo-list--check .pendo-list__item {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
}

.pendo-list__check {
    flex-shrink: 0;
    width: 1.25em;
    height: 1.25em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875em;
    color: var(--pendo-text-muted);
}

.pendo-list__check--checked {
    color: var(--pendo-primary);
}

/* =============================================================================
   pendo-input
   ============================================================================= */

pendo-input,
.pendo-input {
    display: block;
    margin: var(--pendo-spacing-sm) 0;
}

.pendo-input__wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

.pendo-input__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pendo-text);
}

.pendo-input__required {
    color: var(--pendo-primary);
}

.pendo-input__field {
    width: 100%;
    padding: 0.625em 0.75em;
    font-family: var(--pendo-font);
    font-size: 0.9375rem;
    color: var(--pendo-text);
    background: var(--pendo-bg);
    border: 1px solid var(--pendo-border);
    border-radius: calc(var(--pendo-radius) / 2);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pendo-input__field::placeholder {
    color: var(--pendo-text-muted);
}

.pendo-input__field:focus {
    outline: none;
    border-color: var(--pendo-primary);
    box-shadow: 0 0 0 3px rgba(232, 72, 85, 0.15);
}

.pendo-input__field:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

textarea.pendo-input__field {
    resize: vertical;
    min-height: 4em;
}

select.pendo-input__field {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5em center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5em;
}

/* Checkbox and radio styles */
.pendo-input__checkbox-group,
.pendo-input__radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.pendo-input__checkbox-item,
.pendo-input__radio-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--pendo-text);
}

.pendo-input__checkbox-item input,
.pendo-input__radio-item input {
    width: 1.125em;
    height: 1.125em;
    margin: 0;
    cursor: pointer;
    accent-color: var(--pendo-primary);
}

/* =============================================================================
   Poll Components (Base)
   ============================================================================= */

.pendo-poll {
    display: block;
    margin: var(--pendo-spacing-sm) 0;
}

.pendo-poll__fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.pendo-poll__question {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--pendo-text);
    margin-bottom: var(--pendo-spacing-sm);
}

/* =============================================================================
   pendo-star-rating
   ============================================================================= */

.pendo-star-rating__stars {
    display: flex;
    gap: 4px;
}

.pendo-star-rating__star {
    cursor: pointer;
    transition: transform 0.1s ease;
}

.pendo-star-rating__star:hover {
    transform: scale(1.1);
}

.pendo-star-rating__icon {
    width: 32px;
    height: 32px;
    fill: var(--pendo-border);
    stroke: var(--pendo-border);
    stroke-width: 1px;
    transition: fill 0.15s ease;
}

.pendo-star-rating__star--selected .pendo-star-rating__icon,
.pendo-star-rating__star--highlighted .pendo-star-rating__icon {
    fill: #F5A623;
    stroke: #E09000;
}

.pendo-star-rating__star:focus-within .pendo-star-rating__icon {
    outline: 2px solid var(--pendo-focus);
    outline-offset: 2px;
    border-radius: 4px;
}

/* =============================================================================
   pendo-nps
   ============================================================================= */

.pendo-nps__scale {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.pendo-nps__score {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 24px;
    height: 32px;
    border: 1px solid var(--pendo-border);
    border-radius: 4px;
    background: var(--pendo-bg);
    cursor: pointer;
    transition: all 0.15s ease;
}

.pendo-nps__score:hover {
    border-color: var(--pendo-primary);
}

.pendo-nps__score--selected {
    background: var(--pendo-primary);
    border-color: var(--pendo-primary);
    color: #ffffff;
}

.pendo-nps__score:focus-within {
    outline: 2px solid var(--pendo-focus);
    outline-offset: 2px;
}

.pendo-nps__score-value {
    font-size: 0.75rem;
    font-weight: 500;
}

.pendo-nps__labels {
    display: flex;
    justify-content: space-between;
}

.pendo-nps__label {
    font-size: 0.75rem;
    color: var(--pendo-text-muted);
}

/* =============================================================================
   pendo-number-scale
   ============================================================================= */

.pendo-number-scale__wrapper {
    display: inline-block;
}

.pendo-number-scale__scale {
    display: flex;
    gap: 4px;
}

.pendo-number-scale__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--pendo-border);
    border-radius: 4px;
    background: var(--pendo-bg);
    cursor: pointer;
    transition: all 0.15s ease;
}

.pendo-number-scale__item:hover {
    border-color: var(--pendo-primary);
}

.pendo-number-scale__item--selected {
    background: var(--pendo-primary);
    border-color: var(--pendo-primary);
    color: #ffffff;
}

.pendo-number-scale__item:focus-within {
    outline: 2px solid var(--pendo-focus);
    outline-offset: 2px;
}

.pendo-number-scale__value {
    font-size: 0.875rem;
    font-weight: 500;
}

.pendo-number-scale__labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.pendo-number-scale__label {
    font-size: 0.75rem;
    color: var(--pendo-text-muted);
}

/* =============================================================================
   pendo-open-text
   ============================================================================= */

.pendo-open-text__wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

.pendo-open-text__input {
    width: 100%;
    padding: 0.625em 0.75em;
    font-family: var(--pendo-font);
    font-size: 0.9375rem;
    color: var(--pendo-text);
    background: var(--pendo-bg);
    border: 1px solid var(--pendo-border);
    border-radius: calc(var(--pendo-radius) / 2);
    resize: vertical;
    min-height: 4em;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pendo-open-text__input::placeholder {
    color: var(--pendo-text-muted);
}

.pendo-open-text__input:focus {
    outline: none;
    border-color: var(--pendo-primary);
    box-shadow: 0 0 0 3px rgba(232, 72, 85, 0.15);
}

.pendo-open-text__counter {
    font-size: 0.75rem;
    color: var(--pendo-text-muted);
    text-align: right;
}

/* =============================================================================
   pendo-emoji-scale
   ============================================================================= */

.pendo-emoji-scale__options {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.pendo-emoji-scale__option {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.15s ease;
    border: 2px solid transparent;
}

.pendo-emoji-scale__option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.pendo-emoji-scale__option--selected {
    border-color: var(--pendo-primary);
    background: rgba(232, 72, 85, 0.1);
}

.pendo-emoji-scale__option:focus-within {
    outline: 2px solid var(--pendo-focus);
    outline-offset: 2px;
}

.pendo-emoji-scale__emoji {
    font-size: 2rem;
    line-height: 1;
    display: block;
}

/* =============================================================================
   Progress Indicator
   ============================================================================= */

.pendo-guide__progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--pendo-spacing);
    padding-bottom: var(--pendo-spacing-sm);
    border-bottom: 1px solid var(--pendo-border);
}

/* Close button is absolute top-right; keep progress dots out from under it */
pendo-guide:has(> pendo-close-button) .pendo-guide__progress {
    padding-right: calc(var(--pendo-close-button-size) + var(--pendo-spacing-sm));
}

.pendo-guide__progress-text {
    font-size: 0.8125rem;
    color: var(--pendo-text-muted);
}

.pendo-guide__progress-dots {
    display: flex;
    gap: 6px;
}

.pendo-guide__progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pendo-progress-dot-inactive, var(--pendo-border));
    transition: background-color 0.2s ease;
}

.pendo-guide__progress-dot--complete {
    background: var(--pendo-primary);
    opacity: 0.5;
}

.pendo-guide__progress-dot--current {
    background: var(--pendo-primary);
    opacity: 1;
}

/* =============================================================================
   Accessibility
   ============================================================================= */

/* Visible focus indicators */
.pendo-button:focus-visible {
    outline: 2px solid var(--pendo-focus);
    outline-offset: 2px;
}

pendo-guide:focus {
    outline: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    pendo-guide,
    pendo-guide * {
        animation: none !important;
        transition: none !important;
    }
}

/* Visually hidden but screen-reader accessible */
.pendo-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Dark mode is owned per-guide by the theme CSS, not the library — no dark override here. */

