.flag-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    margin-top: 16px;
}

.flag-row p {
    margin: 0;
    line-height: 1.45;
}

/* FLAGS: never wrap, never shrink */
.flag-row .shiny-input-radiogroup {
    margin: 0;
    display: inline-flex !important;
    align-items: center;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 4px;
    flex: 0 0 auto;
}

.flag-row .shiny-input-radiogroup * {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

/* If BS5 form-checks are used */
.flag-row .form-check,
.flag-row .form-check-inline {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* If classic Shiny radio-inline is used */
.flag-row .radio-inline {
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* Hide native radios completely */
.flag-row input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    pointer-events: none !important;
}

.flag-row label::before,
.flag-row label::after {
    content: none !important;
    display: none !important;
}

.flag-row label {
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto !important;
}

/* Classic Shiny: emoji in span */
.flag-row label>span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

/* BS5: emoji in label */
.flag-row .form-check-label {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 15px;
    line-height: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.flag-row label>span:hover,
.flag-row .form-check-label:hover {
    transform: translateY(-1px);
}

/* Selected ring */
.flag-row input[type="radio"]:checked+span,
.flag-row .form-check-input:checked+.form-check-label {
    box-shadow: 0 0 0 2px rgba(43, 54, 43, 0.85);
    transform: translateY(-1px) scale(1.05);
}

/* Ensure flags column never shrinks, text can wrap */
.flag-row .shiny-input-radiogroup {
    min-width: 82px;
}

.flag-row p {
    flex: 1 1 auto;
    min-width: 0;
}