/* community-karma-feed.css — Karma Fas 7A */

/* ── Feed container ────────────────────────────────────────── */
.cf-feed-section {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.cf-feed-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.cf-feed-toolbar input,
.cf-feed-toolbar select {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: white;
    padding: 6px 10px;
    font-size: 0.85em;
}

.cf-new-post-btn {
    margin-left: auto;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: opacity 0.2s;
}
.cf-new-post-btn:hover { opacity: 0.85; }

/* ── Post cards ────────────────────────────────────────────── */
.cf-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.cf-card:hover { border-color: rgba(255,255,255,0.25); }

.cf-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.cf-type-badge {
    background: rgba(102,126,234,0.25);
    color: #a5b4fc;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.cf-ticker {
    background: rgba(52,211,153,0.2);
    color: #34d399;
    font-size: 0.78em;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}

.cf-meta {
    color: rgba(255,255,255,0.4);
    font-size: 0.78em;
    margin-left: auto;
}

.cf-card-title {
    color: white;
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 6px;
}

.cf-card-body {
    color: rgba(255,255,255,0.7);
    font-size: 0.85em;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.cf-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    position: relative; /* Needed for karma-pop positioning */
}

/* ── Upvote button ─────────────────────────────────────────── */
.cf-upvote-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: white;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cf-upvote-btn:hover:not([disabled]) {
    background: rgba(251,191,36,0.2);
    border-color: #fbbf24;
    transform: scale(1.05);
}
.cf-upvote-btn.cf-voted {
    background: rgba(251,191,36,0.15);
    border-color: rgba(251,191,36,0.4);
    color: #fbbf24;
}

.cf-upvote-hint {
    color: rgba(255,255,255,0.35);
    font-size: 0.75em;
}

/* ── Karma pop animation ───────────────────────────────────── */
.cf-karma-pop {
    position: absolute;
    color: #fbbf24;
    font-size: 0.85em;
    font-weight: 700;
    pointer-events: none;
    animation: cfKarmaPop 1.2s ease-out forwards;
}
@keyframes cfKarmaPop {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-30px); }
}

/* ── States ────────────────────────────────────────────────── */
.cf-loading, .cf-empty {
    text-align: center;
    color: rgba(255,255,255,0.4);
    padding: 30px;
    font-size: 0.9em;
}

/* ── Modal ─────────────────────────────────────────────────── */
#cfPostModal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }

.cf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

.cf-modal {
    position: relative;
    background: #1a1f35;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    width: min(480px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.cf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.cf-modal-header h3 { color: white; margin: 0; font-size: 1em; }
.cf-modal-close { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 1.1em; }
.cf-modal-close:hover { color: white; }

.cf-form-row { margin-bottom: 12px; }
.cf-form-row label { display: block; color: rgba(255,255,255,0.6); font-size: 0.8em; margin-bottom: 4px; }
.cf-form-row input,
.cf-form-row select,
.cf-form-row textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: white;
    padding: 8px 10px;
    font-size: 0.88em;
    font-family: inherit;
    resize: vertical;
}
.cf-form-row input::placeholder,
.cf-form-row textarea::placeholder { color: rgba(255,255,255,0.3); }

.cf-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}
.cf-cancel-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
}
.cf-submit-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.cf-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
