/**
 * Shared carousel Pause/Play control — WCAG 2.1 SC 2.2.2 (Pause, Stop, Hide).
 *
 * Paired with assets/js/ucb-carousel-a11y.js. Used by the show-page photo
 * slider and the [ucb_event_grid carousel="true"] event carousel.
 *
 * ⚠ Always visible on purpose — never reveal this on :hover. A control a
 * keyboard or touch user cannot find is not a mechanism, which is the whole
 * reason this button exists. See docs/accessibility.md rule 7.
 *
 * Both host themes are hostile to bare button styling (The7 forces
 * currentColor to white inside .button; the Elementor kit repaints buttons at
 * a specificity our single classes lose to — convention 33), so every visual
 * property here is stated explicitly rather than inherited, and the selector
 * is doubled to win without !important.
 */

/* Guarantee the mount is a positioning context — added by the JS. Without it
   an absolutely-positioned button resolves against whatever ancestor happens
   to be positioned and lands somewhere arbitrary. */
.ucb-carousel-a11y-host {
    position: relative;
}

/* Anchored TOP-right, not bottom-right.
   The mount element wraps the whole component, and every carousel in this
   plugin puts its chrome along the bottom edge — page dots, the thumbnail
   strip, and the per-slide info bar with its Get Tickets button. Bottom-right
   collided with all three. The prev/next arrows are vertically centred, so the
   top corner is the one region that is clear in every configuration. */
.ucb-carousel-playpause.ucb-carousel-playpause {
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    z-index: 3;

    display: flex;
    align-items: center;
    justify-content: center;

    /* 28px visual, 32x32 box — clears the 24x24 minimum without reading as a
       primary control. It is chrome, not a call to action, so it should be
       quiet: the loudest thing on a show card must stay Get Tickets. */
    width: 32px;
    height: 32px;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.45);
    box-shadow: none;
    color: #fff;
    font-size: 0; /* kills any inherited line-height box around the svg */
    line-height: 1;
    text-transform: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Subtle at rest, unmistakable on interaction. Never fully transparent —
   a control that cannot be found is not a mechanism (SC 2.2.2). */
.ucb-carousel-playpause.ucb-carousel-playpause:hover,
.ucb-carousel-playpause.ucb-carousel-playpause:focus {
    opacity: 1;
    background: rgba(0, 0, 0, 0.85);
    border-color: #fff;
    color: #fff;
}

/* 3:1 against both the dark button and any poster behind it (SC 1.4.11). */
.ucb-carousel-playpause.ucb-carousel-playpause:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Drive the glyph explicitly — The7 turns currentColor white inside .button,
   so an inherited fill is not predictable here. */
.ucb-carousel-playpause.ucb-carousel-playpause svg {
    display: block;
    width: 11px;
    height: 11px;
    fill: #fff;
    pointer-events: none;
}

/* When the carousel has a page-dot row, that row is the component's own chrome
   lane — drop the control into it rather than floating over a card. Added by
   ucb-carousel-a11y.js once Flickity has actually built the dots. */
.has-dot-row > .ucb-carousel-playpause.ucb-carousel-playpause {
    top: auto;
    bottom: 4px;
    right: 12px;
    background: rgba(20, 20, 20, 0.28);
    border-color: rgba(20, 20, 20, 0.3);
}

.has-dot-row > .ucb-carousel-playpause.ucb-carousel-playpause svg {
    fill: #1c1c1c;
}

.has-dot-row > .ucb-carousel-playpause.ucb-carousel-playpause:hover,
.has-dot-row > .ucb-carousel-playpause.ucb-carousel-playpause:focus {
    background: rgba(20, 20, 20, 0.8);
    border-color: #1c1c1c;
}

.has-dot-row > .ucb-carousel-playpause.ucb-carousel-playpause:hover svg,
.has-dot-row > .ucb-carousel-playpause.ucb-carousel-playpause:focus svg {
    fill: #fff;
}

/* Focus ring needs 3:1 against whatever it sits on; the dot row is a light
   ground, so the white ring used over artwork would vanish there. */
.has-dot-row > .ucb-carousel-playpause.ucb-carousel-playpause:focus-visible {
    outline-color: #1c1c1c;
}

@media (prefers-reduced-motion: reduce) {
    .ucb-carousel-playpause.ucb-carousel-playpause {
        transition: none;
    }
}
