/* Tea Shop Directory
 * Inherits your theme's fonts and text colour. Change the accent via Appearance → Customize → Additional CSS:
 *   .tsd { --tsd-accent: #7a5230; }
 */
.tsd {
    --tsd-accent: #6b4f35;
    --tsd-line: rgba(127, 127, 127, 0.22);
    --tsd-soft: rgba(127, 127, 127, 0.07);
    --tsd-radius: 14px;
    --tsd-gold: #d9a63c;
    margin: 1.5em 0;
}
.tsd *, .tsd *::before, .tsd *::after { box-sizing: border-box; }

/* ---------- Filter panel ---------- */
.tsd .tsd-panel {
    padding: 18px;
    border-radius: var(--tsd-radius);
    background: var(--tsd-soft);
}
.tsd .tsd-controls {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.tsd .tsd-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tsd .tsd-field label,
.tsd .tsd-filter-label {
    margin: 0;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
}
.tsd .tsd-field--search { position: relative; }
.tsd .tsd-field input,
.tsd .tsd-field select {
    width: 100%;
    max-width: none;
    height: 42px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--tsd-line);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.04);
    color: inherit;
    font: inherit;
    font-size: 16px;
    box-shadow: none;
}
.tsd .tsd-field input[type="search"] {
    padding-left: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5.5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 13px 50%;
}
.tsd .tsd-field select option { color: #111; }
.tsd .tsd-field input:focus,
.tsd .tsd-field select:focus { outline: 2px solid var(--tsd-accent); outline-offset: 1px; border-color: transparent; }

.tsd .tsd-filter-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.tsd .tsd-filter-row + .tsd-filter-row { margin-top: 10px; }
.tsd .tsd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tsd .tsd-chip {
    margin: 0;
    padding: 6px 12px;
    min-height: 0;
    border: 1px solid var(--tsd-line);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.84em;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.tsd .tsd-chip:hover { border-color: var(--tsd-accent); color: inherit; background: transparent; }
.tsd .tsd-chip[aria-pressed="true"] { background: var(--tsd-accent); border-color: var(--tsd-accent); color: #fff; }
.tsd .tsd-chip--tag[aria-pressed="true"]::before { content: "✓ "; }
.tsd .tsd-chip:focus-visible { outline: 2px solid var(--tsd-accent); outline-offset: 2px; }

.tsd .tsd-status { display: flex; align-items: baseline; gap: 14px; margin: 20px 2px 12px; }
.tsd .tsd-count { margin: 0; font-size: 0.95em; font-weight: 600; }
.tsd .tsd-clear {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 0.85em;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    opacity: 0.7;
    cursor: pointer;
}
.tsd .tsd-clear:hover { opacity: 1; background: none; color: inherit; }
.tsd .tsd-clear[hidden] { display: none; }

/* ---------- Cards ---------- */
.tsd .tsd-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.tsd .tsd-card { margin: 0; padding: 0; min-width: 0; }
.tsd .tsd-card[hidden] { display: none; }
.tsd .tsd-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px;
    border: 1px solid var(--tsd-line);
    border-radius: var(--tsd-radius);
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.tsd-card-inner:hover,
a.tsd-card-inner:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--tsd-accent) 55%, transparent);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.25);
    color: inherit;
    text-decoration: none;
}
a.tsd-card-inner:focus-visible { outline: 2px solid var(--tsd-accent); outline-offset: 2px; }

.tsd .tsd-card-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.tsd .tsd-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}
.tsd .tsd-logo img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: contain; }
.tsd .tsd-logo--small img { width: 26px; height: 26px; image-rendering: auto; }
.tsd .tsd-logo--mono {
    background: var(--tsd-mono, var(--tsd-accent));
    color: #fff;
    font-size: 0.9em;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.tsd .tsd-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tsd .tsd-name {
    font-weight: 650;
    font-size: 1em;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tsd .tsd-sub { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; font-size: 0.78em; line-height: 1.3; opacity: 0.7; min-width: 0; }
.tsd .tsd-country { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tsd .tsd-flag { display: block; width: 16px; height: 12px; margin: 0; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); object-fit: cover; }
.tsd .tsd-country + .tsd-country { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tsd .tsd-host { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsd .tsd-host::before { content: "·"; margin-right: 8px; }
.tsd .tsd-arrow {
    align-self: start;
    font-size: 1.05em;
    line-height: 1;
    opacity: 0.3;
    transition: opacity 0.18s, transform 0.18s, color 0.18s;
}
a.tsd-card-inner:hover .tsd-arrow,
a.tsd-card-inner:focus-visible .tsd-arrow { opacity: 1; color: var(--tsd-accent); transform: translate(2px, -2px); }

.tsd .tsd-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 10px;
    font-size: 0.86em;
    line-height: 1.45;
    opacity: 0.8;
}
.tsd .tsd-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 10px; }
.tsd .tsd-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--tsd-soft);
    font-size: 0.72em;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}
.tsd .tsd-tag--more { opacity: 0.7; }

/* ---------- Featured ---------- */
.tsd .tsd-card[data-featured] .tsd-card-inner {
    border-color: color-mix(in srgb, var(--tsd-gold) 70%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--tsd-gold) 11%, transparent), color-mix(in srgb, var(--tsd-gold) 3%, transparent));
    box-shadow: 0 1px 0 color-mix(in srgb, var(--tsd-gold) 25%, transparent);
}
.tsd .tsd-badge {
    align-self: flex-start;
    margin-bottom: 1px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--tsd-gold);
    color: #2b2108;
    font-size: 0.66em;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.6;
    text-transform: uppercase;
}

/* ---------- More / empty / suggest ---------- */
.tsd .tsd-more-wrap { text-align: center; margin-top: 22px; }
.tsd .tsd-more {
    margin: 0;
    padding: 10px 20px;
    border: 1px solid var(--tsd-line);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    cursor: pointer;
}
.tsd .tsd-more:hover { border-color: var(--tsd-accent); background: var(--tsd-accent); color: #fff; }
.tsd .tsd-more[hidden] { display: none; }
.tsd .tsd-empty { padding: 40px 16px; text-align: center; border: 1px dashed var(--tsd-line); border-radius: var(--tsd-radius); }
.tsd .tsd-empty[hidden] { display: none; }
.tsd .tsd-empty p { margin: 0 0 12px; }
.tsd .tsd-suggest { margin-top: 26px; text-align: center; font-size: 0.92em; opacity: 0.85; }

.tsd .tsd-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

@media (max-width: 700px) {
    .tsd .tsd-panel { padding: 14px; }
    .tsd .tsd-controls { grid-template-columns: 1fr 1fr; }
    .tsd .tsd-field--search { grid-column: 1 / -1; }
    .tsd .tsd-filter-row { grid-template-columns: 1fr; gap: 6px; }
    .tsd .tsd-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -14px; padding: 2px 14px 4px 2px; scrollbar-width: none; }
    .tsd .tsd-chips::-webkit-scrollbar { display: none; }
    .tsd .tsd-chip { flex: 0 0 auto; }
    .tsd .tsd-grid { grid-template-columns: 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .tsd .tsd-chip, .tsd .tsd-card-inner, .tsd .tsd-arrow { transition: none; }
    a.tsd-card-inner:hover, a.tsd-card-inner:focus-visible { transform: none; }
}
