/* view-toggle.css — Grid / List switch and the list layout (scripts/view-toggle.js, Oct 2026).
   List = one card per row with a small picture; same cards, same links and buttons. */

.vt-switch {
    display: inline-flex;
    margin: 0 0 12px;
    border: 1px solid rgba(201, 168, 76, 0.7);
    border-radius: 8px;
    overflow: hidden;
}
.vt-switch button {
    background: transparent;
    color: inherit;
    border: 0;
    padding: 6px 14px;
    font-size: 0.9em;
    cursor: pointer;
}
.vt-switch button + button { border-left: 1px solid rgba(201, 168, 76, 0.7); }
.vt-switch button.active { background: #C9A84C; color: #1a1406; font-weight: 600; }

/* The grids, one column */
body.vt-list [data-view-toggle],
body.vt-list #gallery-container .nft-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
}

/* Rows: gallery / owner-gallery (.nft-item), profile (.nft-item > .nft-content), category-gallery */
body.vt-list [data-view-toggle] > .nft-item,
body.vt-list [data-view-toggle] > .nft-item > .nft-content,
body.vt-list #gallery-container .category-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 14px;
    text-align: left;
}
body.vt-list [data-view-toggle] > .nft-item,
body.vt-list #gallery-container .category-card { padding: 8px 12px !important; }
body.vt-list [data-view-toggle] > .nft-item > .nft-content { width: 100%; }

/* Small square pictures — the whole picture, QR included */
body.vt-list [data-view-toggle] .image-container,
body.vt-list #gallery-container .image-container {
    flex: 0 0 72px;
    width: 72px !important;
    height: 72px !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1;
    margin: 0 !important;
    padding: 0 !important;
}
body.vt-list [data-view-toggle] .image-container::before { display: none; }
body.vt-list [data-view-toggle] .image-container img,
body.vt-list #gallery-container .image-container img {
    width: 72px !important;
    height: 72px !important;
    max-width: none;
    object-fit: contain;
    margin: 0 !important;
}
body.vt-list [data-view-toggle] .nft-details,
body.vt-list [data-view-toggle] .nft-info,
body.vt-list #gallery-container .card-content { flex: 1 1 auto; min-width: 0; padding: 0 !important; }
body.vt-list [data-view-toggle] .nft-details h3,
body.vt-list [data-view-toggle] .nft-details h4,
body.vt-list [data-view-toggle] .nft-info h3,
body.vt-list #gallery-container .card-content h3 { margin: 0 0 2px; font-size: 1em; }
/* Long text stays on the item's own page */
body.vt-list [data-view-toggle] .description,
body.vt-list [data-view-toggle] .nft-id,
body.vt-list [data-view-toggle] .memo-status,
body.vt-list [data-view-toggle] .nft-cid,
body.vt-list [data-view-toggle] .hierarchy-path { display: none; }
body.vt-list [data-view-toggle] .nft-details p { margin: 1px 0; }
/* Admin list (admin/minted-nfts.html): the burn checkbox stays at the start of the row */
body.vt-list [data-view-toggle] > .nft-item > .burn-select-wrap { flex: 0 0 auto; margin: 0; }
body.vt-list ul[data-view-toggle] { padding-left: 0; }
body.vt-list [data-view-toggle] .nft-actions { flex: 0 0 auto; margin: 0; }
/* Compact buttons in a row */
body.vt-list [data-view-toggle] .nft-details :is(button, a.button-style),
body.vt-list [data-view-toggle] .nft-actions :is(button, a),
body.vt-list #gallery-container .button-group a {
    width: auto !important;
    display: inline-block;
    padding: 5px 12px !important;
    font-size: 0.85em !important;
    margin: 4px 6px 0 0 !important;
}
body.vt-list #gallery-container .button-group { display: flex; flex-wrap: wrap; align-items: center; }

/* Browse cards: picture | name, status, price | buttons */
body.vt-list #node-grid > .node-card {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    column-gap: 14px;
    row-gap: 2px;
    align-items: center;
    padding: 8px 12px;
}
body.vt-list #node-grid > .node-card > * { grid-column: 2; justify-self: start; }
body.vt-list #node-grid > .node-card > .card-cover,
body.vt-list #node-grid > .node-card > .region-icon {
    grid-column: 1;
    grid-row: 1 / span 6;
    width: 56px;
    margin: 0;
}
body.vt-list #node-grid > .node-card > .card-actions {
    grid-column: 3;
    grid-row: 1 / span 6;
    flex-direction: column;
    align-items: stretch;
}
body.vt-list #node-grid > .node-card > .card-earn-note { font-size: 0.8em; }
body.vt-list #node-grid > :not(.node-card) { grid-column: 1 / -1; }

@media (max-width: 560px) {
    body.vt-list #node-grid > .node-card { grid-template-columns: 48px 1fr; }
    body.vt-list #node-grid > .node-card > .card-cover,
    body.vt-list #node-grid > .node-card > .region-icon { width: 48px; grid-row: 1 / span 5; }
    body.vt-list #node-grid > .node-card > .card-actions { grid-column: 2; grid-row: auto; flex-direction: row; flex-wrap: wrap; }
    body.vt-list [data-view-toggle] > .nft-item,
    body.vt-list [data-view-toggle] > .nft-item > .nft-content { flex-wrap: wrap; }
}
