/* Vendor card (themes/_base/components/vendor_card.php) — shared by every page that lists vendors. Token-only.
 * .zt-vcard--card  banner, round logo on a light chip (--z-chip, so dark logos read in dark mode), name, details, buttons
 * .zt-vcard--row   logo tile | details | buttons (stacks on phones)
 * The rewards tier medals keep their fixed metal colours (bronze is bronze in every theme). */
.zt-vcard { position: relative; min-width: 0; color: var(--z-text); }
.zt-vcard--card {
    display: flex; flex-direction: column; height: 100%; overflow: hidden;
    background: var(--z-surface); border: 1px solid var(--z-border); border-radius: var(--z-radius-lg); box-shadow: var(--z-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.zt-vcard--card:hover { transform: translateY(-4px); box-shadow: var(--z-shadow-lg); }
.zt-vcard__banner { position: relative; flex: 0 0 auto; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--z-hero-from), var(--z-hero-to)); }
.zt-vcard__banner img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.zt-vcard--card:hover .zt-vcard__banner img { transform: scale(1.06); }
.zt-vcard__banner-fill { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--z-hero-ink); opacity: .55; font-size: 2.25rem; }
.zt-vcard__body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; padding: 0 18px 18px; text-align: center; }
.zt-vcard__logo.zt-chip {
    width: 80px; height: 80px; margin: -40px auto 12px; padding: 0; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
    border: 4px solid var(--z-surface); box-shadow: var(--z-shadow); position: relative; z-index: 1;
}
.zt-vcard__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zt-vcard__logo i, .zt-vcard__tile i { color: var(--z-muted); font-size: 1.5rem; }
.zt-vcard__logo:not(:has(img)) { background: var(--z-surface-2); }
.zt-vcard__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin-bottom: 8px; min-width: 0; }
.zt-vcard__name { margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; min-width: 0; }
.zt-vcard__name a { color: inherit; text-decoration: none; }
.zt-vcard__name a:hover { color: var(--z-accent-text); text-decoration: none; }
.zt-vcard__loc { margin: 0 0 10px; font-size: .85rem; color: var(--z-muted); overflow-wrap: anywhere; }
.zt-vcard__loc i { margin-right: 2px; }
.zt-vcard__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 10px; }
.zt-vcard__tag { display: inline-block; max-width: 100%; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--z-accent-soft); color: var(--z-accent-text); overflow-wrap: anywhere; }
.zt-vcard__tag--sub { background: var(--z-surface-2); color: var(--z-muted); }
.zt-vcard__events { display: inline-flex; align-self: center; align-items: center; gap: 6px; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; border: 1px solid var(--z-border); color: var(--z-text); }
.zt-vcard__events i { color: var(--z-accent-text); }
.zt-vcard__desc {
    margin: 0 0 14px; min-height: 3.9em; font-size: .875rem; line-height: 1.5; color: var(--z-muted); overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.zt-vcard__social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.zt-vcard__social a {
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--z-surface-2); color: var(--z-muted); font-size: .85rem; text-decoration: none; transition: background-color .15s ease, color .15s ease;
}
.zt-vcard__social a:hover { background: var(--z-accent); color: var(--z-accent-ink); text-decoration: none; }
.zt-vcard__actions { display: flex; gap: 8px; margin-top: auto; }
.zt-vcard .zt-vcard__btn { min-height: 40px; padding: 8px 14px; font-size: .875rem; gap: 6px; white-space: nowrap; }
.zt-vcard--card .zt-vcard__btn--main { flex: 1 1 auto; min-width: 0; }
.zt-vcard__btn--off { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; border-radius: 999px; background: var(--z-surface-2); color: var(--z-muted); }

/* Rewards tier medal: over the banner on a card, next to the name in a row. */
.zt-vcard__tier {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700;
    line-height: 1.2; white-space: nowrap; color: #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.zt-vcard__banner .zt-vcard__tier { position: absolute; top: 10px; right: 10px; z-index: 1; }
.zt-vcard__tier--bronze { background: linear-gradient(90deg, #d97706, #b45309); }
.zt-vcard__tier--silver { background: linear-gradient(90deg, #6b7280, #4b5563); }
.zt-vcard__tier--gold { background: linear-gradient(90deg, #facc15, #f59e0b); color: #422006; }
.zt-vcard__tier--platinum { background: linear-gradient(90deg, #a855f7, #4f46e5); }

/* Row layout */
.zt-vcard--row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px 18px; align-items: start; padding: 18px; }
.zt-vcard__tile {
    width: 96px; height: 96px; border-radius: var(--z-radius); overflow: hidden; padding: 0; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--z-hero-from), var(--z-hero-to)); box-shadow: var(--z-shadow);
}
.zt-vcard__tile.zt-chip { background: var(--z-chip); padding: 0; }
.zt-vcard__tile:not(.zt-chip) i { color: var(--z-hero-ink); opacity: .6; }
.zt-vcard__tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zt-vcard--row .zt-vcard__body { padding: 0; text-align: left; }
.zt-vcard--row .zt-vcard__head { justify-content: flex-start; }
.zt-vcard--row .zt-vcard__tags, .zt-vcard--row .zt-vcard__social { justify-content: flex-start; }
.zt-vcard--row .zt-vcard__events { align-self: flex-start; }
.zt-vcard--row .zt-vcard__desc { min-height: 0; -webkit-line-clamp: 2; }
.zt-vcard--row .zt-vcard__social { margin-bottom: 0; }
.zt-vcard--row .zt-vcard__actions { grid-column: 1 / -1; flex-wrap: wrap; margin-top: 0; }
@media (min-width: 641px) {
    .zt-vcard--row { grid-template-columns: 128px minmax(0, 1fr) auto; padding: 22px 24px; }
    .zt-vcard__tile { width: 128px; height: 128px; }
    .zt-vcard--row .zt-vcard__actions { grid-column: auto; flex-wrap: nowrap; }
}

/* Phones: two cards per row, so everything tightens up. */
@media (max-width: 640px) {
    .zt-vcard--card .zt-vcard__body { padding: 0 10px 12px; }
    .zt-vcard--card .zt-vcard__logo.zt-chip { width: 64px; height: 64px; margin-top: -32px; border-width: 3px; }
    .zt-vcard--card .zt-vcard__name { font-size: .925rem; }
    .zt-vcard--card .zt-vcard__desc { font-size: .75rem; -webkit-line-clamp: 2; min-height: 3em; margin-bottom: 10px; }
    .zt-vcard--card .zt-vcard__tag { font-size: .625rem; padding: 2px 6px; }
    .zt-vcard--card .zt-vcard__social { gap: 6px; margin-bottom: 10px; }
    .zt-vcard--card .zt-vcard__social a { width: 26px; height: 26px; font-size: .7rem; }
    .zt-vcard--card .zt-vcard__btn { min-height: 36px; padding: 6px 8px; font-size: .75rem; gap: 4px; }
    .zt-vcard--card .zt-vcard__banner .zt-vcard__tier { top: 6px; right: 6px; font-size: .625rem; padding: 3px 7px; }
}
@media (prefers-reduced-motion: reduce) {
    .zt-vcard--card, .zt-vcard__banner img, .zt-vcard__social a { transition: none; }
    .zt-vcard--card:hover { transform: none; }
    .zt-vcard--card:hover .zt-vcard__banner img { transform: none; }
}
