.q4u-breaking-news-modal .modal-header {
    --bs-modal-header-border-width: 0;
    align-self: flex-end;
    position: absolute;
    z-index: 1050;
    margin-top: 0.3rem;
}

.q4u-breaking-news-modal .modal-body {
    padding: var(--bs-modal-padding);
}


.q4u-breaking-news-modal .swiper-slide-image {
    width: 100%;
    height: auto;
}

.q4u-breaking-news-modal .swiper-slide-content {
    width: 100%;
    height: 100%;
    display: flex;
    position: absolute;
    top: 0;
    box-sizing: border-box;
}

.q4u-breaking-news-modal .swiper-thumb .swiper-slide {
    height: 100%;
    opacity: 0.4;
}

.q4u-breaking-news-modal .swiper-thumb .swiper-slide-thumb-active {
    opacity: 1 !important;
}

.q4u-breaking-news-modal .stretched-slider-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

.q4u-breaking-news-modal .swiper-slide-content.right-top {
    align-items: flex-start !important;
    justify-content: end !important;
    text-align: right !important;
}

.q4u-breaking-news-modal .swiper-slide-content.right-center {
    align-items: center !important;
    justify-content: end !important;
    text-align: right !important;
}

.q4u-breaking-news-modal .swiper-slide-content.right-bottom {
    align-items: flex-end !important;
    justify-content: end !important;
    text-align: right !important;
}

.q4u-breaking-news-modal .swiper-slide-content.left-top {
    align-items: flex-start !important;
}

.q4u-breaking-news-modal .swiper-slide-content.left-center {
    align-items: center !important;
}

.q4u-breaking-news-modal .swiper-slide-content.left-bottom {
    align-items: flex-end !important;
}

.q4u-breaking-news-modal .swiper-slide-content.center-top {
    align-items: start !important;
    justify-content: center !important;
    text-align: center !important;
}

.q4u-breaking-news-modal .swiper-slide-content.center-center {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.q4u-breaking-news-modal .swiper-slide-content.center-bottom {
    align-items: end !important;
    justify-content: center !important;
    text-align: center !important;
}

.q4u-breaking-news-modal .w-25 {
    width: 25% !important;
}

.q4u-breaking-news-modal .w-33 {
    width: 33% !important;
}

.q4u-breaking-news-modal .w-50 {
    width: 50% !important;
}

.q4u-breaking-news-modal .w-66 {
    width: 66% !important;
}

.q4u-breaking-news-modal .w-75 {
    width: 75% !important;
}

.q4u-breaking-news-modal .w-100 {
    width: 100% !important;
}

/* Breaking news slider style */

.q4u-breaking-news-modal .swiper-wrapper {
    height: 450px;
}

.q4u-breaking-news-modal .swiper-slide {
    flex-direction: column;
    gap: 0.5rem;
}

/* Single slide: nothing useful in the controls pill (no timer/pause/dots
   make sense with one slide, and the in-pill close button has been retired
   in favour of the modal-header .btn-close). Hide the whole pill.
   Marker class .is-single-slide is set in JS (BreakingNews.js) because
   Swiper's `swiper-pagination-lock` is unreliable with loop:true. */
.q4u-breaking-news-modal.is-single-slide .q4u-custom-buttons {
    display: none;
}

.q4u-breaking-news-modal .q4u-swiper-slide {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    height: 100%;
}

.q4u-breaking-news-modal .q4u-swiper-slide .slide-img {
    flex: 1;
    width: 100%;
    height: calc(100% - 45px);
    position: relative;
}

.q4u-breaking-news-modal .q4u-swiper-slide .slide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.q4u-breaking-news-modal .q4u-swiper-slide .swiper-slide-content {
    flex: 2;
    position: relative;
    height: auto;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: start !important;
}

.q4u-breaking-news-modal .q4u-custom-buttons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    /* Glassmorphism — identisch zum Haupt-Slider */
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    max-width: fit-content;
    margin: 1rem auto auto;
    padding: 0 0.5rem;
    border-radius: 24px;
    border: none;
}

.q4u-breaking-news-modal .q4u-custom-buttons .autoplay-progress,
.q4u-breaking-news-modal .q4u-custom-buttons .swiper-button-pause,
.q4u-breaking-news-modal .q4u-custom-buttons .swiper-pagination {
    position: relative;
    margin: 0;
}

/* Reset button defaults for accessible <button> nav elements
   WCAG 2.5.8: min 44×44px touch target */
.q4u-breaking-news-modal .q4u-custom-buttons button {
    appearance: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--bs-white);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.q4u-breaking-news-modal .q4u-custom-buttons button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.q4u-breaking-news-modal .q4u-custom-buttons button:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

/* Pause/Play button — SVG icons sized to match prev/next */
.q4u-breaking-news-modal .swiper-button-pause svg {
    width: 20px;
    height: 20px;
}

.q4u-breaking-news-modal .swiper-button-pause .play-icon {
    display: none;
}

.q4u-breaking-news-modal .swiper-button-pause.is-paused .pause-icon {
    display: none;
}

.q4u-breaking-news-modal .swiper-button-pause.is-paused .play-icon {
    display: flex;
}

/* Timer — inline in controls bar.
   Includes base styles from swiper-addons.css (not loaded by Breaking News)
   + overrides for absolute positioning and _carousel.scss leaks. */
.q4u-breaking-news-modal .q4u-custom-buttons .autoplay-progress {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    top: auto;
    transform: none;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 0.7rem;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
}

/* SVG circle animation — CSS-driven countdown (3 s = autoplay delay).
   Restarted per slide via .restart class toggle in JS. */
@keyframes bn-timer-stroke {
    from { stroke-dashoffset: 125.6px; }
    to   { stroke-dashoffset: 0; }
}

.q4u-breaking-news-modal .q4u-custom-buttons .autoplay-progress svg {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    stroke-width: 4px;
    stroke: #fff;
    fill: none;
    stroke-dasharray: 125.6;
    stroke-dashoffset: 125.6px;
    transform: rotate(-90deg);
}

.q4u-breaking-news-modal .q4u-custom-buttons .autoplay-progress svg circle {
    animation: bn-timer-stroke 3s linear forwards;
}

/* Restart trick: removing .running briefly resets the animation */
.q4u-breaking-news-modal .q4u-custom-buttons .autoplay-progress:not(.running) svg circle {
    animation: none;
}

/* Pause: freeze animation when autoplay is paused */
.q4u-breaking-news-modal .q4u-custom-buttons .autoplay-progress.paused svg circle {
    animation-play-state: paused;
}

/* Spacing: Timer | Pause | — Dots — | Close */
.q4u-breaking-news-modal .q4u-custom-buttons .swiper-button-pause {
    margin: 0 1rem 0 0;
}

/* Override _carousel.scss (.swiper .swiper-pagination.swiper-pagination-bullets)
   which adds translate, padding, background, backdrop-filter for the main slider */
.q4u-breaking-news-modal .swiper-pagination-bullets.swiper-pagination-horizontal {
    bottom: auto;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    display: flex;
    translate: none;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    box-sizing: border-box;
}

.q4u-breaking-news-modal .q4u-custom-buttons .swiper-pagination-bullet {
    --swiper-pagination-color: #fff;
    --swiper-pagination-bullet-inactive-color: rgba(255, 255, 255, 0.5);
    --swiper-pagination-bullet-inactive-opacity: 1;
    background-color: var(--swiper-pagination-bullet-inactive-color);
    position: relative;
    width: 12px;
    height: 12px;
    margin-right: 4px;
    margin-left: 4px;
    /* Match main Swiper pattern (_carousel.scss): pill-morph on active. */
    /* 50rem (not 50%) clamps to min(w,h)/2 → round at 12×12, perfect pill at 24×12. */
    border-radius: 50rem;
    border: none;
    opacity: 1;
}

.q4u-breaking-news-modal .q4u-custom-buttons .swiper-pagination-bullet.swiper-pagination-bullet-active {
    background-color: var(--swiper-pagination-color);
}

@media (max-width: 1219.98px) {
    .q4u-breaking-news-modal .swiper-wrapper {
        height: auto;
    }

    .q4u-breaking-news-modal .q4u-swiper-slide {
        flex-direction: column;
        overflow: hidden;
        overflow-y: auto;
    }

    .q4u-breaking-news-modal .q4u-swiper-slide .slide-img {
        height: auto;
        flex: none;
    }

    .q4u-breaking-news-modal .q4u-swiper-slide .slide-img img {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }
}

@media (max-width: 767.98px) {
    .q4u-breaking-news-modal .w-25,
    .q4u-breaking-news-modal .w-33,
    .q4u-breaking-news-modal .w-50,
    .q4u-breaking-news-modal .w-66,
    .q4u-breaking-news-modal .w-75,
    .q4u-breaking-news-modal .w-100 {
        width: 100% !important;
    }
}

/* ── Copyright & AI Info Pill — bottom-right on slide image ── */
.q4u-breaking-news-modal .slide-img .swiper-image-info {
    position: absolute;
    z-index: 10;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 10px;
    height: 40px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-radius: 24px;
    color: #fff;
    cursor: default;
    transition: background-color 0.15s ease;
}

.q4u-breaking-news-modal .slide-img .swiper-image-info:hover {
    background: rgba(0, 0, 0, 0.5);
}

.q4u-breaking-news-modal .swiper-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.q4u-breaking-news-modal .swiper-info-btn svg {
    width: 20px;
    height: 20px;
}

.q4u-breaking-news-modal .swiper-slide {
    display: flex !important;
}

