/* ═══════════════════════════════════════════════════
   Knoly.pl — wspólne style globalne
   ═══════════════════════════════════════════════════ */

/* ── Globals ─────────────────────────────────── */
body { background-color: #f8f9fa; color: #222; }
a { color: #1b4b72; }
.container { max-width: 980px; }

/* ── Navbar One-Click Login ───────────────────── */
.navbar-oneclick {
    display: flex;
    align-items: center;
    background: rgba(24, 119, 242, 0.18);
    border: 1px solid rgba(24, 119, 242, 0.55);
    border-radius: 26px;
    padding: 6px 14px 6px 6px;
    gap: 10px;
    transition: background 0.15s, border-color 0.15s;
    cursor: pointer;
    max-width: 260px;
    min-width: 190px;
}
.navbar-oneclick:hover {
    background: rgba(24, 119, 242, 0.38);
    border-color: #1877f2;
    text-decoration: none !important;
}
.navbar-oneclick-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.6);
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.navbar-oneclick-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.navbar-oneclick-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    overflow: hidden;
    flex: 1;
    gap: 1px;
}
.navbar-oneclick-label {
    font-size: 0.65rem;
    font-weight: 400;
    opacity: 0.78;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.navbar-oneclick-name {
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.navbar-oneclick-fb {
    flex-shrink: 0;
    opacity: 0.85;
    display: flex;
    align-items: center;
    margin-left: 2px;
}

/* ── Navbar FB badge (przy avatarze zalogowanego) ── */
.navbar-fb-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #1877f2;
    border-radius: 50%;
    border: 1.5px solid #343a40;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Topic HERO ───────────────────────────────── */
.topic-hero {
    background: linear-gradient(135deg, #eef4fb 0%, #f0f7f0 100%);
    border: 1px solid #d0dce8;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.topic-hero h1 { color: #111; margin: 0; font-size: 1.6rem; }
.topic-hero p.lead { color: #555; margin: 6px 0 0 0; }

/* ── Stats bar ────────────────────────────────── */
.stats-bar {
    background: #fff;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    gap: 0;
    align-items: center;
    border: 1px solid #dde3ea;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    flex-wrap: wrap;
}
.stats-item {
    flex: 1;
    text-align: center;
    padding: 6px 12px;
    border-right: 1px solid #eee;
    min-width: 80px;
}
.stats-item:last-of-type { border-right: none; }
.stats-item .num { font-weight: 700; font-size: 1.25rem; color: #1b6e3a; }
.stats-item .label { font-size: 0.8rem; color: #6c757d; text-transform: uppercase; letter-spacing: 0.04em; }
.stats-add { margin-left: auto; padding-left: 12px; }
.btn-add {
    border-radius: 8px;
    border: 1px solid #4b56a1;
    background: #fff;
    color: #4b56a1;
    padding: 6px 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.btn-add:hover { background: #4b56a1; color: #fff; }

/* ── Remedy cards ─────────────────────────────── */
.remedy-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.15s;
}
.remedy-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.09); }
.remedy-card h5 a { color: #1a202c; font-weight: 700; text-decoration: none; }
.remedy-card h5 a:hover { color: #1b4b72; text-decoration: underline; }
.card-footer { background: transparent; border-top: none; padding: 10px 0 0 0; }

/* ── Vote widget (pionowy słupek) ─────────────── */
.vote-col { width: 64px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.vertical-vote {
    width: 12px; height: 90px;
    background: #f1f5f0;
    border-radius: 8px;
    position: relative; overflow: hidden;
    border: 1px solid #d5e3d0;
}
.vertical-fill {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, #198754, #2ecc71);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
}
.vote-count-small { font-size: 0.9rem; color: #1b6e3a; font-weight: 600; }
.vote-not-small { font-size: 0.9rem; color: #b83b3b; font-weight: 600; }
.remedy-index { color: #9aa5b4; font-size: 0.9rem; font-weight: 600; }

/* ── Tags ─────────────────────────────────────── */
.remedy-tags .badge { background: #f0f7f0; color: #2f6b35; border: 1px solid #d4ead4; margin-right: 6px; }

/* ── Vote feed items ──────────────────────────── */
.vote-avatar-placeholder {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ── Vote type badges ─────────────────────────── */
.vote-type-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.75rem; font-weight: 600;
    padding: 2px 8px; border-radius: 12px;
}
.vote-type-badge.helped { background: #f0faf4; color: #1a6647; border: 1px solid #c3e6cb; }
.vote-type-badge.not-helped { background: #fdf2f2; color: #7a2c2c; border: 1px solid #f5c6cb; }

/* ── Action buttons ───────────────────────────── */
.vote-actions .btn { border-radius: 8px; font-size: 0.88rem; }
.btn-help {
    background: #fff7ed; color: #92400e;
    border: 1px solid #fcd34d;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-help:hover { background: #fef3c7; }
.btn-not {
    background: #fff1f2; color: #9f1239;
    border: 1px solid #fca5a5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-not:hover { background: #fee2e2; }

/* ── Comment section divider ──────────────────── */
.vote-comment-row {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}
.vote-comment-row:last-child { border-bottom: none; }

/* ── Helpers ──────────────────────────────────── */
.small-muted { color: #6c757d; }

/* ── Long comments (word-break) ───────────────── */
.vote-comment-text {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: 0.88rem;
    color: #374151;
}

/* ── Show more comments button (Stack Overflow style) ─── */
.show-more-comments {
    border-top: 1px solid #f0f0f0;
    padding-top: 6px;
    margin-top: 2px;
}
.show-comments-btn {
    color: #6c757d !important;
    font-size: 0.82rem;
    background: none;
    border: none;
    padding: 2px 0;
    cursor: pointer;
    transition: color 0.15s;
}
.show-comments-btn:hover {
    color: #1b4b72 !important;
}
.comments-section {
    border-top: 1px solid #f0f4f8;
    padding-top: 8px;
    margin-top: 8px;
}
/* Animacja pojawiania się komentarzy */
.comment-extra {
    animation: fadeIn 0.18s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
h6.text-uppercase {
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 6px;
    margin-bottom: 16px !important;
}

/* ── Strona główna — karty tematów ───────────── */
.topic-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.topic-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.09); }
.topic-card .topic-card-body {
    padding: 16px 16px 10px 16px;
    flex: 1;
}
.topic-card .topic-card-footer {
    padding: 8px 16px 12px 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
}
.topic-card h5 a { color: #1a202c; font-weight: 700; text-decoration: none; }
.topic-card h5 a:hover { color: #1b4b72; text-decoration: underline; }
.topic-card .topic-desc { color: #555; font-size: 0.88rem; margin: 6px 0 0 0; line-height: 1.45; }
.topic-card-active { border-left: 3px solid #f59e0b; }

/* ── Zakładki kategorii (sticky w widoku tematu) ─────── */
.topic-category-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 6px 0 8px;
    background: #f8f9fa;
    border-bottom: 2px solid #e2e8f0;
    scrollbar-width: thin;
}
.topic-category-tabs::-webkit-scrollbar { height: 4px; }
.topic-category-tabs::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

.category-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #4b5563;
    background: #fff;
    border: 1px solid #d1d5db;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    cursor: pointer;
}
.category-tab:hover {
    background: #e0e7ff;
    border-color: #6366f1;
    color: #4338ca;
    text-decoration: none;
}
.category-tab.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}
.tab-count {
    font-size: 0.75rem;
    opacity: 0.75;
}
.category-tabs-wrapper {
    margin-bottom: 16px;
}

/* ── Badge kategorii na kartach porad ───────────────── */
.remedy-category-badge {
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 2px 8px;
    border: 1px solid #c7d2fe;
}
.remedy-category-badge-other {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 12px;
    padding: 2px 8px;
    border: 1px solid #e2e8f0;
}


