/* Container principale del selettore */
.forcedavatar-picker-fieldset {
    margin-top: 20px;
    border: none;
    padding: 0;
}

.forcedavatar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: start;
    padding: 10px 0;
}

.forcedavatar-card {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1px;
    width: auto;
    min-width: 112px;
    min-height: 112px;
    flex: 0 0 auto;
    border: 1px solid #cccccc;
    border-radius: 0;
    background: #ffffff;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.forcedavatar-card:hover {
    border-color: #4d74a5;
    background-color: #eeeeee;
}

.forcedavatar-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.forcedavatar-thumb-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 96px;
    min-height: 96px;
    overflow: visible;
    border: 2px solid transparent;
    border-radius: 0;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.forcedavatar-thumb-wrap img {
    display: block;
    width: auto;
    height: auto;
    max-width: 112px;
    max-height: 112px;
    object-fit: contain;
}

.forcedavatar-radio:checked + .forcedavatar-thumb-wrap {
    border-color: #4d74a5;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #4d74a5;
}

.forcedavatar-category-row select {
    width: auto;
}

@media (max-width: 700px) {
    .forcedavatar-grid {
        gap: 8px;
    }
}

@media (max-width: 430px) {
    .forcedavatar-card {
        min-width: 0;
        flex: 1 1 calc(50% - 8px);
    }
}