/* ─────────────────────────────────────────────────────────────────────────────
   ngoma Link Preview Cards
   Covers: video (YouTube/TikTok/Vimeo/Dailymotion), Twitter, Spotify, generic
───────────────────────────────────────────────────────────────────────────── */

/* ── Shared wrapper ────────────────────────────────────────────────────────── */

.lp-video,
.lp-spotify,
.lp-card {
    display: block;
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #222;
    background: #111;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
    max-width: 100%;
}

.lp-video:hover,
.lp-card:hover {
    border-color: #333;
}

/* ── Video card ────────────────────────────────────────────────────────────── */

.lp-video-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a0a0a center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    opacity: 0.92;
    transition: transform 0.15s, opacity 0.15s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.lp-video:hover .lp-play-btn {
    transform: scale(1.08);
    opacity: 1;
}

.lp-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Nunito Sans', sans-serif;
}

.lp-video-meta {
    padding: 10px 12px;
}

.lp-platform-tag {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.lp-video-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f0f0f0;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.lp-video-author {
    font-size: 0.75rem;
    color: #666;
    margin-top: 3px;
}

/* Expanded embed */
.lp-embed-wrap {
    width: 100%;
    background: #000;
}

.lp-embed-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.lp-embed-inner iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* TikTok is portrait */
.lp-video.tiktok .lp-video-thumb {
    aspect-ratio: 9 / 16;
    max-height: 420px;
}

.lp-video.tiktok .lp-embed-inner {
    aspect-ratio: 9 / 16;
    max-height: 740px;
}
/* Ensure the wrapper doesn't inherit card padding */
.native-feed-video {
    width: 100%;
    margin: 12px 0;
    clear: both;
    display: block;
}

/* Remove any potential flex-box interference from parent containers */
.link-preview-container:has(.native-feed-video) {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Optional: Add a slight shadow to make it pop like the screenshot */
.native-feed-video iframe {
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
/* Kill the "Card" background and border when showing a native video */
.native-feed-video {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

/* Ensure the iframe fills the padding-bottom container exactly */
.native-feed-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Fix for mobile feed constraints */
@media (max-width: 480px) {
    .native-feed-video {
        max-width: 100% !important; /* Allow shorts to fill width on small screens */
    }
}
/* ── Spotify ───────────────────────────────────────────────────────────────── */

.lp-spotify {
    background: #111;
    padding: 0;
}

.lp-spotify-embed iframe {
    display: block;
    border-radius: 12px;
    width: 100%;
    border: none;
}

.lp-spotify-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
}

.lp-spotify-art {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #222 center/cover no-repeat;
    flex-shrink: 0;
}

.lp-spotify-info {
    flex: 1;
    min-width: 0;
}

.lp-spotify-icon {
    color: #1db954;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ── Generic link card ─────────────────────────────────────────────────────── */

.lp-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-height: none;
}

.lp-card-image {
    width: 100%;
    display: block;
    height: auto;
    border-radius: 10px 10px 0 0;
}

.lp-card-body {
    padding: 10px 12px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border-top: 1px solid #222;
}

.lp-card-site {
    font-size: 0.7rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
}

.lp-favicon {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    flex-shrink: 0;
}

.lp-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f0f0f0;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.lp-card-desc {
    font-size: 0.75rem;
    color: #666;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Card without image — full width body */
.lp-card:not(:has(.lp-card-image)) .lp-card-body {
    padding: 12px 14px;
}
