/* HH SINGLE COMIC PAGE CSS */

.hh-comic {
    --comic-bg-top: #1a1f24;
    --comic-bg-bottom: #3c4550;
    --comic-accent: #c64e8b;
    --comic-text: #ffffff;

    background: linear-gradient(180deg, var(--comic-bg-top), var(--comic-bg-bottom));
    color: var(--comic-text);
    position: relative;
    isolation: isolate;

    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 2rem;
    padding: 2rem 3rem 4rem;
    min-height: 100vh;
}

/* BG art */
.hh-comic::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70vh;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /* mask */
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

/* ---------- HERO ---------- */
.hh-comic-hero {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.hh-comic-cover-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    display: block;
}

.hh-comic-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 0.75rem;
}

.hh-comic-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    margin-right: 0.4rem;
}

.hh-comic-creators,
.hh-comic-genres {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.hh-comic-description {
    margin: 1rem 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* ---------- ACTION BUTTONS ---------- */
.hh-comic-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hh-comic-action {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--comic-text);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hh-comic-action:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--comic-accent);
}

.hh-comic-action--read {
    background:    var(--comic-accent);
    border-color:  var(--comic-accent);
}
.hh-comic-action--read:hover {
    background: transparent;
    color:      var(--comic-accent);
}

.hh-comic-action.is-added {
    background:    var(--comic-accent);
    border-color:  var(--comic-accent);
}

.hh-comic-action:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ---------- SECTION HEADINGS ---------- */
.hh-comic-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

/* ---------- CHAPTERS ---------- */
.hh-comic-chapters {
    margin-bottom: 3rem;
}

.hh-comic-chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hh-chapters-sort {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.hh-chapters-sort:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hh-chapters-empty {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    padding: 2rem 0;
    text-align: center;
}

/* ---------- RECOMMENDED ---------- */
.hh-comic-recommended {
    margin-bottom: 3rem;
}

.hh-recommended-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.hh-recommended-empty {
    color: rgba(255, 255, 255, 0.5);
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 0;
}

/* telephone */
@media (max-width: 1100px) {
    .hh-comic {
        grid-template-columns: 1fr;
    }
    .hh-comic-ad-slot {
        height: 200px;
        position: static;
    }
    .hh-recommended-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hh-comic {
        padding: 1.5rem 1rem 3rem;
        gap: 1.5rem;
    }
    .hh-comic-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hh-comic-cover-img {
        max-width: 200px;
        margin: 0 auto;
    }
    .hh-comic-title {
        font-size: 1.75rem;
    }
    .hh-comic-actions {
        justify-content: center;
    }
    .hh-recommended-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}