.InputfieldRadiosImageLabelWrapper {
    display: flex;
    gap:15px;
    --inputfield-image-label-options-desktop-width: 150px;
    --inputfield-image-label-options-mobile-width: 100px;
    --inputfield-image-label-options-border-color: #d9e1ea;
    --inputfield-image-label-options-checked-color: #3eb998;
    --inputfield-image-label-options-label-color: #333;
    --inputfield-image-label-options-text-bg: #f0f0f0;
    --inputfield-image-label-options-text-checked-bg: #e0f0e9;
    --inputfield-image-label-options-text-checked-color: #111;
    --inputfield-image-label-options-border-width: 3px;
    --inputfield-image-label-options-focus-color: #1b6ec2;
}

.InputfieldRadiosImageLabelWrapper .image-label-option {
    display: inline-block;
    margin-bottom: 10px;
    cursor: pointer;
    vertical-align: top;
    /* The hidden input is absolutely positioned; keep it inside its label so focusing it doesn't scroll the page */
    position: relative;
}

.InputfieldRadiosImageLabelWrapper .image-label-option.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hide the radio button but keep it accessible */
.InputfieldRadiosImageLabelWrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

/* Style the content container (which wraps the image and text) */
.InputfieldRadiosImageLabelWrapper .content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Image wrapper - contains the image and receives the border */
.InputfieldRadiosImageLabelWrapper .image-wrapper {
    display: block;
    width: var(--inputfield-image-label-options-mobile-width);
    border: var(--inputfield-image-label-options-border-width) solid var(--inputfield-image-label-options-border-color);
    transition: border-color 0.2s ease;
}

/* Image wrapper with aspect ratio constraint */
.InputfieldRadiosImageLabelWrapper .image-wrapper.has-aspect-ratio {
    aspect-ratio: var(--inputfield-image-label-options-aspect-ratio);
}

/* Image styling - fills the wrapper */
.InputfieldRadiosImageLabelWrapper .image-label-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Desktop width - typically 768px and up */
@media (min-width: 768px) {
    .InputfieldRadiosImageLabelWrapper .image-wrapper {
        width: var(--inputfield-image-label-options-desktop-width);
    }
}

/* Label text below image */
.InputfieldRadiosImageLabelWrapper .image-label-text {
    display: block;
    margin-top: 8px;
    text-align: center;
    font-size: 0.9em;
    color: var(--inputfield-image-label-options-label-color);
}

/* Checked state - highlight the image wrapper */
.InputfieldRadiosImageLabelWrapper input[type="radio"]:checked + .content .image-wrapper {
    border-color: var(--inputfield-image-label-options-checked-color);
    outline: none;
}

/* Optional: Add some styles if it's just text, to make it look like a button */
.InputfieldRadiosImageLabelWrapper .content:not(:has(img)) {
    padding: 5px 10px;
    background: var(--inputfield-image-label-options-text-bg);
    border-radius: 3px;
    border: var(--inputfield-image-label-options-border-width) solid transparent;
    transition: border-color 0.2s ease;
}

.InputfieldRadiosImageLabelWrapper input[type="radio"]:checked + .content:not(:has(img)) {
    background: var(--inputfield-image-label-options-text-checked-bg);
    border-color: var(--inputfield-image-label-options-checked-color);
    color: var(--inputfield-image-label-options-text-checked-color);
}

/* Keyboard focus - the native input is hidden, so outline the visible content instead */
.InputfieldRadiosImageLabelWrapper input[type="radio"]:focus-visible + .content {
    outline: 2px solid var(--inputfield-image-label-options-focus-color);
    outline-offset: 2px;
}
