/* Wahlomat Modal Adjustments */
.c-history_wrap {
    max-width: 100vw;
    width: 100%;
    max-height: 100vh;
    overflow-y: auto;
}

#modal-content-wahlomat {
    padding: 0;
    background: #1B3B6B;
    border-radius: 0;
    min-height: 100vh;
}

#modal-content-wahlomat .c-wahlomat {
    padding: 40px 0;
}

/* Theme Checkboxes */
.c-wahlomat_theme-checkbox {
    display: block;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.c-wahlomat_theme-checkbox.-all {
    text-align: center;
    padding: 25px 30px;
    font-size: 20px;
}

.c-wahlomat_theme-checkbox:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.c-wahlomat_theme-checkbox input[type="checkbox"]:checked ~ * {
    opacity: 1;
}

.c-wahlomat_theme-checkbox:has(input:checked) {
    background: rgba(255, 255, 255, 0.25);
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.c-wahlomat_theme-checkbox input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: none;
    accent-color: #4CAF50;
}

.c-wahlomat_theme-label {
    display: inline-block;
    color: white;
    font-size: 18px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.c-wahlomat_theme-checkbox.-all .c-wahlomat_theme-label {
    font-size: 22px;
}

.c-wahlomat_theme-checkbox input[type="checkbox"]:checked ~ .c-wahlomat_theme-label {
    font-weight: 700;
    color: #fff;
}

.c-wahlomat_theme-count {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: all 0.3s ease;
}

.c-wahlomat_theme-checkbox.-all .c-wahlomat_theme-count {
    font-size: 16px;
}

.c-wahlomat_theme-checkbox input[type="checkbox"]:checked ~ .c-wahlomat_theme-count {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

/* Divider - Oder-Trenner */
.c-wahlomat_divider {
    position: relative;
    text-align: center;
    margin: 40px 0;
}

.c-wahlomat_divider::before,
.c-wahlomat_divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.c-wahlomat_divider::before {
    left: 0;
}

.c-wahlomat_divider::after {
    right: 0;
}

.c-wahlomat_divider span {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ensure modal scrolls properly */
.c-history.is-open {
    overflow-y: auto;
}

.c-history_inner {
    max-height: none;
}

/* Dark background for modal */
.c-history_background {
    background: rgba(0, 0, 0, 0.9);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .c-history_wrap {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #modal-content-wahlomat {
        border-radius: 0;
        min-height: auto;
    }
    
    #modal-content-wahlomat .c-wahlomat {
        padding: 20px 0;
    }
    
    .c-wahlomat_theme-checkbox {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .c-wahlomat_theme-label {
        font-size: 16px;
    }
}

/* Fix for title animations in modal */
#modal-content-wahlomat .c-title-lines > div > div {
    transform: translate3d(0, 0, 0) !important;
    transition: transform 0.6s cubic-bezier(0.35, 0.755, 0.42, 0.95);
}

/* Fix for title animations on themen.php page */
body:has(.c-wahlomat) .c-title-lines > div > div {
    transform: translate3d(0, 0, 0) !important;
}

/* Ensure accordion items are visible */
#modal-content-wahlomat .c-accordion_item {
    opacity: 1;
    visibility: visible;
}
