/* ═══════════════════════════════════════════════════════════════════════
   DAIKOKU USA — Post card styles
   Shared across feed.html, profile.html, and the repost modal.
   Paired with js/lib/post-card.js which renders the markup.
   Supporting classes for YouTube embeds (.post-yt-*), link previews
   (.post-link-preview), and check-in cards (.post-checkin-*) live in
   components.css.
   ═══════════════════════════════════════════════════════════════════════ */

.post-card {
    background: rgba(6, 4, 20, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    transition: border-color 0.25s;
    overflow: hidden;
}
.post-card:hover { border-color: rgba(255, 255, 255, 0.1); }

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem 0.6rem;
}
.post-avatar-link { text-decoration: none; flex-shrink: 0; }
.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: white;
    transition: transform 0.2s;
}
.post-avatar-link:hover .post-avatar { transform: scale(1.08); }

.post-author { flex: 1; min-width: 0; }
.post-author-top {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.post-display-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: white;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.post-display-name:hover { color: var(--neon-cyan); }

.post-verified {
    font-size: 0.6rem;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.25);
    padding: 0.05rem 0.35rem;
    border-radius: 2px;
    letter-spacing: 1px;
}
.post-timestamp {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    margin-left: auto;
    white-space: nowrap;
}
.post-handle {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    display: block;
    transition: color 0.2s;
}
.post-handle:hover { color: var(--neon-cyan); }

.post-body {
    padding: 0 1.25rem;
    cursor: pointer;
}
.post-text {
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
    white-space: pre-line;
    margin-bottom: 0.75rem;
}
.post-hashtag { color: var(--neon-cyan); }
.post-mention { color: var(--neon-pink); }
.post-mention.verified { color: #FFD700; }

/* Media grid — 1/2/3 tile variants + hidden siblings for 4+ */
.post-media-grid {
    display: grid;
    gap: 2px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.post-media-grid.count-1 .post-media-item { aspect-ratio: 16 / 9; }
@media (min-width: 769px) {
    .post-media-grid.count-1 .post-media-item { aspect-ratio: 16 / 9 !important; }
}
.post-media-grid.count-2 { grid-template-columns: 1fr 1fr; }
.post-media-grid.count-2 .post-media-item { aspect-ratio: 4 / 3; }
.post-media-grid.count-3 { grid-template-columns: 1fr 1fr; }
.post-media-grid.count-3 .post-media-item:first-child { grid-row: span 2; aspect-ratio: auto; min-height: 200px; }
.post-media-grid.count-3 .post-media-item:not(:first-child) { aspect-ratio: 16 / 9; }

/* Scoped override: overflow tiles (items 4+) live in the grid with [hidden]
   but must stay out of layout while DK.wireMediaLightbox still enumerates
   them for gallery navigation. Scoped to post-media-item so we don't bump
   every site-wide [hidden] element to !important. */
.post-media-item[hidden] { display: none !important; }

.post-media-item.has-more::after {
    content: '+' attr(data-overflow);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-family: var(--font-display, 'Orbitron', sans-serif);
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 2;
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}
.post-media-item {
    position: relative;
    overflow: hidden;
    background: #02010a;
    cursor: pointer;
    transition: opacity 0.2s;
}
.post-media-item:hover { opacity: 0.88; }
.post-media-bg { position: absolute; inset: 0; }

/* Minimal corner badge — only on video tiles, tells the viewer it's playable
   without the heavy centered overlay + bottom label we used to render. */
.post-video-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 1;
}

/* Tags + category */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}
.post-tag {
    font-size: 0.62rem;
    color: rgba(0, 229, 255, 0.6);
    letter-spacing: 1px;
    cursor: pointer;
    transition: color 0.2s;
}
.post-tag:hover { color: var(--neon-cyan); }

.post-category-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.52rem;
    font-family: var(--font-display, 'Orbitron', sans-serif);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 0, 204, 0.8);
    background: rgba(255, 0, 204, 0.06);
    border: 1px solid rgba(255, 0, 204, 0.2);
    border-radius: 3px;
    padding: 0.15rem 0.5rem;
    margin-bottom: 0.4rem;
}

/* Vendor tag chips — up to 3 per post, deep-link to /v/{slug} */
.post-vendor-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.5rem 0 0.65rem;
}
.post-vendor-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    background: rgba(255, 200, 0, 0.05);
    border: 1px solid rgba(255, 200, 0, 0.22);
    color: #ffd84a;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    max-width: 200px;
    transition: background 0.15s, border-color 0.15s;
}
.post-vendor-chip:hover {
    background: rgba(255, 200, 0, 0.1);
    border-color: rgba(255, 200, 0, 0.4);
}
.post-vendor-chip .pvc-icon { font-size: 0.8rem; line-height: 1; }
.post-vendor-chip .pvc-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* Event tag chip — deep-links to /e/{slug}?tab=media */
.post-event-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    margin: 0.5rem 0 0.65rem;
    border-radius: 4px;
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.22);
    color: var(--neon-cyan);
    font-size: 0.72rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    max-width: 100%;
    transition: background 0.15s, border-color 0.15s;
}
.post-event-chip:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.4);
}
.post-event-chip .pec-flag { font-size: 0.8rem; line-height: 1; }
.post-event-chip .pec-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

/* Track tag chip — deep-links to /track-detail.html?id={slug}.
   Purple accent so the eye distinguishes track / event / vendor chips. */
.post-track-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    margin: 0.5rem 0 0.65rem;
    border-radius: 4px;
    background: rgba(157, 0, 255, 0.06);
    border: 1px solid rgba(157, 0, 255, 0.28);
    color: #c080ff;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    max-width: 100%;
    transition: background 0.15s, border-color 0.15s;
}
.post-track-chip:hover {
    background: rgba(157, 0, 255, 0.12);
    border-color: rgba(157, 0, 255, 0.5);
}
.post-track-chip .ptc-icon { font-size: 0.8rem; line-height: 1; }
.post-track-chip .ptc-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

/* Engagement footer */
.post-footer {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.6rem 1.1rem 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.post-action {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}
.post-action:hover { color: var(--neon-cyan); background: rgba(0, 229, 255, 0.07); }
.post-action.liked { color: var(--neon-pink); }
.post-action.liked:hover { color: var(--neon-pink); background: rgba(255, 0, 204, 0.07); }
.post-action.reposted { color: #00ff88; }
.post-action-save { margin-left: auto; }
.post-action-save.saved { color: var(--neon-gold); }
.post-action-edit  { color: rgba(255,255,255,0.35); }
.post-action-edit:hover { color: var(--neon-cyan); }
.post-action-delete { color: rgba(255,255,255,0.35); }
.post-action-delete:hover { color: #ff4444; }

/* Repost banner + quote card */
.post-repost-banner {
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    color: #00ff88;
    padding: 0.5rem 1.25rem 0;
    opacity: 0.75;
}
.post-quote-card {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.7rem 0.85rem;
    margin-top: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}
.post-quote-card:hover { border-color: rgba(0, 229, 255, 0.3); }
.post-quote-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}
.post-quote-avatar {
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 0.58rem;
    display: flex; align-items: center; justify-content: center;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}
.post-quote-name { font-size: 0.72rem; font-weight: 600; color: white; }
.post-quote-handle { font-size: 0.67rem; color: rgba(255, 255, 255, 0.38); margin-left: 0.15rem; }
.post-quote-text {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-quote-card .post-media-grid { margin-top: 0.5rem; margin-bottom: 0; }

/* Comment preview below the footer */
.post-comments-preview {
    padding: 0.5rem 0.85rem 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.post-comment-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.78rem;
    line-height: 1.4;
    cursor: pointer;
}
.post-comment-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(0,229,255,0.1) center/cover no-repeat;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.52rem;
    font-weight: 700;
    color: var(--neon-cyan);
    border: 1px solid rgba(0,229,255,0.15);
}
.post-comment-body { min-width: 0; }
.post-comment-author { font-weight: 700; color: rgba(255,255,255,0.75); margin-right: 0.3rem; }
.post-comment-text {
    color: rgba(255,255,255,0.48);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.post-comments-view-all {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.28);
    cursor: pointer;
    padding-top: 0.1rem;
    transition: color 0.15s;
}
.post-comments-view-all:hover { color: rgba(255,255,255,0.5); }

/* Responsive — matches feed.html's 600px breakpoint */
@media (max-width: 600px) {
    .post-card { padding: 1rem; }
}
