/* ── Page Layout ── */
.comics-page {
    display: flex;
    gap: 0;
    height: calc(100vh - var(--nav-h));
    padding: var(--nav-h) 0 0 0;
}

/* ── Sidebar ── */
.tag-sidebar {
    width: 200px;
    min-width: 200px;
    background-color: #1a1c1b;
    border-right: 1px solid rgba(127, 255, 212, 0.15);
    padding: 12px 10px;
    box-sizing: border-box;
    position: sticky;
    top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    overflow-x: visible;
    z-index: 100;
}

.tag-search-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.tag-search-input {
    width: 100%;
    box-sizing: border-box;
    background-color: #111312;
    border: 1px solid rgba(127, 255, 212, 0.2);
    color: aquamarine;
    font-family: "jf_dot_ayu";
    font-size: 12px;
    padding: 6px 8px;
    margin-bottom: 0;
    outline: none;
}

.tag-apply-btn {
    width: 100%;
    padding: 6px 0;
    background-color: rgba(127, 255, 212, 0.1);
    border: 1px solid rgba(127, 255, 212, 0.3);
    color: aquamarine;
    font-family: "jf_dot_ayu";
    font-size: 12px;
    cursor: pointer;
    margin-top: 0px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.tag-apply-btn:hover {
    background-color: rgba(127, 255, 212, 0.2);
}

.tag-search-input::placeholder {
    color: rgba(127, 255, 212, 0.3);
}

#tag-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    min-width: 100%;
    background-color: #1a1c1b;
    border: 1px solid rgba(127, 255, 212, 0.2);
    border-top: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    flex-direction: column;
}

.tag-search-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    font-family: "jf_dot_ayu";
}

.tag-search-result:hover {
    background-color: rgba(127, 255, 212, 0.06);
}

.tag-search-result .tag-category-label {
    font-size: 10px;
    opacity: 0.5;
    text-transform: uppercase;
}

#active-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.active-tag-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(127, 255, 212, 0.1);
    border: 1px solid rgba(127, 255, 212, 0.3);
    padding: 2px 6px;
    font-size: 11px;
    font-family: "jf_dot_ayu";
    color: aquamarine;
    cursor: pointer;
}

.active-tag-chip:hover {
    background: rgba(127, 255, 212, 0.18);
}

.tag-category {
    margin-bottom: 14px;
}

.tag-category-title {
    font-family: "jf_dot_ayu";
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(127, 255, 212, 0.4);
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(127, 255, 212, 0.1);
    margin-bottom: 6px;
}

.tag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 4px;
    cursor: pointer;
    border-radius: 2px;
    font-family: "jf_dot_ayu";
    font-size: 12px;
}

.tag-row:hover {
    background-color: rgba(127, 255, 212, 0.06);
}

.tag-count {
    font-size: 11px;
    opacity: 0.5;
}

.tag-copyright .tag-name  { color: #f0d060; }
.tag-character .tag-name  { color: #80c89a; }
.tag-general .tag-name    { color: #80aad0; }

.tag-copyright .tag-count { color: #f0d060; }
.tag-character .tag-count { color: #80c89a; }
.tag-general .tag-count   { color: #80aad0; }

.tag-copyright .tag-name.search-result { color: #f0d060; }
.tag-character .tag-name.search-result { color: #80c89a; }
.tag-general .tag-name.search-result   { color: #80aad0; }

/* ── Main Content ── */
.comics-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 12px;
}

.comic-cover {
    /* fills the cover link, which keeps the same small gap above and on both sides */
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    padding: 0;
    object-fit: cover;
    margin: 0;
    border-radius: 1%;
    border: 1px solid aquamarine;
    transition: transform 0.2s;
}

.comic-cover:hover {
    transform: scale(1.01);
}

.title {
    color: rgb(11, 190, 161);
}

.comic-item:hover .title {
    animation: flasher 0.5s linear infinite alternate;
}

@keyframes flasher {
    0%   { color: rgb(11, 190, 161); }
    100% { color: white; }
}

.comic-item {
    display: flex;
    justify-content: flex-start;   /* cover sits at the top even when a row's cards are taller */
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(127, 255, 212, 0.192);
    background-color: #151616;
}

.comic-item a.title {
    padding: 0;
    width: 100%;
    text-align: center;
    background-color: #202221;
    font-size: large;
    text-decoration: none;
}

.comic-details {
    display: flex;
    justify-content: space-evenly;
    flex-direction: row;
    align-items: center;
    padding: 5px;
    width: 100%;
}

.comic-details p {
    color: #ddd;
    padding: 0;
    margin: 0;
    text-align: center;
    margin-bottom: 5px;
    font-size: 12px;
    height: 50%;
}

.detail-element {
    display: flex;
    align-items: center;
    flex-direction: row;
}

.detail-element i { margin-right: 5px; }
.detail-element p { height: 100%; margin: 0; }

.comic-item.hidden { display: none; }

.series-type-plaque {
    font-family: "jf_dot_ayu";
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid;
    margin: 4px 0 6px 0;
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.series-type-comic { color: #80aad0 !important; border-color: rgba(128, 170, 208, 0.3); background-color: rgba(128, 170, 208, 0.08); }
.series-type-ongoing-comic { color: #80c89a !important; border-color: rgba(128, 200, 154, 0.3); background-color: rgba(128, 200, 154, 0.08); }
.series-type-image-set { color: #f0d060 !important; border-color: rgba(240, 208, 96, 0.3); background-color: rgba(240, 208, 96, 0.08); }
.series-type-image { color: #d080c8 !important; border-color: rgba(208, 128, 200, 0.3); background-color: rgba(208, 128, 200, 0.08); }
.series-type-video { color: #e08080 !important; border-color: rgba(224, 128, 128, 0.3); background-color: rgba(224, 128, 128, 0.08); }

/* Cover + "Patreon exclusive" label laid over the bottom of the image (card size unchanged) */
.comic-cover-link {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: calc(100% - 10px);
    margin: 5px auto 0;   /* 5px gap above and on both sides of the cover */
    line-height: 0;
    transition: transform 0.2s;
}
.comic-cover-link:hover { transform: scale(1.01); }
.comic-cover-link .comic-cover:hover { transform: none; }
.series-lock-plaque {
    position: absolute;
    left: 1px;
    right: 1px;
    top: 1px;    /* just inside the cover's 1px border */
    box-sizing: border-box;
    font-family: "jf_dot_ayu";
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    padding: 7px 8px 22px;   /* extra room at the bottom for the fade */
    color: #ffd43b;
    /* solid at the top, fading into the cover towards the bottom */
    background: linear-gradient(to bottom,
        rgba(21, 22, 22, 0.92) 0%,
        rgba(21, 22, 22, 0.75) 55%,
        rgba(21, 22, 22, 0) 100%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}
.series-lock-plaque .lock-line,
.series-lock-plaque .lock-tier {
    display: block;
    color: #ffd43b;
    font-family: "jf_dot_ayu";
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.series-lock-plaque .lock-tier { font-size: 12px; color: #fff3c4; }

/* admin-only marker for content on the Private access tier */
.private-badge {
    display: inline-block; vertical-align: middle;
    font-family: "jf_dot_ayu"; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; line-height: 1.3;
    color: #ffb3c7; background: rgba(40, 10, 20, 0.88); border: 1px solid rgba(255, 120, 160, 0.6);
    padding: 2px 6px; border-radius: 2px;
}
.private-badge-corner { position: absolute; top: 4px; right: 4px; z-index: 2; pointer-events: none; }
.info-private { margin: 10px 0; font-size: 14px; color: #ffb3c7; }

/* ── Phones: two covers per row (tags are in the Filter sheet, see filter_sheet.css) ── */
@media (max-width: 700px) {
    .comics-main { padding: 12px 12px 96px; overflow: visible; }
    .comic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
