/**
 * Attribute Multi-Select — Front Office CSS
 * Maison Sushi — Design cohérent avec le thème navy #222248
 */

/* ============================================================
   HINT "Vous pouvez en sélectionner X maximum"
   ============================================================ */
.ams-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: #222248;
    border-radius: 20px;
    padding: 4px 13px 4px 8px;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
    user-select: none;
}

.ams-hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1.5px solid rgba(255,255,255,0.6);
    border-radius: 4px;
    font-size: 10px;
    color: rgba(255,255,255,0.9);
    flex-shrink: 0;
    line-height: 1;
}

/* ============================================================
   CHECKBOX — complètement masquée, zéro rendu natif
   ============================================================ */
/* Checkbox : invisible mais cliquable via le label `for` natif du navigateur */
.ams-checkbox {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    /* pointer-events ACTIF → le clic sur <label for="X"> coche nativement la checkbox */
}

/* ============================================================
   LABEL MULTISELECT — pill avec coche intégrée
   ============================================================ */
.ams-multiselect-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ams-multiselect-group ul li.input-container {
    float: none !important;
}

.ams-multiselect-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.44rem 1rem 0.44rem 0.65rem;
    border: 2px solid #ddd;
    border-radius: 0px;
    background: #fff;
    color: #555;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s;
    white-space: nowrap;
    user-select: none;
    margin-bottom: 0 !important;
    line-height: 1.3;
}

.ams-multiselect-group .radio-label{
    border:none !important;
}


.ams-multiselect-group .input-radio + .radio-label::before, .input-radio + .radio-label-with-image::before{
    display:none;
}
/* Petite case à cocher dessinée en CSS */
.ams-multiselect-group label::before {
    content: '';
    flex-shrink: 0;
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.18s, background 0.18s, background-image 0.18s;
    background-size: 9px 8px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hover */
.ams-multiselect-group label:hover {
    border-color: #222248;
    color: #222248;
    background: #f0f0f8;
}
.ams-multiselect-group label:hover::before {
    border-color: #222248;
}

/* Coché — classe ajoutée par JS */
.ams-multiselect-group label.ams-checked {
    border-color: #222248;
    background: #222248;
    color: #fff;
    box-shadow: 0 4px 14px rgba(34, 34, 72, 0.25);
}
.ams-multiselect-group label.ams-checked::before {
    border-color: rgba(255,255,255,0.4);
    background-color: rgba(255,255,255,0.12);
    /* Coche SVG blanche */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1,4 3.8,7 9,1'/%3E%3C/svg%3E");
}

/* Prix dans le label */
.ams-price-impact {
    font-size: 0.76rem;
    font-weight: 700;
    color: #aaa;
    margin-left: 1px;
    transition: color 0.18s;
}
.ams-multiselect-group label.ams-checked .ams-price-impact {
    color: rgba(255, 255, 255, 0.7);
}

/* Résumé caché */
.ams-options-summary {
    display: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .ams-multiselect-group ul { gap: 6px; }
    .ams-multiselect-group label { font-size: 0.82rem; padding: 0.38rem 0.85rem 0.38rem 0.58rem; }
    .ams-hint { font-size: 0.72rem; }
}

/* ============================================================
   MASQUER le radio natif désactivé qui reste dans le DOM
   après transformation par le module (name="_disabled_by_ams")
   ============================================================ */

/* Le radio neutralisé et son label visuel radio-label */
input[name$="_disabled_by_ams"] {
    display: none !important;
}

/* Le span radio-label qui suit le radio neutralisé dans le label enveloppant */
.ams-multiselect-group input[name$="_disabled_by_ams"] + .radio-label,
.ams-multiselect-group input[name$="_disabled_by_ams"] + .radio-label-with-image {
    display: none !important;
}

/* Supprimer le ::before cercle radio sur le label global quand on est dans un groupe AMS */
.ams-multiselect-group label::before {
    /* Réinitialise le before du thème (cercle radio) et le remplace par la case checkbox */
    border-radius: 4px !important;
}