/*
 * TGM LCM — Track gallery (front-end).
 *
 * Dark theme via theme.css tokens. Responsive grid: 4-up desktop, 2-up
 * tablet, 1-up phone, per spec. The single-track detail page reuses
 * many of these classes for the hero artwork.
 */

.tgm-lcm-gallery {
    color: var(--tgm-lcm-text);
    font-family: var(--tgm-lcm-font);
    background: var(--tgm-lcm-bg);
    padding: 24px 0;
}

/* State-aware join / upgrade band above the grid (TGM_LCM_Upgrade::
   render_join_band). Hidden for paid members server-side. */
.tgm-lcm-join-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--tgm-lcm-surface), var(--tgm-lcm-surface-2));
    border: 1px solid var(--tgm-lcm-border-strong);
    border-left: 4px solid var(--tgm-lcm-accent);
    border-radius: var(--tgm-lcm-radius-lg);
    padding: 18px 24px;
    margin: 0 0 24px;
}

.tgm-lcm-join-band-text {
    min-width: 0;
    flex: 1 1 320px;
}

.tgm-lcm-join-band-title {
    margin: 0 0 4px;
    font-size: 19px;
    color: var(--tgm-lcm-text);
}

.tgm-lcm-join-band-sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tgm-lcm-text-muted);
}

.tgm-lcm-join-band-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.tgm-lcm-join-band-cta {
    display: inline-block;
    background: var(--tgm-lcm-accent);
    color: var(--tgm-lcm-accent-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 11px 22px;
    border-radius: var(--tgm-lcm-radius);
    white-space: nowrap;
    transition: background 0.15s ease;
}

.tgm-lcm-join-band-cta:hover {
    background: var(--tgm-lcm-accent-hover);
    color: var(--tgm-lcm-accent-text);
}

.tgm-lcm-join-band-secondary {
    color: var(--tgm-lcm-text-muted);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.tgm-lcm-join-band-secondary:hover {
    color: var(--tgm-lcm-accent);
}

@media (max-width: 560px) {
    .tgm-lcm-join-band-actions {
        flex: 1 1 100%;
    }
    .tgm-lcm-join-band-cta {
        flex: 1 1 auto;
        text-align: center;
    }
}

.tgm-lcm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .tgm-lcm-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .tgm-lcm-gallery-grid { grid-template-columns: 1fr; }
}

.tgm-lcm-gallery-empty {
    color: var(--tgm-lcm-text-muted);
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
}

/* Card */
.tgm-lcm-card {
    background: var(--tgm-lcm-surface);
    border: 1px solid var(--tgm-lcm-border);
    border-radius: var(--tgm-lcm-radius);
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tgm-lcm-card:hover {
    transform: translateY(-2px);
    border-color: var(--tgm-lcm-border-strong);
    box-shadow: var(--tgm-lcm-shadow);
}

.tgm-lcm-card-artwork {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--tgm-lcm-bg);
}

.tgm-lcm-card-artwork-link {
    position: absolute;
    inset: 0;
    display: block;
    text-decoration: none;
}

.tgm-lcm-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tgm-lcm-card-image-placeholder {
    width: 100%;
    height: 100%;
}

/* Gallery card play button — bare button, the SVG carries the visual.
   No outer ring; clean filled-circle play icon. Theme-button styles
   nuked with !important so GeneratePress's hover-grey doesn't bleed in. */
.tgm-lcm-card-play,
.tgm-lcm-card-play:hover,
.tgm-lcm-card-play:focus,
.tgm-lcm-card-play:active {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    color: inherit !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.tgm-lcm-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    cursor: pointer !important;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 2;
    line-height: 0 !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

.tgm-lcm-card-play:focus-visible {
    outline: 2px solid var(--tgm-lcm-accent) !important;
    outline-offset: 4px !important;
}

.tgm-lcm-card:hover .tgm-lcm-card-play,
.tgm-lcm-card:focus-within .tgm-lcm-card-play {
    opacity: 1;
}

.tgm-lcm-card-play:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.tgm-lcm-card-play .tgm-lcm-play-icon {
    display: block;
    width: 64px;
    height: 64px;
    background-image: url('../img/lcm-play-heart.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.tgm-lcm-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 17, 21, 0.8);
    color: var(--tgm-lcm-text);
    font-family: var(--tgm-lcm-font-mono);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: var(--tgm-lcm-radius-sm);
}

.tgm-lcm-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--tgm-lcm-accent);
    color: var(--tgm-lcm-accent-text);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: var(--tgm-lcm-radius-sm);
}

.tgm-lcm-card-body {
    padding: 12px 14px 14px;
}

.tgm-lcm-card-title {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
}

.tgm-lcm-card-title a {
    color: var(--tgm-lcm-text);
    text-decoration: none;
}

.tgm-lcm-card-title a:hover {
    color: var(--tgm-lcm-accent);
}

.tgm-lcm-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--tgm-lcm-text-muted);
}

.tgm-lcm-star {
    color: var(--tgm-lcm-star-on);
}

.tgm-lcm-star-empty {
    color: var(--tgm-lcm-star-off);
}

.tgm-lcm-rating-count {
    color: var(--tgm-lcm-text-faint);
    font-size: 12px;
}

.tgm-lcm-rating-empty {
    color: var(--tgm-lcm-text-faint);
    font-size: 12px;
    font-style: italic;
}

.tgm-lcm-card-comments-icon {
    margin-right: 4px;
}

/* Load more */
.tgm-lcm-gallery-more {
    text-align: center;
    margin-top: 28px;
}

.tgm-lcm-load-more {
    background: var(--tgm-lcm-surface);
    color: var(--tgm-lcm-text);
    border: 1px solid var(--tgm-lcm-border-strong);
    border-radius: var(--tgm-lcm-radius);
    padding: 10px 24px;
    font-family: var(--tgm-lcm-font);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.tgm-lcm-load-more:hover:not(:disabled) {
    background: var(--tgm-lcm-accent);
    border-color: var(--tgm-lcm-accent);
    color: var(--tgm-lcm-accent-text);
}

.tgm-lcm-load-more:disabled {
    opacity: 0.6;
    cursor: progress;
}

/* Single-track template */
.tgm-lcm-single {
    background: var(--tgm-lcm-bg);
    color: var(--tgm-lcm-text);
    font-family: var(--tgm-lcm-font);
    padding: 40px 24px;
}

.tgm-lcm-single-track {
    max-width: 1100px;
    margin: 0 auto;
}

.tgm-lcm-single-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 32px;
}

@media (max-width: 720px) {
    .tgm-lcm-single-hero { grid-template-columns: 1fr; }
}

.tgm-lcm-single-artwork {
    position: relative;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    border-radius: var(--tgm-lcm-radius-lg);
    box-shadow: var(--tgm-lcm-shadow);
}

/* Single-track hero play button — same bare style, larger SVG. */
.tgm-lcm-single-play,
.tgm-lcm-single-play:hover,
.tgm-lcm-single-play:focus,
.tgm-lcm-single-play:active {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    color: inherit !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.tgm-lcm-single-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 96px;
    cursor: pointer !important;
    transition: transform 0.18s ease;
    line-height: 0 !important;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}

.tgm-lcm-single-play:focus-visible {
    outline: 2px solid var(--tgm-lcm-accent) !important;
    outline-offset: 6px !important;
}

.tgm-lcm-single-play:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.tgm-lcm-single-play .tgm-lcm-play-icon {
    display: block;
    width: 96px;
    height: 96px;
    background-image: url('../img/lcm-play-heart.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Brand play mark (heart + triangle) is a full-color SVG used as a
   background image on the card + hero play buttons. The button's
   drop-shadow filter follows the heart's transparency so it stays
   legible on light or dark artwork. The sticky transport bar keeps
   its own geometric play/pause icons (it toggles state). */

.tgm-lcm-single-title {
    margin: 0 0 12px;
    font-size: 36px;
    line-height: 1.15;
    color: var(--tgm-lcm-text);
}

.tgm-lcm-single-info {
    color: var(--tgm-lcm-text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.tgm-lcm-single-duration {
    font-family: var(--tgm-lcm-font-mono);
}

.tgm-lcm-single-badge {
    background: var(--tgm-lcm-accent);
    color: var(--tgm-lcm-accent-text);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: var(--tgm-lcm-radius-sm);
}

.tgm-lcm-single-genres a {
    color: var(--tgm-lcm-accent);
    text-decoration: none;
}

.tgm-lcm-single-genres a:hover {
    text-decoration: underline;
}

.tgm-lcm-single-rating {
    color: var(--tgm-lcm-text-muted);
    margin: 0;
}

.tgm-lcm-single-body {
    color: var(--tgm-lcm-text);
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 32px;
}

.tgm-lcm-single-body a {
    color: var(--tgm-lcm-accent);
}

/* ──────────────────────────────────────────
 * COMMENTS (Phase 3d)
 * Dark-themed comment list + form + upgrade gate. Sits at the
 * bottom of the single-track template.
 * ────────────────────────────────────────── */

.tgm-lcm-comments {
    max-width: 720px;
    margin: 48px auto 0;
    color: var(--tgm-lcm-text);
    font-family: var(--tgm-lcm-font);
}

.tgm-lcm-comments-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tgm-lcm-border);
}

.tgm-lcm-comments-title {
    margin: 0;
    font-size: 20px;
    color: var(--tgm-lcm-text);
}

.tgm-lcm-comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.tgm-lcm-comment-list .comment {
    background: var(--tgm-lcm-surface);
    border: 1px solid var(--tgm-lcm-border);
    border-radius: var(--tgm-lcm-radius);
    padding: 14px 18px;
    margin-bottom: 12px;
    list-style: none;
}

.tgm-lcm-comment-list .comment .comment-author {
    font-weight: 600;
    color: var(--tgm-lcm-text);
}

.tgm-lcm-comment-list .comment .comment-meta {
    color: var(--tgm-lcm-text-faint);
    font-size: 12px;
    margin-bottom: 6px;
}

.tgm-lcm-comment-list .comment .comment-content,
.tgm-lcm-comment-list .comment-body {
    color: var(--tgm-lcm-text);
    font-size: 14px;
    line-height: 1.55;
}

.tgm-lcm-comment-list .comment .reply {
    margin-top: 6px;
}

.tgm-lcm-comment-list .comment .reply a {
    color: var(--tgm-lcm-accent);
    text-decoration: none;
    font-size: 12px;
}

.tgm-lcm-comment-list .comment .children {
    list-style: none;
    margin: 10px 0 0;
    padding-left: 24px;
    border-left: 2px solid var(--tgm-lcm-border);
}

.tgm-lcm-comments-closed {
    color: var(--tgm-lcm-text-muted);
    font-style: italic;
    background: var(--tgm-lcm-surface);
    border: 1px solid var(--tgm-lcm-border);
    border-radius: var(--tgm-lcm-radius);
    padding: 14px 18px;
}

.tgm-lcm-comments-mod-notice {
    color: var(--tgm-lcm-text-muted);
    font-size: 13px;
    font-style: italic;
    margin-top: 8px;
}

/* Native WP comment form — re-theme to match dark surface */
.tgm-lcm-comments .comment-form {
    background: var(--tgm-lcm-surface);
    border: 1px solid var(--tgm-lcm-border-strong);
    border-radius: var(--tgm-lcm-radius);
    padding: 18px 20px;
}

.tgm-lcm-comments .comment-reply-title {
    margin: 0 0 14px;
    font-size: 18px;
    color: var(--tgm-lcm-text);
}

.tgm-lcm-comments .comment-form label {
    display: block;
    color: var(--tgm-lcm-text-muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.tgm-lcm-comments .comment-form input[type="text"],
.tgm-lcm-comments .comment-form input[type="email"],
.tgm-lcm-comments .comment-form input[type="url"],
.tgm-lcm-comments .comment-form textarea {
    width: 100%;
    background: var(--tgm-lcm-bg);
    border: 1px solid var(--tgm-lcm-border-strong);
    color: var(--tgm-lcm-text);
    border-radius: var(--tgm-lcm-radius-sm);
    padding: 8px 10px;
    font-family: var(--tgm-lcm-font);
    font-size: 14px;
}

.tgm-lcm-comments .comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.tgm-lcm-comments .comment-form input:focus,
.tgm-lcm-comments .comment-form textarea:focus {
    border-color: var(--tgm-lcm-accent);
    outline: none;
    box-shadow: 0 0 0 1px var(--tgm-lcm-accent);
}

.tgm-lcm-comments .comment-form .form-submit {
    margin-top: 12px;
}

.tgm-lcm-comments .comment-form .submit,
.tgm-lcm-comments .tgm-lcm-comment-submit {
    background: var(--tgm-lcm-accent);
    color: var(--tgm-lcm-accent-text);
    border: 0;
    border-radius: var(--tgm-lcm-radius-sm);
    padding: 10px 22px;
    font-family: var(--tgm-lcm-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tgm-lcm-comments .comment-form .submit:hover,
.tgm-lcm-comments .tgm-lcm-comment-submit:hover {
    background: var(--tgm-lcm-accent-hover);
}

/* Upgrade gate — shown when user can't post */
.tgm-lcm-comments-gate {
    background: var(--tgm-lcm-surface);
    border: 1px solid var(--tgm-lcm-border-strong);
    border-radius: var(--tgm-lcm-radius-lg);
    padding: 24px 28px;
    text-align: center;
}

.tgm-lcm-comments-gate-title {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--tgm-lcm-accent);
}

.tgm-lcm-comments-gate-body {
    margin: 0 0 16px;
    color: var(--tgm-lcm-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.tgm-lcm-comments-gate-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.tgm-lcm-comments-gate-cta {
    display: inline-block;
    background: var(--tgm-lcm-accent);
    color: var(--tgm-lcm-accent-text);
    text-decoration: none;
    padding: 10px 24px;
    border-radius: var(--tgm-lcm-radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s ease;
}

.tgm-lcm-comments-gate-cta:hover {
    background: var(--tgm-lcm-accent-hover);
    color: var(--tgm-lcm-accent-text);
}

.tgm-lcm-comments-gate-secondary {
    color: var(--tgm-lcm-text-muted);
    font-size: 13px;
    text-decoration: none;
}

.tgm-lcm-comments-gate-secondary:hover {
    color: var(--tgm-lcm-accent);
}
