﻿/* Anime / release section and its detail popup. */

.releases { display: flex; flex-direction: column; gap: 14px; }

.releases__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

.releases__header h2 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.releases__day {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 8px 0 -2px;
    font-size: 1rem;
    font-weight: 600;
}

.releases__day span, .releases__season { color: var(--ink-muted); font-size: var(--text-sm); font-weight: 400; }
.releases__season { margin: 0; }
.releases__more { align-self: center; }
.releases__message { padding: 18px 20px; }
.releases__message p { margin: 0 0 8px; color: var(--ink-muted); }

.releases__credit { margin: 0; color: var(--ink-muted); font-size: var(--text-xs); text-align: right; }
.releases__credit a { color: inherit; }

/* Columns: see "Tiles" in anime.css (a share of the width). */
.release-grid { gap: 10px; }

.release-card {
    position: relative;
    display: flex;
    gap: 14px;
    min-height: 156px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: inherit;
    text-align: left;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
}

.release-card:hover { border-color: var(--accent); transform: translateY(-1px); }

.release-card__cover { position: relative; width: clamp(96px, 5vw + 3vh, 140px); flex: none; background: var(--media-color); }
.release-card__cover .release-card__jellyfin { position: absolute; left: 8px; bottom: 8px; }
.release-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.release-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 12px 14px 12px 0; }

.release-card__when { display: flex; flex-wrap: wrap; align-items: center; gap: 0 5px; color: var(--ink-muted); font-size: 0.78rem; font-weight: 600; }
.release-card__when.is-countdown { color: var(--accent); }
.release-card__time { color: var(--ink-muted); font-weight: 400; }

.release-card__title {
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.release-card__meta { color: var(--ink-muted); font-size: 0.8rem; }

.release-card__genres { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }

/* List status or score, top right. */
.release-card__corner { position: absolute; top: 9px; right: 10px; }

/* Leave room for the badge so long titles don't run underneath it. */
.release-card:has(.release-card__corner) .release-card__when { padding-right: 96px; }

.release-dialog__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 18px; }
.release-dialog__list .form-error { flex-basis: 100%; }

.release-card--skeleton {
    cursor: default;
    background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
    background-size: 200% 100%;
    animation: shani-shimmer 1.2s linear infinite;
}

.release-card__title { font-size: clamp(0.92rem, 0.7rem + 0.3vw, 1.05rem); }

/* ---------- Detail popup ---------- */

.release-dialog .article-dialog__body { padding-top: 0; }

.release-dialog__banner {
    height: 180px;
    margin: 0 calc(-1 * clamp(20px, 5vw, 56px));
    background: var(--media-color);
    overflow: hidden;
}

.release-dialog__banner img { width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }

.release-dialog__head { display: flex; align-items: flex-end; gap: 20px; margin-top: -64px; margin-bottom: 16px; }
.release-dialog__head h1 { margin-top: 72px; }

.article-dialog__body .release-dialog__cover {
    width: 120px;
    aspect-ratio: 2 / 3;
    flex: none;
    margin: 0;
    object-fit: cover;
    border: 3px solid var(--bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.release-dialog__when { margin: 0; color: var(--accent); font-size: 0.9rem; font-weight: 600; }
.release-dialog__when span { color: var(--ink-muted); font-weight: 400; }

.release-dialog__facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 16px; }
.release-dialog__facts dt { color: var(--ink-muted); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.release-dialog__facts dd { margin: 0; font-weight: 600; }

.release-dialog__genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }

@media (max-width: 600px) {
    .release-dialog__cover { width: 88px; }
}

@media (prefers-reduced-motion: reduce) {
    .release-card--skeleton { animation: none; }
}
