/* Nadel-Auswahl (Plugin 2 v0.9.0) – ergänzt picker.css (Eckdaten, Kopf,
   Menge, Knopf, Verfügbarkeit, Legende, Service kommen von dort). Gleiche
   Sprache wie die Farbkacheln: weiß, Rahmen #d5d5d5, aktiv 2 px #111, Radius
   2 px, Schrift aus dem Theme (Barlow). Kontraste ≥ 4,5:1 auf Weiß. Nur auf
   Nadel-Eltern-Seiten geladen. */

.dla-needle-picker .dla-needle-dim {
    margin: 0 0 18px;
}

.dla-needle-picker .dla-needle-dim-head,
.dla-picker .dla-needle-dim p.dla-needle-dim-head {
    margin: 0 0 8px !important;
}

/* Gleich breite Spalten wie das Kachelraster der Farben (CSS 4017:
   auto-fit/minmax 52 px) – ruhige Kanten statt Flatterrand. */
.dla-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 8px;
}

/* Wörter statt Zahlen (Nadelspitzen „Standard“/„kurz“): Breite nach Inhalt. */
.dla-chips.is-text {
    display: flex;
    flex-wrap: wrap;
}

.dla-chips.is-text .dla-chip {
    min-width: 88px;
    padding: 0 16px;
}

.dla-chips.is-text .dla-chip.is-active {
    padding: 0 15px;
}

.dla-chip,
.dla-chip:hover,
.dla-chip:focus,
.dla-chip:active {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 52px;
    min-height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #d5d5d5 !important;
    border-radius: 2px;
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    font: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0 !important;
    text-transform: none !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.dla-chip:hover {
    border-color: #111 !important;
}

.dla-chip:focus {
    outline: none;
}

.dla-chip:focus-visible {
    outline: 2px solid #111;
    outline-offset: 3px;
}

.dla-chip.is-active,
.dla-chip.is-active:hover {
    padding: 0 11px;
    border: 2px solid #111 !important;
    font-weight: 600;
}

/* In der gewählten Stärke nicht erhältlich: grau + Schrägstrich wie die
   nicht lieferbare Farbkachel, nicht wählbar (aria-disabled). */
.dla-chip.is-unavailable,
.dla-chip.is-unavailable:hover {
    border-color: #e1e1e1 !important;
    background: #fff linear-gradient(to top right, transparent calc(50% - 0.5px), #d0d3d8 calc(50% - 0.5px), #d0d3d8 calc(50% + 0.5px), transparent calc(50% + 0.5px)) !important;
    color: #6b6f76 !important;
    cursor: not-allowed;
}

/* Gemischte Serien: Punkt am selteneren Zustand – rot „nachbestellbar“ wie an
   der Farbkachel, grün „sofort lieferbar“, wenn fast alles Bestellware ist
   (#2e7d32 auf Weiß 5,1:1). */
.dla-chip .dla-chip-dot {
    top: -5px;
    left: -5px;
    width: 10px;
    height: 10px;
}

.dla-swatch-dot.is-instock {
    background: #2e7d32;
}

.dla-needle-picker .dla-picker-head {
    margin: 4px 0 14px;
}

.dla-needle-picker .dla-picker-color:empty {
    display: none;
}

@media (max-width: 600px) {
    .dla-chips {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
        gap: 8px 6px;
    }

    .dla-chip,
    .dla-chip:hover,
    .dla-chip:focus,
    .dla-chip:active {
        min-width: 0;
        padding: 0 6px;
    }

    .dla-chip.is-active,
    .dla-chip.is-active:hover {
        padding: 0 5px;
    }
}
