/* GFunnel: link preview card and click-to-play video under a feed post
   (inc/gf_feed_links.inc.php). Look per the Product Designer's spec. */

/* ---- Link card ---- */
.gff-card { display: flex; align-items: stretch; gap: 12px; margin-top: 12px; padding: 12px; border: 1px solid #E5E7EB; border-radius: 8px; background: #F9FAFB; color: inherit; text-decoration: none; overflow: hidden; transition: background-color .15s, border-color .15s; }
.gff-card:hover { border-color: #D1D5DB; background: #F3F4F6; text-decoration: none; }
.gff-card-img { flex: 0 0 120px; width: 120px; height: 120px; border-radius: 6px; overflow: hidden; background: #E5E7EB; }
.gff-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gff-card-body { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; flex: 1 1 auto; }
.gff-card-site { font-size: 12px; font-weight: 500; color: #6B7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gff-card-title { font-size: 14px; font-weight: 600; line-height: 1.35; color: #1E3A8A; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.gff-card-desc { font-size: 13px; line-height: 1.45; color: #4B5563; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

@media (max-width: 480px) {
    .gff-card-img { flex-basis: 88px; width: 88px; height: 88px; }
}

/* ---- Video ---- */
.gff-video { margin-top: 12px; max-width: 640px; }
.gff-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.gff-video-frame.gff-video-dark { background: #111827; }
.gff-video-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; }
.gff-video-thumb { display: block; width: 100%; height: 100%; object-fit: cover; }
.gff-video-btn { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(0, 0, 0, .6); transition: background-color .15s; }
.gff-video-btn::after { content: ""; position: absolute; left: 22px; top: 17px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #FFF; }
.gff-video-play:hover .gff-video-btn,
.gff-video-play:focus-visible .gff-video-btn { background: #F97316; }
.gff-video-play:focus-visible { outline: 2px solid #F97316; outline-offset: -2px; }
.gff-video-name { position: absolute; left: 0; right: 0; top: calc(50% + 40px); text-align: center; font-size: 13px; font-weight: 600; color: #E5E7EB; }
.gff-video-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gff-video-cap { margin-top: 6px; font-size: 12px; color: #6B7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gff-video-cap a { color: #1E3A8A; text-decoration: none; }
.gff-video-cap a:hover { text-decoration: underline; }

/* ---- Dark mode ---- */
.dark .gff-card { border-color: #374151; background: #1F2937; }
.dark .gff-card:hover { border-color: #4B5563; background: #273244; }
.dark .gff-card-site,
.dark .gff-video-cap { color: #9CA3AF; }
.dark .gff-card-title,
.dark .gff-video-cap a { color: #93C5FD; }
.dark .gff-card-desc { color: #D1D5DB; }
