/* =========================================================
   WP Twitter Feed — feed.css
   A clean, Twitter-inspired card feed
   ========================================================= */

/* ── Feed container ─────────────────────────────── */
.wtf-feed {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Card ───────────────────────────────────────── */
.wtf-card {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 16px;
    padding: 18px 20px 14px;
    margin-bottom: 14px;
    transition: box-shadow .18s ease;
}
.wtf-card:hover {
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
}

/* ── Header ─────────────────────────────────────── */
.wtf-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.wtf-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e8e8e8;
}
.wtf-author-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wtf-author-name {
    font-weight: 700;
    font-size: 15px;
    color: #0f1419;
    line-height: 1.2;
}
.wtf-date {
    font-size: 13px;
    color: #657786;
}

/* ── Content ────────────────────────────────────── */
.wtf-content {
    font-size: 15px;
    line-height: 1.65;
    color: #14171a;
    margin-bottom: 12px;
    word-break: break-word;
    white-space: pre-line;
}
.wtf-expand-btn {
    background: none;
    border: none;
    color: #1d9bf0;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 0;
    display: block;
    margin-top: 4px;
}
.wtf-expand-btn:hover { text-decoration: underline; }

/* ── Images ─────────────────────────────────────── */
.wtf-images {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
}
.wtf-images--single { grid-template-columns: 1fr; }
.wtf-images--grid   { grid-template-columns: repeat(2, 1fr); }
/* 3 images: span first to full width */
.wtf-images--grid .wtf-img-wrap:first-child:nth-last-child(3) {
    grid-column: 1 / -1;
}

.wtf-img-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: zoom-in;
    background: #f0f0f0;
}
.wtf-images--single .wtf-img-wrap {
    aspect-ratio: 16 / 9;
}
.wtf-img-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .22s ease;
}
.wtf-img-wrap:hover .wtf-img-thumb { transform: scale(1.04); }

/* ── Lightbox ───────────────────────────────────── */
.wtf-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.wtf-lightbox.is-open { display: flex; }
.wtf-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 8px;
    object-fit: contain;
}
.wtf-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wtf-lightbox-close:hover { background: rgba(255,255,255,.2); }

/* ── Location ───────────────────────────────────── */
.wtf-location-row { margin-bottom: 10px; }
.wtf-location-btn {
    background: none;
    border: 1px solid #d3e5f3;
    border-radius: 20px;
    color: #1d9bf0;
    font-size: 13px;
    padding: 4px 12px 4px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .15s;
}
.wtf-location-btn:hover { background: #e8f5fe; }
.wtf-location-btn.is-active { background: #e8f5fe; font-weight: 600; }

.wtf-map-container {
    margin-top: 8px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    height: 260px;
    background: #f5f5f5;
}
.wtf-map-container iframe,
.wtf-map-container > div {
    width: 100%;
    height: 100%;
    border: none;
}
/* Fallback link */
.wtf-map-fallback {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #555;
}
.wtf-map-fallback a {
    color: #1d9bf0;
    text-decoration: none;
    font-weight: 600;
}

/* ── Actions / Likes ────────────────────────────── */
.wtf-actions {
    display: flex;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    margin-top: 4px;
}
.wtf-like-btn {
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #657786;
    font-size: 14px;
    cursor: pointer;
    border-radius: 20px;
    padding: 6px 10px;
    transition: color .15s, background .15s;
}
.wtf-like-btn:hover {
    color: #e0245e;
    background: rgba(224,36,94,.07);
}
.wtf-like-btn.is-liked {
    color: #e0245e;
}
.wtf-like-btn.is-liked .wtf-heart {
    fill: #e0245e;
    stroke: #e0245e;
}
.wtf-heart {
    transition: fill .15s, stroke .15s, transform .2s;
    flex-shrink: 0;
}
.wtf-like-btn.is-liked .wtf-heart {
    animation: wtf-pop .22s ease;
}
@keyframes wtf-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* ── Dark mode support ──────────────────────────── */
@media (prefers-color-scheme: dark) {
    .wtf-card        { background: #15202b; border-color: #2a3b4c; }
    .wtf-author-name { color: #fff; }
    .wtf-date        { color: #8899a6; }
    .wtf-content     { color: #d9d9d9; }
    .wtf-actions     { border-top-color: #2a3b4c; }
    .wtf-like-btn    { color: #8899a6; }
    .wtf-location-btn { border-color: #2a3b4c; }
}
