/* Darstellung (D14): Vorschau-Kacheln für Themes. Jede Kachel trägt data-theme und zeigt dadurch die Farben ihres Themes. */
@layer components {
    .tp-theme-tiles {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
        gap: var(--tp-space-3, 0.75rem);
    }

    .tp-theme-tile {
        display: flex;
        flex-direction: column;
        gap: var(--tp-space-2, 0.5rem);
        padding: var(--tp-space-3, 0.75rem);
        border: 2px solid var(--tp-color-border);
        border-radius: var(--tp-radius);
        background: var(--tp-color-surface);
        color: var(--tp-color-text);
        font: inherit;
        text-align: left;
        cursor: pointer;
    }

    :where(:root[data-input="mouse"]) .tp-theme-tile:hover:not(:disabled) { border-color: var(--tp-color-primary); }
    .tp-theme-tile:focus-visible { outline: 3px solid var(--tp-color-focus); outline-offset: 2px; }
    .tp-theme-tile:disabled { opacity: 0.6; cursor: default; }
    .tp-theme-tile[aria-checked="true"] { border-color: var(--tp-color-primary); box-shadow: 0 0 0 1px var(--tp-color-primary); }

    .tp-theme-tile__swatches { display: flex; gap: var(--tp-space-1, 0.25rem); }
    .tp-theme-tile__swatch { flex: 1; height: 1.75rem; border-radius: var(--tp-radius-sm); border: 1px solid var(--tp-color-border); }
    .tp-theme-tile__swatch--primary { background: var(--tp-color-primary); }
    .tp-theme-tile__swatch--tint { background: var(--tp-color-primary-tint); }
    .tp-theme-tile__swatch--attention { background: var(--tp-color-attention); }

    .tp-theme-tile__sample {
        display: block;
        padding: 0.4rem 0.75rem;
        text-align: center;
        font-weight: 600;
        border-radius: var(--tp-button-radius);
        background: var(--tp-button-fill);
        color: var(--tp-button-text);
        border: 2px solid var(--tp-button-border);
    }

    .tp-theme-tile__name { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-weight: 600; }

    .tp-device-theme { margin-top: var(--tp-space-3, 0.75rem); }
}
