/**
 * communityCards.css
 * Shared styles for review cards, list cards, and their detail modals.
 * Used by Community Thoughts and the Showcase Profile (Reviews/Lists/Profile tabs).
 */

/* ============================================================
   Reviews: masonry-feel grid (varying card heights look natural)
   ============================================================ */
.ct-grid-reviews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}

.ct-review-card {
    background: var(--mv-bg-card, #fff);
    border: 1px solid var(--mv-border-color, #dee2e6);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
}
.ct-review-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mv-shadow-lg, 0 4px 14px rgba(0, 0, 0, 0.10));
    border-color: var(--mv-accent-primary, #0d6efd);
}

.ct-review-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.ct-review-poster {
    flex: 0 0 56px;
    width: 56px;
    height: 84px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--mv-bg-surface, #e9ecef);
    position: relative;
}
.ct-review-poster img { width: 100%; height: 100%; object-fit: cover; }
.ct-review-poster .ct-no-image {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--mv-text-muted, #adb5bd);
}

.ct-review-meta { flex: 1; min-width: 0; }
.ct-review-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    margin-bottom: 4px;
    color: var(--mv-text-primary, #212529);
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.ct-review-title-text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ct-review-title-year {
    flex-shrink: 0;
    font-size: 0.82rem;
    color: var(--mv-text-muted, #6c757d);
}

.ct-review-rating-row { margin-top: 6px; }
.ct-review-rating-row .ct-rating-chip + .ct-rec { margin-left: 8px; }

.ct-type-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    backdrop-filter: blur(4px);
}
.ct-type-badge i { font-size: 0.75rem; }

.ct-review-cast {
    font-size: 0.75rem;
    color: var(--mv-text-secondary, #6c757d);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ct-cast-label { color: var(--mv-text-muted, #adb5bd); }

.ct-rating-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 9px;
    background: var(--mv-accent-warning, #ffc107);
    color: #1f1f1f;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.ct-rating-chip i {
    font-size: 0.78em;
    color: #1f1f1f;
}
.ct-review-sub {
    font-size: 0.75rem;
    color: var(--mv-text-muted, #6c757d);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.ct-review-headline {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 6px;
    color: var(--mv-text-primary, #212529);
}

.ct-review-blurb {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--mv-text-secondary, #495057);
    margin-bottom: 10px;
    flex: 1;
}

.ct-review-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--mv-border-color, #e9ecef);
    font-size: 0.78rem;
    color: var(--mv-text-muted, #6c757d);
}
.ct-review-author { font-weight: 500; color: var(--mv-text-secondary, #495057); }
.ct-rec { display: inline-flex; align-items: center; gap: 4px; }
.ct-rec.yes { color: #198754; }
.ct-rec.no  { color: #dc3545; }

/* ============================================================
   Lists: gallery cards
   ============================================================ */
.ct-grid-lists {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.ct-list-card {
    background: var(--mv-bg-card, #fff);
    border: 1px solid var(--mv-border-color, #dee2e6);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.ct-list-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mv-shadow-lg, 0 4px 14px rgba(0, 0, 0, 0.10));
    border-color: var(--mv-accent-primary, #0d6efd);
}

.ct-list-cover {
    position: relative;
    width: 100%;
    height: 130px;
    background: #1e293b;
    overflow: hidden;
}
.ct-list-cover img {
    width: 100%; height: 100%; object-fit: cover;
}
/* Make the EntityListUtils collage fill the 130px cover area exactly */
.ct-list-cover .el-card-collage {
    height: 100%;
    border-radius: 0;
}
.ct-list-cover .el-card-img-placeholder {
    height: 100%;
}
.ct-list-cover-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2.4rem;
}
.ct-list-cover .ct-list-type {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    backdrop-filter: blur(6px);
}
.ct-list-cover .ct-list-count {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
}
.ct-list-cover .ct-list-ranked-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(13, 110, 253, 0.85);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ct-list-cover .ct-list-ranked-badge i { font-size: 0.85em; }

.ct-list-body { padding: 12px 14px 14px; }
.ct-list-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
    color: var(--mv-text-primary, #212529);
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ct-list-desc {
    font-size: 0.8rem;
    color: var(--mv-text-muted, #6c757d);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
    min-height: 2.4em;
}
.ct-list-foot {
    font-size: 0.75rem;
    color: var(--mv-text-secondary, #6c757d);
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--mv-border-color, #e9ecef);
    padding-top: 8px;
}

/* ============================================================
   Modals: review detail + list detail
   ============================================================ */
.ct-modal-review-head { display: flex; gap: 14px; margin-bottom: 14px; }
.ct-modal-review-head .ct-review-poster { flex: 0 0 80px; width: 80px; height: 120px; }
.ct-modal-review-headline { font-weight: 700; font-size: 1.15rem; }
.ct-modal-review-sub { font-size: 0.85rem; color: var(--mv-text-muted, #6c757d); }
.ct-modal-review-date { margin-left: 12px; }
.ct-modal-title-link { color: var(--bs-link-color); text-decoration: none; }
.ct-modal-title-link:hover { color: var(--bs-link-hover-color); text-decoration: none; }
.ct-modal-title-year { font-size: 0.8em; font-weight: 400; color: var(--mv-text-muted, #6c757d); }
.ct-modal-review-text {
    margin: 14px 0;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--mv-text-primary, #212529);
}
.ct-modal-review-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--mv-border-color, #e9ecef);
    font-size: 0.85rem;
}

.ct-modal-list-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    color: var(--mv-text-muted, #6c757d);
    font-size: 0.85rem;
}
.ct-meta-info { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.ct-meta-line1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-meta-line2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-meta-action { flex: 0 0 auto; }
.ct-meta-action .ct-play-all-btn { white-space: nowrap; }
/* Default: full label, short label hidden. Mobile flips it via media query. */
.ct-btn-label-short { display: none; }
.ct-modal-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}
.ct-modal-list-item {
    text-decoration: none;
    color: inherit;
    display: block;
}
.ct-modal-list-item:hover { transform: translateY(-2px); text-decoration: none; color: inherit; }
.ct-modal-list-item-img {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: hidden;
    background: var(--mv-bg-surface, #e9ecef);
    margin-bottom: 5px;
}
.ct-modal-list-item-img img { width: 100%; height: 100%; object-fit: cover; }
.ct-modal-list-item-img .ct-no-image {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--mv-text-muted, #adb5bd);
    font-size: 1.6rem;
}
.ct-modal-list-item-title {
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--mv-text-primary, #212529);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ct-modal-list-item-sub {
    font-size: 0.7rem;
    color: var(--mv-text-muted, #6c757d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ct-list-rank-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.2;
    z-index: 1;
}

/* Per-poster trailer play button (top-right) for movie/TV items */
.ct-trailer-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(220, 53, 69, 0.92);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: transform 0.12s ease, background 0.12s ease;
}
.ct-trailer-btn:hover {
    background: #dc3545;
    transform: scale(1.08);
}
.ct-trailer-btn i { font-size: 1rem; line-height: 1; }

/* Empty placeholder used inside cards (no poster / image) */
.ct-no-image {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--mv-text-muted, #adb5bd);
}

/* ============================================================
   Album review extras: listening format + standout songs
   ============================================================ */
.ct-format-line { margin-top: 8px; }
.ct-format-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
    background: var(--mv-bg-surface, #e9ecef);
    color: var(--mv-text-secondary, #495057);
}

.ct-standouts { margin-top: 10px; }
.ct-standouts-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mv-text-muted, #6c757d);
    margin-bottom: 4px;
}
.ct-standout-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 3px 0;
}
.ct-standout-text { min-width: 0; flex: 1 1 auto; }
.ct-standout-name {
    font-size: 0.88rem;
    color: var(--mv-text-primary, #212529);
}
.ct-standout-note {
    font-size: 0.8rem;
    color: var(--mv-text-muted, #6c757d);
    font-style: italic;
    margin-top: 1px;
}
.ct-song-play-btn,
.ct-song-play-spacer {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
}
.ct-song-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #198754;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s ease, background 0.12s ease;
}
.ct-song-play-btn:hover { background: #157347; transform: scale(1.08); }
.ct-song-play-btn i { font-size: 0.9rem; line-height: 1; }

/* ============================================================
   Concert review extras: venue line + see-again / venue / sound
   ============================================================ */
.ct-modal-venue {
    font-size: 0.85rem;
    color: var(--mv-text-secondary, #495057);
    margin-top: 6px;
}
.ct-modal-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.ct-meta-chip {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
    background: var(--mv-bg-surface, #e9ecef);
    color: var(--mv-text-secondary, #495057);
}

@media (max-width: 575px) {
    .ct-grid-reviews { grid-template-columns: 1fr; }
    .ct-grid-lists { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    /* Standard mobile poster grid: always 3 per row */
    .ct-modal-list-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    /* Compact button labels so they stay on one line */
    .ct-btn-label-full { display: none; }
    .ct-btn-label-short { display: inline; }
    /* List card foot: collapse author and date onto one wrapping row
       (no forced two-column layout that wastes space on narrow screens). */
    .ct-list-foot {
        display: block;
    }
    .ct-list-foot > span + span::before {
        content: "\00A0\00B7\00A0";  /* nbsp · nbsp — regular spaces collapse */
    }
}
