/* Tirpitz LinkedIn Feed – Frontend Styles
   Accent color injected via --tlf-accent CSS custom property per instance */

:root {
    --tlf-accent: #0A66C2;
    --tlf-radius: 8px;
    --tlf-shadow: 0 1px 4px rgba(0,0,0,.08), 0 2px 12px rgba(0,0,0,.06);
    --tlf-border: #e0e0e0;
    --tlf-text:   #1d2226;
    --tlf-muted:  #666;
    --tlf-bg:     #fff;
}

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.tlf-feed {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--tlf-text);
    line-height: 1.5;
    max-width: 100%;
}

.tlf-feed-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: .75rem;
    color: var(--tlf-text);
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.tlf-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--tlf-accent);
}

.tlf-header svg {
    flex-shrink: 0;
}

.tlf-header-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--tlf-accent);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Grid – Card style ───────────────────────────────────────────────────── */
.tlf-style-card .tlf-posts {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

.tlf-cols-2 .tlf-posts {
    grid-template-columns: repeat(2, 1fr);
}

.tlf-cols-3 .tlf-posts {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 640px) {
    .tlf-cols-2 .tlf-posts,
    .tlf-cols-3 .tlf-posts {
        grid-template-columns: 1fr;
    }
}

/* ── List style ──────────────────────────────────────────────────────────── */
.tlf-style-list .tlf-posts {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tlf-style-list .tlf-post {
    border-bottom: 1px solid var(--tlf-border);
    padding: 1rem 0;
    border-radius: 0;
    box-shadow: none;
    flex-direction: row;
    gap: 1rem;
}

.tlf-style-list .tlf-post:first-child {
    padding-top: 0;
}

.tlf-style-list .tlf-post-image {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: var(--tlf-radius);
    overflow: hidden;
}

.tlf-style-list .tlf-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Article card ────────────────────────────────────────────────────────── */
.tlf-post {
    background: var(--tlf-bg);
    border: 1px solid var(--tlf-border);
    border-radius: var(--tlf-radius);
    box-shadow: var(--tlf-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.tlf-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

/* ── Post image ──────────────────────────────────────────────────────────── */
.tlf-post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

.tlf-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Post body ───────────────────────────────────────────────────────────── */
.tlf-post-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: .5rem;
}

/* ── Date ────────────────────────────────────────────────────────────────── */
.tlf-post-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .75rem;
    color: var(--tlf-muted);
}

/* ── Title ───────────────────────────────────────────────────────────────── */
.tlf-post-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.tlf-post-title a {
    color: var(--tlf-text);
    text-decoration: none;
}

.tlf-post-title a:hover {
    color: var(--tlf-accent);
    text-decoration: underline;
}

/* ── Excerpt ─────────────────────────────────────────────────────────────── */
.tlf-post-excerpt {
    font-size: .875rem;
    color: var(--tlf-muted);
    margin: 0;
    flex: 1;
}

/* ── Read more ───────────────────────────────────────────────────────────── */
.tlf-post-link {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--tlf-accent);
    text-decoration: none;
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px solid var(--tlf-border);
}

.tlf-post-link:hover {
    text-decoration: underline;
}

/* ── Footer CTA ──────────────────────────────────────────────────────────── */
.tlf-footer {
    margin-top: 1.25rem;
    text-align: center;
}

.tlf-linkedin-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tlf-accent);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    padding: .55rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    transition: opacity .15s ease;
}

.tlf-linkedin-cta:hover {
    opacity: .88;
    color: #fff;
}

/* ── Empty / Error ───────────────────────────────────────────────────────── */
.tlf-empty {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem;
    background: #f9f9f9;
    border: 1px dashed var(--tlf-border);
    border-radius: var(--tlf-radius);
    color: var(--tlf-muted);
    font-size: .9rem;
}

.tlf-empty a {
    color: var(--tlf-accent);
}

/* ── Dark mode ───────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    :root {
        --tlf-border: #333;
        --tlf-text:   #e0e0e0;
        --tlf-muted:  #999;
        --tlf-bg:     #1c1c1c;
    }
    .tlf-post {
        box-shadow: 0 1px 4px rgba(0,0,0,.4);
    }
}
