.ead-rotator,
.ead-rotator-edit,
.ead-rotator-settings {
    padding: 0.5rem 0;
}

.ead-rotator-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0.25rem;
    outline: none;
}

.ead-rotator-hero--empty {
    min-height: 0;
}

.ead-rotator-hero--light {
    background: #f4f4f4;
    color: #222;
}

.ead-rotator-hero--dark {
    background: #1b1b1b;
    color: #f4f4f4;
}

.ead-rotator-hero__viewport {
    position: relative;
    min-height: 12rem;
}

.ead-rotator-hero__slide {
    /* Reason: display:none prevented native audio/video from playing even after the slide became active. */
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 0;
    transition: opacity var(--ead-transition, 600ms) ease;
}

.ead-rotator-hero__slide.is-active {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.ead-rotator-hero__image,
.ead-rotator-hero__video {
    display: block;
    width: 100%;
    height: auto;
    max-height: var(--ead-max-height, 70vh);
    object-fit: cover;
}

.ead-rotator-hero__audio {
    display: block;
    width: 100%;
    max-width: 42rem;
    margin: 1.5rem auto;
    padding: 1.5rem;
}

.ead-rotator-hero__bg-audio {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.ead-rotator-hero__embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.ead-rotator-hero__embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ead-rotator-hero__html {
    display: block;
    padding: 1.5rem;
}

.ead-rotator-hero__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1.25rem 3.25rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    color: #fff;
}

.ead-rotator-hero__title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
}

.ead-rotator-hero__description {
    margin: 0;
}

.ead-rotator-hero button.ead-rotator-hero__btn,
.ead-rotator-hero button.ead-rotator-hero__dot {
    /* Reason: DNN skins restyle bare buttons; appearance:none keeps our chrome from vanishing. */
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.ead-rotator-hero__btn {
    position: absolute;
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.ead-rotator-hero__btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.ead-rotator-hero__btn--prev,
.ead-rotator-hero__btn--next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: 50%;
}

.ead-rotator-hero__btn--prev {
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

.ead-rotator-hero__btn--next {
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

.ead-rotator-hero__chevron {
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-color: transparent;
}

.ead-rotator-hero__chevron--prev {
    border-width: 0.45rem 0.65rem 0.45rem 0;
    border-right-color: #fff;
    margin-left: -0.15rem;
}

.ead-rotator-hero__chevron--next {
    border-width: 0.45rem 0 0.45rem 0.65rem;
    border-left-color: #fff;
    margin-right: -0.15rem;
}

.ead-rotator-hero__viewport > .ead-rotator-hero__btn--pause {
    /* Reason: skins and cached DNN CSS were still pinning Pause to top:0.5rem. inset wins over a leftover top. */
    inset: auto 0.5rem 0.5rem auto;
    transform: none;
}

.ead-rotator-hero__dots {
    position: absolute;
    z-index: 2;
    left: 50%;
    right: auto;
    bottom: 0.7rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    transform: translateX(-50%);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.ead-rotator-hero__dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    border: 2px solid #fff;
    padding: 0;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.ead-rotator-hero__dot.is-active,
.ead-rotator-hero__dot[aria-current="true"] {
    background: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .ead-rotator-hero__slide {
        transition: none;
    }
}

.ead-rotator-settings__hint {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.ead-rotator-edit__message {
    color: #a94442;
}

.ead-rotator-edit__table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.ead-rotator-edit__row,
.ead-rotator-edit__add {
    display: grid;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.ead-rotator-edit__row {
    grid-template-columns: 8rem 1fr 1fr 1.5fr 8rem 8rem 10rem auto;
    align-items: start;
}

.ead-rotator-edit__row-actions {
    display: flex;
    gap: 0.35rem;
    margin: 0.35rem 0 0.75rem;
}

.ead-rotator-edit__add label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ead-rotator-edit__hint {
    font-size: 0.9rem;
}

.ead-rotator-edit__nav {
    margin: 0 0 0.75rem;
}

.ead-rotator-edit__thumb {
    display: block;
    width: 6rem;
    height: 4rem;
    object-fit: cover;
}

.ead-rotator-edit__music {
    margin: 1rem 0;
    padding: 0.75rem 0;
}

.ead-rotator-edit__height {
    margin: 1rem 0;
    padding: 0.75rem 0;
}

.ead-rotator-edit__audio {
    display: block;
    max-width: 28rem;
    margin: 0.5rem 0;
}
