/* Champ unique « code promo ou carte cadeau » : panier, commande, volet latéral. */
.hmb-codes { margin: 0; }
.hmb-codes__label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 700; font-size: 0.92rem; color: var(--hm-brown, #3f2f25); }
.hmb-codes__label .hm-icon { color: var(--hm-caramel-dark, #8b5a34); }

/* Volet latéral : le champ est replié derrière ce bouton, sinon il mangeait les deux tiers
   de la hauteur et la liste des articles n'en montrait plus deux. */
.hmb-codes__toggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--hm-brown, #3f2f25); font-weight: 700; font-size: 0.9rem; text-align: left; cursor: pointer; }
.hmb-codes__toggle .hm-icon { color: var(--hm-caramel-dark, #8b5a34); }
.hmb-codes__toggle::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s; }
.hmb-codes__toggle[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }
.hmb-codes__box[hidden] { display: none; }

.hmb-codes__row { display: flex; gap: 8px; align-items: stretch; }
.hmb-codes__row input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.hmb-codes__row input::placeholder { text-transform: none; letter-spacing: 0; opacity: 0.7; }
.hmb-codes__row .hm-btn { flex: none; white-space: nowrap; }
.hmb-codes__hint { margin: 6px 0 0; font-size: 0.78rem; color: var(--hm-muted, #76665a); }
.hmb-codes__msg { margin: 6px 0 0; font-size: 0.85rem; min-height: 0; }
.hmb-codes__msg:empty { margin: 0; }
.hmb-codes__msg.is-ok { color: var(--hm-sage, #4f7a55); font-weight: 700; }
.hmb-codes__msg.is-error { color: var(--hm-rasp, #b8414e); font-weight: 700; }

.hmb-codes__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.hmb-codes__item { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 10px; border-radius: 10px; background: var(--hm-sage-bg, #eaf2eb); font-size: 0.85rem; }
.hmb-codes__code { font-weight: 700; letter-spacing: 0.04em; }
.hmb-codes__gain { font-weight: 700; color: var(--hm-sage, #4f7a55); }
.hmb-codes__item small { color: var(--hm-muted, #76665a); }
.hmb-codes__remove { margin-left: auto; border: 0; background: none; padding: 4px 2px; color: var(--hm-muted, #76665a); font-size: 0.8rem; text-decoration: underline; cursor: pointer; }
.hmb-codes__remove:hover { color: var(--hm-rasp, #b8414e); }

/* Sous 420 px, le bouton « Appliquer » ramenait le champ à 90 px : chacun sa ligne. */
@media (max-width: 419px) {
	.hmb-codes__row { flex-wrap: wrap; }
	.hmb-codes__row input, .hmb-codes__row .hm-btn { flex: 1 1 100%; }
	.hmb-codes__row .hm-btn { justify-content: center; min-height: 44px; }
}
