.modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modalContent {
    background: white;
    width: 74%;
    margin-top: 1rem;
    /* max-width: 900px; */
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    /* border-radius: 4px; */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    font-family: 'Roboto-condensed', sans-serif;
}

/* Header */
.header {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title {
    font-size: 18px;
    font-weight: bold;
}

.headerControls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.langSelect {
    display: flex;
    align-items: center;
    background: #e0e0e0;
    color: #333;
    padding: 8px 12px;

    font-size: 15px;
    cursor: pointer;
}

.flagImage {
    width: 20px;
    margin-right: 5px;
}

.closeButton {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

/* Body */
.body {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 0.5rem;
}

/* Sidebar */
.sidebar {
    width: 13.8rem;
    background: #e0e0e0;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebarItem {
    padding: 6px 15px;
    cursor: pointer;
    border-bottom: 1px solid black;
    font-size: 14px;
    color: black;
    transition: background 0.2s;
    text-align: center;
}

.sidebarItem:hover {
    background: #d0d0d0;
}

.sidebarItem.active {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

/* Content Area */
.contentArea {
    flex: 1;
    padding: 0 15px;
    overflow-y: auto;
    background: white;
}

.ruleSection {
    margin-bottom: 20px;
}

.ruleTitle {
    background: var(--color-secondary);
    color: var(--color-text-inverse);
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.textContainer {
    display: flex;
    flex-direction: column;
    background: #eeebeb;
}

.ruleText {
    font-size: 14px;
    color: #2d2d2d;
    line-height: 1.5;
    /* margin-bottom: 10px; */
    padding: 0 10px;
    border: 1px solid #c8c5c5;
}

.ruleText.red {
    color: #c0392b;
}

/* Footer */
.footer {
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    background: white;
}

.agreeText {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.buttonGroup {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 20px;
    border: none;

    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

.btnAccept {
    background: var(--bg-success);
    color: var(--color-text-inverse);
}

.btnCancel {
    background: var(--bg-danger);
    color: var(--color-text-inverse);
}

/* Responsive */
@media (max-width: 768px) {

    .modalContent {
        width: 100%;
        height: 100vh;
        margin-top: 0;
        border-radius: 0;
    }

    .body {
        flex-direction: column;
        padding: 6px 0px 0px 0px;
    }

    .flagImage {
        width: 30px;
        margin-right: 5px;
    }

    .sidebar {
        width: 100%;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        border-right: none;
        border-bottom: 1px solid black;
        min-height: 37px;
        background: #e0e0e0;
        /* Hide scrollbar for cleaner look if desired, but keep simple for now */
    }

    .sidebar::-webkit-scrollbar {
        height: 4px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 2px;
    }

    .sidebarItem {
        width: auto;
        flex: 0 0 auto;
        padding: 4px 15px;
        font-size: 14px;
        border-bottom: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .contentArea {
        flex: 1;
        padding: 9px 4px;
    }

    .footer {
        padding: 10px;
        gap: 10px;
    }
}