.alegeri-container .parliament-elections-container {
    margin: 0px!important;
}

.parliament-elections-container {
    padding-bottom: 12vh;
    padding-top: 4.2vh;
    display: flex;
    flex-direction: column;
    margin: 0 var(--mobile-margin-width);
    [aria-labelledby="id-61-title"] {
        display: none;
    }
    .parliament-elections-heading {
        h2 {
            font-size: 6vw;
            font-family: "Leitura Sans Grot 3", sans-serif;
            line-height: var(--realitatea-big-line-height);
        }
        .article-box-title {
            margin-top: 1vh;
            margin-bottom: 1.5rem;
            align-items: center;
            &::after {
                font-family: "Realitatea Icons";
                content: "\f30b";
                color: black;
                font-size: 5vw;
                margin-right: 2vw;
                margin-left: 1vw;
                margin-bottom: 1vw;
            }
            span {
                color: var(--realitatea-red);
            }
        }
    }
    .parliament-elections-options {
        display: flex;
        flex-direction: column;
        gap: 16px;
        @media (min-width: 768px) {
            gap: 24px;
            flex-direction: row-reverse;
            align-items: center;
            justify-content: space-between;
        }
        .parliament-elections-county-selector-container {
            display: flex;
            flex-direction: column;
            gap: 4px;
            width: 100%;
            @media (min-width: 768px) {
                gap: 16px;
                flex-direction: row;
                align-items: center;
            }
            select {
                padding: 12px 8px;
                border-radius: 8px;
                border: 1px solid lightgray;
                background-color: white;
                width: 100%;
                @media (min-width: 768px) {
                    max-width: 300px;
                }
            }
        }
        .parliament-elections-selector-types {
            display: flex;
            flex-direction: column;
            gap: 4px;
            @media (min-width: 768px) {
                gap: 16px;
                flex-direction: row;
                align-items: center;
            }
            div {
                display: flex;
                gap: 16px;
                button {
                    white-space: nowrap;
                    cursor: pointer;
                    padding: 12px 8px;
                    border-radius: 8px;
                    border: 1px solid transparent;
                    background-color: transparent;
                    &:hover {
                        border: 1px solid lightgray;
                    }
                    &.active {
                        border: 1px solid lightgray;
                        background-color: #ededed;
                    }
                }
            }
        }
    }
    .parliament-elections-data-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin: 2rem 0;
        @media (min-width: 768px) {
            flex-direction: row;
            gap: 48px;
            margin: 4rem 0 2rem;
        }
        #parliament-elections-data-pie {
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            max-width: 350px;
            aspect-ratio: 1;
            @media (min-width: 768px) {
                max-width: 400px;
            }
            @media (min-width: 1540px) {
                max-width: 500px;
            }
        }
        #parliament-elections-data-list {
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            .parliament-parties-list {
                width: 100%;
                display: flex;
                flex-direction: column;
                padding-right: 10px;
                @media (min-width: 768px) {
                    max-height: 400px;
                    overflow-y: auto;
                }
            }

            .party-item {
                display: flex;
                align-items: center;
                padding: 10px;
                margin-bottom: 10px;
                border-bottom: 1px solid #eee;
                flex: 1;
            }

            .party-logo {
                width: 40px;
                height: 40px;
                min-width: 40px;
                margin-right: 15px;
                position: relative;
                overflow: hidden;
            }

            .party-logo img {
                width: 80px;
                height: 40px;
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
            }

            .party-info {
                flex: 1;
                min-width: 0;
            }

            .party-name {
                font-weight: 500;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                margin-bottom: 4px;
                line-height: 1.2;
            }

            .party-stats {
                display: flex;
                align-items: center;
                gap: 15px;
                font-size: 14px;
                color: #666;
            }

            .party-percentage {
                font-weight: 500;
            }

            /* Scrollbar styling */
            .parliament-parties-list::-webkit-scrollbar {
                width: 6px;
            }

            .parliament-parties-list::-webkit-scrollbar-track {
                background: #f1f1f1;
            }

            .parliament-parties-list::-webkit-scrollbar-thumb {
                background: #888;
                border-radius: 3px;
            }

            .parliament-parties-list::-webkit-scrollbar-thumb:hover {
                background: #555;
            }

            .party-color-and-logo {
                display: flex;
                align-items: center;
                gap: 10px;
            }

            .party-color {
                width: 12px;
                height: 12px;
                border-radius: 2px;
            }

            .parties-expandable-container {
                display: grid;
                grid-template-rows: 0fr;
                transition: grid-template-rows 300ms;
                @media (min-width: 728px) {
                    grid-template-rows: 1fr;
                }
            }

            .parties-expandable-container.expanded {
                grid-template-rows: 1fr;
            }

            .parties-expandable-content {
                overflow: hidden;
            }

            .expand-list-button {
                width: 100%;
                padding: 10px;
                margin-top: 10px;
                background: #f5f5f5;
                border: none;
                border-radius: 4px;
                cursor: pointer;
                font-weight: 500;
                color: #333;
                transition: background-color 0.2s;
                @media (min-width: 728px) {
                    display: none;
                }
            }

            .expand-list-button:hover {
                background: #e5e5e5;
            }

            @media (max-width: 768px) {
                .party-logo {
                    width: 32px;
                    height: 32px;
                }

                .party-logo img {
                    width: 64px;
                    height: 32px;
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                }

                .party-color {
                    width: 10px;
                    height: 10px;
                }

                .party-stats {
                    font-size: 12px;
                }

                .party-name {
                    font-size: 14px;
                }
            }
        }
        > div {
            flex: 1;
        }
    }
}

@media only screen and (min-width: 768px) {
    .parliament-elections-container {
        .parliament-elections-heading {
            h2 {
                font-size: 4vw;
            }
            .article-box-title::after {
                font-size: 2vw;
                margin-bottom: 0;
            }
        }
    }
}

@media only screen and (min-width: 992px) {
    .parliament-elections-container {
        margin-left: var(--margin-width);
        margin-right: var(--margin-width);
        padding-top: 5vh;
        padding-bottom: 5vh;
        .parliament-elections-heading {
            h2 {
                font-size: 3vw;
            }
        }
    }
}

@media only screen and (min-width: 1336px) {
    .parliament-elections-container {
        max-width: 989px;
        margin-left: calc(calc((100vw - 989px) / 2));
        margin-right: calc(calc((100vw - 989px) / 2));
        .parliament-elections-heading {
            h2 {
                font-size: 2.1vw;
            }
        }
    }
}

@media only screen and (min-width: 1920px) {
    .parliament-elections-container {
        max-width: 1390px;
        margin-left: calc(calc((100vw - 1390px) / 2));
        margin-right: calc(calc((100vw - 1390px) / 2));
    }
}