.tx-civil-protection .civil-protection-list {
    margin-bottom: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 15px; /* Platz für pulsierende Schatten */
}

.tx-civil-protection .list-title {
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 2rem;
}

.tx-civil-protection .official-warning-card {
    background: #fff;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    font-family: sans-serif;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 300px;
    text-align: left;
    box-sizing: border-box;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 4px;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s ease;
    overflow: visible; /* Schatten sichtbar machen */
    max-height: 1500px;
}

.tx-civil-protection .warning-item.official-warning-card {
    margin-bottom: 1.5rem;
}

.tx-civil-protection .official-warning-card.is-hidden {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    max-height: 0 !important;
    min-height: 0 !important;
    width: 0 !important;
    flex-basis: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    border-color: transparent !important;
    pointer-events: none;
    visibility: hidden;
    overflow: hidden;
    box-shadow: none !important;
}

.tx-civil-protection .warning-item.official-warning-card .card-side-bar {
    width: 15px;
}

.tx-civil-protection .card-header-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 5px;
}

.tx-civil-protection .card-header-row .official-warning-icon {
    width: 32px;
    height: auto;
    flex-shrink: 0;
    margin-top: 5px;
}

.tx-civil-protection .card-header-row .official-warning-headline {
    margin-bottom: 0;
    font-size: 1.4rem;
    line-height: 1.2;
}

.tx-civil-protection .warning-item .card-meta-inline {
    margin-bottom: 15px;
    gap: 10px;
}

.tx-civil-protection .warning-item .official-warning-text {
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tx-civil-protection .text-content.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 6; /* Ungefähr 300-400 Zeichen je nach Breite */
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 12em; /* Erhöht für 6 Zeilen */
}

.tx-civil-protection .text-expand-btn,
.tx-civil-protection .areas-expand-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 5px 0 0 0;
    cursor: pointer;
    color: #666;
    font-size: 1rem;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
    outline: none;
    flex-shrink: 0;
}

.tx-civil-protection .text-expand-btn:focus-visible,
.tx-civil-protection .areas-expand-btn:focus-visible {
    outline: 2px solid #E2001A;
    outline-offset: 2px;
}

.tx-civil-protection .text-expand-btn[aria-expanded="true"] .arrow,
.tx-civil-protection .areas-expand-btn[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

.tx-civil-protection .text-expand-btn .arrow,
.tx-civil-protection .areas-expand-btn .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.tx-civil-protection .warning-item .official-warning-areas {
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.tx-civil-protection .civil-protection-ticker {
    background: #f8f9fa;
    border-top: 2px solid #E2001A;
    border-bottom: 2px solid #E2001A;
    padding: 8px 0;
    margin-bottom: 20px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.tx-civil-protection .ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: cp-ticker-animation 90s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
}

.tx-civil-protection .civil-protection-ticker:hover .ticker-content {
    animation-play-state: paused;
}

@keyframes cp-ticker-animation {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.tx-civil-protection .ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 4rem;
    font-size: 1.1rem;
    color: #333;
}

.tx-civil-protection .ticker-icon {
    height: 1.4rem;
    width: auto;
    margin-right: 10px;
    flex-shrink: 0;
}

.tx-civil-protection .ticker-date {
    margin-right: 10px;
    font-weight: bold;
    color: #666;
}

/* Severity Badges */
.tx-civil-protection .badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    margin-right: 10px;
    color: #fff;
    line-height: 1.4;
    white-space: nowrap;
}

.tx-civil-protection .badge-severity-extreme {
    background-color: #8D1D75;
}

.tx-civil-protection .badge-severity-severe {
    background-color: #E2001A;
}

.tx-civil-protection .badge-severity-moderate {
    background-color: #FF7F00;
}

.tx-civil-protection .badge-severity-minor {
    background-color: #1da752;
}

.tx-civil-protection .badge-severity-unknown {
    background-color: #777;
}

.tx-civil-protection .ticker-item strong {
    color: #333;
}

.tx-civil-protection .ticker-item.severity-extreme strong,
.tx-civil-protection .ticker-item.severity-severe strong {
    color: #E2001A;
}

.tx-civil-protection .ticker-areas {
    margin-left: 5px;
    font-size: 0.9rem;
    color: #666;
}

.tx-civil-protection .ticker-item.severity-extreme {
    font-weight: bold;
}

.tx-civil-protection .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.tx-civil-protection .modal-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    width: 95%;
    gap: 20px;
}

.tx-civil-protection .modal-content {
    background: #fff;
    padding: 0;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow-y: auto;
}

.tx-civil-protection .modal-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.tx-civil-protection .modal-header-row .brand-logo {
    height: 30px;
    width: auto;
}

.tx-civil-protection .modal-header-row .modal-close {
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: #666;
}

.tx-civil-protection .modal-header-row .modal-close:hover {
    color: #333;
}

/* Critical Warning Card Design */
.tx-civil-protection .critical-warnings-section {
    margin-bottom: 3rem;
    position: relative;
}

.tx-civil-protection .official-warning-card {
    background: #fff;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    font-family: sans-serif;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 300px;
    text-align: left;
    box-sizing: border-box;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 4px;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s ease;
    overflow: visible;
    max-height: 1500px;
    will-change: transform, opacity, max-height;
}


.tx-civil-protection .card-side-bar {
    width: 30px;
    flex-shrink: 0;
}

.tx-civil-protection .card-side-bar.severity-extreme { background-color: #8D1D75; }
.tx-civil-protection .card-side-bar.severity-severe { background-color: #E2001A; }
.tx-civil-protection .card-side-bar.severity-moderate { background-color: #FF7F00; }
.tx-civil-protection .card-side-bar.severity-minor { background-color: #1da752; }
.tx-civil-protection .card-side-bar.severity-unknown { background-color: #777; }

.tx-civil-protection .card-main-content {
    flex-grow: 1;
    padding: 15px 20px 20px 20px;
    display: flex;
    flex-direction: column;
}

.tx-civil-protection .card-meta-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: #666;
}

.tx-civil-protection .card-meta-inline .date-time {
    font-weight: bold;
}

.tx-civil-protection .card-body-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    flex-grow: 1;
}

.tx-civil-protection .official-warning-icon-column {
    width: 120px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tx-civil-protection .official-warning-icon {
    width: 100%;
    height: auto;
    aspect-ratio: 100 / 87;
    margin: 0;
}

/* Severity specific icon colors */
.tx-civil-protection .official-warning-icon.severity-extreme path,
.tx-civil-protection .ticker-icon.severity-extreme path,
.tx-civil-protection .list-warning-icon.severity-extreme path { fill: #8D1D75; }
.tx-civil-protection .official-warning-icon.severity-extreme text,
.tx-civil-protection .ticker-icon.severity-extreme text,
.tx-civil-protection .list-warning-icon.severity-extreme text { fill: #fff; }

.tx-civil-protection .official-warning-icon.severity-severe path,
.tx-civil-protection .ticker-icon.severity-severe path,
.tx-civil-protection .list-warning-icon.severity-severe path { fill: #E2001A; }
.tx-civil-protection .official-warning-icon.severity-severe text,
.tx-civil-protection .ticker-icon.severity-severe text,
.tx-civil-protection .list-warning-icon.severity-severe text { fill: #fff; }

.tx-civil-protection .official-warning-icon.severity-moderate path,
.tx-civil-protection .ticker-icon.severity-moderate path,
.tx-civil-protection .list-warning-icon.severity-moderate path { fill: #FF7F00; }
.tx-civil-protection .official-warning-icon.severity-moderate text,
.tx-civil-protection .ticker-icon.severity-moderate text,
.tx-civil-protection .list-warning-icon.severity-moderate text { fill: #000; }

.tx-civil-protection .official-warning-icon.severity-minor path,
.tx-civil-protection .ticker-icon.severity-minor path,
.tx-civil-protection .list-warning-icon.severity-minor path { fill: #1da752; }
.tx-civil-protection .official-warning-icon.severity-minor text,
.tx-civil-protection .ticker-icon.severity-minor text,
.tx-civil-protection .list-warning-icon.severity-minor text { fill: #fff; }

.tx-civil-protection .official-warning-icon.severity-unknown path,
.tx-civil-protection .ticker-icon.severity-unknown path,
.tx-civil-protection .list-warning-icon.severity-unknown path { fill: #777; }
.tx-civil-protection .official-warning-icon.severity-unknown text,
.tx-civil-protection .ticker-icon.severity-unknown text,
.tx-civil-protection .list-warning-icon.severity-unknown text { fill: #fff; }

.tx-civil-protection .list-warning-icon {
    height: 1.5rem;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

.tx-civil-protection .official-warning-severity-text {
    margin-top: 10px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    text-align: center;
    color: #333;
    line-height: 1.2;
}

.tx-civil-protection .official-warning-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tx-civil-protection .official-warning-headline {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.tx-civil-protection .official-warning-headline.long-title {
    font-size: 1.4rem;
}

.tx-civil-protection .official-warning-headline.severity-extreme,
.tx-civil-protection .official-warning-headline.severity-severe,
.tx-civil-protection .warning-item.severity-extreme h3,
.tx-civil-protection .warning-item.severity-severe h3 {
    color: #E2001A;
}

/* Pulsating Shadow Animations */
@keyframes cp-pulse-extreme {
    0% { box-shadow: 0 2px 5px rgba(0,0,0,0.05), 0 0 0 0 rgba(141, 29, 117, 0.7); }
    70% { box-shadow: 0 2px 5px rgba(0,0,0,0.05), 0 0 0 15px rgba(141, 29, 117, 0); }
    100% { box-shadow: 0 2px 5px rgba(0,0,0,0.05), 0 0 0 0 rgba(141, 29, 117, 0); }
}

@keyframes cp-pulse-severe {
    0% { box-shadow: 0 2px 5px rgba(0,0,0,0.05), 0 0 0 0 rgba(226, 0, 26, 0.7); }
    70% { box-shadow: 0 2px 5px rgba(0,0,0,0.05), 0 0 0 15px rgba(226, 0, 26, 0); }
    100% { box-shadow: 0 2px 5px rgba(0,0,0,0.05), 0 0 0 0 rgba(226, 0, 26, 0); }
}

.tx-civil-protection .official-warning-card.severity-extreme:not(.is-hidden) {
    animation: cp-pulse-extreme 2s infinite;
}

.tx-civil-protection .official-warning-card.severity-severe:not(.is-hidden) {
    animation: cp-pulse-severe 2s infinite;
}

.tx-civil-protection .modal-overlay .official-warning-card.severity-extreme:not(.is-hidden),
.tx-civil-protection .modal-overlay .official-warning-card.severity-severe:not(.is-hidden) {
    animation: none;
}

.tx-civil-protection .official-warning-text {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tx-civil-protection .official-warning-areas {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    width: 100%;
}

.tx-civil-protection .official-warning-areas strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}

.tx-civil-protection .areas-flex-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.tx-civil-protection .areas-list-container {
    display: block;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    transition: max-height 0.3s ease;
}

.tx-civil-protection .areas-list-container.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 1.4em;
}


/* Filter Styles */
.warning-filter-container {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.warning-filter-container.modal-filter {
    margin: 15px;
    background: #fff;
}

.warning-filter-container .filter-label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.warning-filter-container .filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.warning-filter-container .filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 4px;
    background: #eee;
    transition: background 0.2s;
}

.warning-filter-container .filter-option:hover {
    background: #e0e0e0;
}

.warning-filter-container .filter-option.severity-extreme { border-left: 4px solid #8D1D75; }
.warning-filter-container .filter-option.severity-severe { border-left: 4px solid #E2001A; }
.warning-filter-container .filter-option.severity-moderate { border-left: 4px solid #FF7F00; }
.warning-filter-container .filter-option.severity-minor { border-left: 4px solid #1da752; }
.warning-filter-container .filter-option.severity-unknown { border-left: 4px solid #777; }

.warning-filter-container .filter-option input {
    margin: 0;
}

/* Ensure long words and titles wrap instead of being cut off */
.tx-civil-protection .official-warning-headline,
.tx-civil-protection .official-warning-text {
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.tx-civil-protection .dismiss-warning-row {
    margin-top: auto;
    padding-top: 20px;
}

.tx-civil-protection .dismiss-warning-checkbox-wrapper {
    background: #666;
    color: #fff;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Slider / Carousel Styles */
.civil-protection-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    -webkit-overflow-scrolling: touch;
}

.civil-protection-slider .official-warning-card {
    scroll-snap-align: center;
    flex: 0 0 100%;
    width: 100%;
}

.civil-protection-slider .official-warning-card.is-hidden {
    flex: 0 0 0 !important;
    width: 0 !important;
    margin: 0 !important;
}

/* Hide scrollbar but allow scroll */
.civil-protection-slider::-webkit-scrollbar {
    height: 8px;
}

/* Slider Navigation */
.slider-nav {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: normal;
    flex-shrink: 0;
}

.slider-nav:hover {
    background: white;
}

/* Hide nav if only one slide? JS handles logic but visually it can be always there as container relative */

/* "More Information" Button */
.tx-civil-protection .btn-more {
    display: inline-block;
    background-color: #E2001A;
    color: #fff;
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 15px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.tx-civil-protection .btn-more.severity-extreme { background-color: #8D1D75; }
.tx-civil-protection .btn-more.severity-severe { background-color: #E2001A; }
.tx-civil-protection .btn-more.severity-moderate { background-color: #FF7F00; }
.tx-civil-protection .btn-more.severity-minor { background-color: #1da752; }
.tx-civil-protection .btn-more.severity-unknown { background-color: #777; }

.tx-civil-protection .btn-more:hover {
    filter: brightness(0.9);
    color: #fff;
    text-decoration: none;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    /* Keep overlay visible as overlay: add padding and reduce content height */
    .tx-civil-protection .modal-container {
        width: 100%;
        height: auto;
        max-width: none;
        gap: 0;
        flex-direction: column;
        padding: 12px;
        box-sizing: border-box;
    }

    .tx-civil-protection .modal-content {
        width: 100%;
        height: auto;
        max-height: 85vh;
        border-radius: 8px;
    }

    /* Stack card vertically on small screens */
    .tx-civil-protection .official-warning-card {
        flex-direction: column;
        min-height: auto;
    }

    .tx-civil-protection .card-side-bar {
        width: 100%;
        height: 6px;
    }

    .tx-civil-protection .card-body-content {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
    }

    .tx-civil-protection .official-warning-icon-column {
        width: 100%;
        max-width: 120px;
    }

    .tx-civil-protection .card-meta-inline {
        justify-content: center;
        margin-bottom: 10px;
    }

    .tx-civil-protection .official-warning-icon {
        width: 80px;
        height: auto;
        margin: 0;
    }

    .tx-civil-protection .official-warning-info {
        width: 100%;
        text-align: left;
    }

    .tx-civil-protection .official-warning-headline {
        font-size: 1.4rem;
        line-height: 1.2;
    }

    .tx-civil-protection .official-warning-text {
        font-size: 1rem;
    }

    .tx-civil-protection .card-header-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .tx-civil-protection .card-header-row .official-warning-icon {
        margin-top: 0;
    }

    .tx-civil-protection .warning-item .card-meta-inline {
        justify-content: center;
    }

    /* Keep the mobile nav fixed at the bottom */
    .slider-nav {
        position: fixed;
        bottom: 10px;
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #ddd;
    }

    .slider-prev {
        left: 20%;
    }

    .slider-next {
        right: 20%;
    }
}
