/* Дополнительные стили поверх Tailwind.

   Основная дизайн-система — в base.html (CSS-переменные --bg, --ink,
   --accent, --tone-* и компоненты .btn-*, .club-card, .category-tile,
   .chip, .hero-cta, .radio-card). Здесь — только узкие правки и
   стилизация Яндекс.Карт. */

/* Ссылки в теле статьи (страницы /about, /for-owners) */
.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.prose a:hover {
    color: var(--accent-hover);
}
.prose p {
    margin-bottom: 1em;
    line-height: 1.6;
}

/* Яндекс.Карты v3: маркер и popup. Через CSS-переменные, чтобы менять цвет
   маркера сразу для всей карты при смене темы. */
.ymap-marker {
    position: relative;
    cursor: pointer;
    width: 0;
    height: 0;
    outline: none;
}
.ymap-marker:focus-visible .ymap-marker__pin {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.ymap-marker__pin {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--surface);
    box-shadow: 0 2px 6px rgba(21,22,28,0.25);
    transform: translate(-50%, -100%);
}

/* Кастомный popup над маркером. */
.ymap-popup {
    position: relative;
    min-width: 220px;
    max-width: 280px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: 12px 32px 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    transform: translate(-50%, calc(-100% - 36px));
}
.ymap-popup__title {
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}
.ymap-popup__meta {
    color: var(--ink-muted);
    margin-bottom: 8px;
    font-size: 13px;
}
.ymap-popup__link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.ymap-popup__link:hover {
    text-decoration: underline;
}
.ymap-popup__close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: transparent;
    border: 0;
    font-size: 18px;
    line-height: 1;
    color: var(--ink-soft);
    cursor: pointer;
    padding: 4px 6px;
}
.ymap-popup__close:hover {
    color: var(--ink);
}

/* Заглушка при отсутствии API-ключа карт. */
.ymap-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    color: var(--ink-muted);
    text-align: center;
    padding: 20px;
    font-size: 14px;
    border-radius: var(--r-lg);
}

/* Лента chip-ов горизонтально-скроллящаяся. На мобилке — без полосы скролла. */
.chips-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 4px 8px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }

/* Кастомные чекбоксы (фильтры, ассистент). Минимально, без внешних либ. */
input[type="checkbox"].kw-check {
    appearance: none;
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border: 2px solid var(--line-deep);
    border-radius: 4px;
    background: var(--surface);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background 100ms ease, border-color 100ms ease;
}
input[type="checkbox"].kw-check:checked {
    background: var(--accent);
    border-color: var(--accent);
}
input[type="checkbox"].kw-check:checked::after {
    content: "";
    position: absolute;
    top: 1px; left: 5px;
    width: 4px; height: 8px;
    border: solid var(--accent-ink);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
input[type="checkbox"].kw-check:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Collapsible-секция фильтров */
.filter-group {
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
}
.filter-group:last-child { border-bottom: 0; }
.filter-group summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after {
    content: "+";
    font-weight: 600;
    color: var(--ink-soft);
    transition: transform 150ms ease;
}
.filter-group[open] summary::after {
    content: "–";
}
.filter-group__body {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Старый алиас на случай, если где-то остались ссылки на .category-card */
.category-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 150ms ease, box-shadow 150ms ease;
}
.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
