/**
 * tile.css
 * Kachelansicht (Boxen) und Ansichtsumschalter für GearBase.
 * @version 0.41.0
 * @date 2026-05-10
 * @author GearBase
 * @description Dark-Theme-konforme Kachelansicht, scoped Box-Styles,
 *              Loadout-Button in Kacheln, aktiver Ansichtsumschalter.
 */

.widget-table {
    position: relative;
}

/* Ansichts-Umschalter */
.view-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.view-table,
.view-boxes {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(200,168,122,0.15);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 7px;
    color: #888;
    font-size: 15px;
    line-height: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.view-table:hover,
.view-boxes:hover {
    background: rgba(200,168,122,0.12);
    color: #c8a87a;
    border-color: rgba(200,168,122,0.3);
}

.view-table.active,
.view-boxes.active {
    background: rgba(200,168,122,0.18);
    color: #c8a87a;
    border-color: rgba(200,168,122,0.45);
}

/* Tabellenansicht */
.widget-table[data-view="view-table"] .table-highlight {
    display: table;
}

.widget-table[data-view="view-table"] .boxes-view {
    display: none;
}

/* Kachelansicht */
.widget-table[data-view="view-boxes"] .table-highlight {
    display: none;
}

.widget-table[data-view="view-boxes"] .boxes-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1em;
    padding: 1em 0;
}

/* Einzelne Kachel */
.box {
    border: 1px solid rgba(200,168,122,0.2);
    padding: 1em;
    border-radius: 5px;
    background: rgba(37, 15, 17, 0.7);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.box:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(200,168,122,0.45);
}

/* Produktbild in der Kachel (v0.56.0) */
.box-image {
    width: 100%;
    height: 140px;
    margin-bottom: 0.6em;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.box-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.box-noimg {
    font-size: 1.8em;
    opacity: 0.25;
    filter: grayscale(1);
}

.box-icons {
    margin-bottom: 0.5em;
}

.box-icons img {
    width: 20px;
    margin-right: 0.3em;
}

.box-warning {
    position: absolute;
    top: 8px;
    right: 8px;
}

.box-brand {
    margin: 0 0 2px;
    font-size: 1em;
    font-weight: 600;
    color: #c8a87a;
    padding-right: 24px; /* Platz für warning-icon */
}

.box-model {
    font-size: 0.85em;
    color: #ccc;
    margin: 0 0 8px;
}

.box ul {
    list-style: none;
    padding: 0;
    margin: 0 0 0.6em;
    font-size: 0.82em;
    color: #bbb;
}

.box ul li {
    margin-bottom: 0.2em;
}

.box ul li strong {
    color: #ddd;
}

.box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 0.6em;
    padding-top: 0.5em;
    border-top: 1px solid rgba(221,221,221,0.12);
}

.box-link-btn {
    display: inline-block;
    padding: 3px 10px;
    background: #333330;
    color: #e8dcc8;
    border: 1px solid rgba(200, 168, 122, 0.30); /* dezenter Gold-Rim wie die übrigen Buttons */
    border-radius: 5px; /* kantiger statt Pille (war 15px) */
    cursor: pointer;
    font-size: 0.85em;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.box-link-btn:hover {
    background: var(--category-color, #595B5B); /* SK-Hoverfarbe beibehalten */
    border-color: var(--category-color, #595B5B);
    color: var(--category-text-color, white);
}

/* === Gear-Status-Badge in Kachelansicht (v0.45.0) === */
.box-status {
    margin: 4px 0 2px 0;
    text-align: center;
}

.box .gear-status-badge {
    font-size: 0.6em;
    padding: 1px 5px;
}

/* === Gewichtsverifikation (Waage-Icon) v0.48.0 === */
.box .weight-verified-icon {
    margin-left: 2px;
    font-size: 0.85em;
}

/* === Trenner „Ohne Angabe im gewählten Filter" (v0.94.0) ===
   Spannt in der Kachel-Grid-Ansicht über die volle Breite. */
.boxes-view .box-divider {
    grid-column: 1 / -1;
    margin: 8px 0 2px;
    padding: 12px 0;
    text-align: center;
    font-size: 0.7em;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
