/* V23: Bildbereich oberhalb der festen Beschriftungszone zentrieren. */

.inventory-v16-clothing-grid > button,
.inventory-v16-equipment-grid > button {
    position: relative !important;
    overflow: hidden !important;
}

/* Unten bleiben zwei feste Textzeilen frei. Die Grafik wird ausschließlich
   innerhalb der darüberliegenden Fläche ausgerichtet. */
.inventory-v16-clothing-grid > button > span,
.inventory-v16-equipment-grid > button > span,
.inventory-v16-equipment-grid > button.wide > span {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    bottom: 30px !important;
    left: 4px !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    display: grid !important;
    place-items: center !important;
    pointer-events: none !important;
}

/* Das normalisierte Motiv nutzt die freie Bildfläche sinnvoll aus. */
.inventory-v16-clothing-grid .inventory-v16-centered-slot-image,
.inventory-v16-equipment-grid .inventory-v16-centered-slot-image {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 112% !important;
    height: 112% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: translate(-50%, -50%) !important;
    transform-origin: center center !important;
    margin: 0 !important;
}

/* Im doppelt breiten Werkzeugslot soll das Motiv ungefähr dieselbe optische
   Höhe wie in einem normalen Slot besitzen. */
.inventory-v16-equipment-grid > button.wide .inventory-v16-centered-slot-image {
    width: 56% !important;
    height: 112% !important;
}

/* Slotbezeichnung und Gegenstandsname bilden unten einen festen Textblock. */
.inventory-v16-clothing-grid > button > small,
.inventory-v16-equipment-grid > button > small {
    position: absolute !important;
    right: 6px !important;
    bottom: 17px !important;
    left: 6px !important;
    z-index: 5 !important;
    display: block !important;
    overflow: hidden !important;
    color: #9f8654 !important;
    font-size: 7px !important;
    line-height: 10px !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.inventory-v16-clothing-grid > button > strong,
.inventory-v16-equipment-grid > button > strong {
    position: absolute !important;
    right: 6px !important;
    bottom: 5px !important;
    left: 6px !important;
    z-index: 5 !important;
    display: block !important;
    overflow: hidden !important;
    color: #eee9e1 !important;
    font-size: 8px !important;
    line-height: 10px !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Leere Slots benötigen nur eine Beschriftungszeile. */
.inventory-v16-clothing-grid > button:not(.filled) > small,
.inventory-v16-equipment-grid > button:not(.filled) > small {
    bottom: 6px !important;
}

/* Zustand beziehungsweise Nutzungen immer oben rechts. */
.inventory-v16-equipment-grid > button > b {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 8 !important;
    display: grid !important;
    place-items: center !important;
    min-width: 22px !important;
    height: 20px !important;
    padding: 0 5px !important;
    border: 1px solid rgba(151, 78, 60, .82) !important;
    border-radius: 11px !important;
    background: #1c1712 !important;
    color: #e6d7c3 !important;
    font: 600 10px/18px 'Arial Narrow', 'Segoe UI', sans-serif !important;
    text-align: center !important;
}
