/* ============================================================================
   Tags — public tag browser (tag index + one tag's girls)
   Tokens come from aistarlets.css. The girl grid itself is home.css's
   .girl-grid / .girl-card, loaded alongside this file so the cards on a tag
   page are pixel-identical to the ones on the catalog.
   ============================================================================ */

.tags { width: 100%; }

/* heading pill ----------------------------------------------------------- */
.tags-pill-row {
    padding: 16px 18px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.tags-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid var(--ast-line-strong);
    background: var(--ast-surface-soft);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .01em;
    color: #efeaf4;
}
.tags-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--ast-muted);
}

/* filter row ------------------------------------------------------------- */
.tags-filter { padding: 4px 18px 12px; }
.tags-search {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.tags-search .ast-search-icon {
    position: absolute;
    left: 14px;
    width: 17px;
    height: 17px;
    color: var(--ast-muted);
    pointer-events: none;
}
.tags-search input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border-radius: 100px;
    border: 1px solid var(--ast-line-strong);
    background: var(--ast-surface-soft);
    font-family: var(--ast-font);
    font-size: 14px;
    color: var(--ast-text);
    outline: none;
    transition: border-color .18s ease;
}
.tags-search input::placeholder { color: var(--ast-faint); }
.tags-search input:focus {
    border-color: color-mix(in oklab, var(--ast-accent-a) 55%, transparent);
}

/* category chips scroll horizontally rather than stacking on a narrow shell */
.tags-cats {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.tags-cats::-webkit-scrollbar { display: none; }
.tags-cat {
    flex: none;
    padding: 7px 14px;
    border-radius: 100px;
    border: 1px solid var(--ast-line);
    background: transparent;
    font-family: var(--ast-font);
    font-weight: 600;
    font-size: 13px;
    color: var(--ast-text-2);
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.tags-cat:hover { border-color: var(--ast-line-strong); color: var(--ast-text); }
.tags-cat.is-active {
    color: var(--ast-bg);
    background: var(--ast-accent);
    border-color: transparent;
    font-weight: 700;
}

/* tag cloud -------------------------------------------------------------- */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 18px 8px;
}
.tag-cloud-item {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 100px;
    border: 1px solid var(--ast-line);
    background: var(--ast-surface-soft);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    color: var(--ast-text);
    transition: transform .14s ease, border-color .18s ease, background .18s ease;
}
.tag-cloud-item:active { transform: scale(.97); }
.tag-cloud-item:hover {
    border-color: color-mix(in oklab, var(--ast-accent-a) 45%, transparent);
    background: var(--ast-surface-hover);
}
.tag-cloud-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--ast-accent-a);
}

/* one tag ---------------------------------------------------------------- */
.tag-head { padding: 14px 18px 6px; }
.tag-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ast-muted);
    text-decoration: none;
    margin-bottom: 12px;
}
.tag-back:hover { color: var(--ast-text); }
.tag-back svg { width: 15px; height: 15px; }

.tag-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ast-text);
}
.tag-cat-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ast-accent-a);
}
.tag-sub { font-size: 13.5px; color: var(--ast-muted); margin: 0; }
.tag-desc {
    margin: 10px 0 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ast-text-2);
    max-width: 52ch;
}

/* staff-only rating badge — regular visitors never see this */
.tag-rating {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 3px 9px;
    border-radius: 100px;
    border: 1px solid var(--ast-line-strong);
    color: var(--ast-muted);
}
.tag-rating--explicit { color: var(--ast-danger); }
.tag-rating--suggestive { color: #f0b35b; }
.tag-rating--safe { color: var(--ast-online); }

/* desktop: the shell widens, so let the rows breathe like home.css does */
@media (min-width: 1024px) {
    .tags-pill-row { padding: 6px 0 12px; }
    .tags-filter,
    .tag-cloud,
    .tag-head { padding-left: 0; padding-right: 0; }
}
