.rule-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rule-top {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.rule-label {
    font-size: 0.875rem;
    font-weight: 700 !important;
    flex: 1;
}

    .rule-label.required:after {
        content: " *";
        color: #dc3545;
        font-size: 18px;
    }

.rule-options {
    display: flex;
    gap: 0.5rem;
}

.rule-btn {
    flex: 1 1 0; /* Make all buttons share equal width */
    text-align: center; /* Center text inside the button */
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    min-width: 60px; /* Ensures buttons don’t shrink below this */
    max-width: 100%; /* Prevents overflow */
    word-wrap: break-word; /* Wraps long words if needed */
}

    .rule-btn:hover {
        border-color: var(--bs-border-color);
        background-color: rgba(var(--bs-primary-rehlo-rgb), 0.1);
        color: #3498db;
    }

    .rule-btn.active {
        background: var(--bs-primary-rehlo);
        color: #fff;
        border-color: var(--bs-border-color);
    }
