/* ===================================================================
   Zemra Feed - moderner Card-Look
   =================================================================== */

.zemra-feed {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px;
}

/* ===== Avatare ===== */
.zemra-feed-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 42px;
    background: #f3f4f6;
}
.zemra-feed-avatar-sm { width: 28px; height: 28px; flex: 0 0 28px; }
.zemra-feed-avatar-empty {
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #9ca3af;
}

/* ===== Composer ===== */
.zemra-feed-composer {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.zemra-feed-composer-top { display: flex; gap: 10px; align-items: flex-start; }

.zemra-feed-composer textarea {
    flex: 1;
    border: none !important;
    resize: none;
    font-size: 15px;
    padding: 10px 0 !important;
    min-height: 44px;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    color: #1a1a1a;
}
.zemra-feed-composer textarea::placeholder { color: #9ca3af; }

.zemra-feed-composer-preview {
    position: relative;
    margin: 10px 0;
}
.zemra-feed-composer-preview img {
    max-width: 100%; max-height: 280px;
    border-radius: 12px;
}
.zemra-feed-preview-remove {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,0.65); color: #fff;
    border: none; border-radius: 50%;
    width: 28px; height: 28px;
    font-size: 18px; line-height: 1;
    cursor: pointer;
}

.zemra-feed-composer-actions {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px;
    border-top: 1px solid #f3f4f6;
    padding-top: 10px;
}

.zemra-feed-photo-btn {
    position: relative;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: #f3f4f6;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    overflow: hidden;
}
.zemra-feed-photo-btn:hover { background: #e5e7eb; }

.zemra-feed-file-input {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}

.zemra-feed-submit { padding: 8px 24px !important; border-radius: 20px !important; }

.zemra-feed-msg {
    display: none;
    margin-top: 10px; padding: 8px 12px;
    border-radius: 8px; font-size: 14px;
}
.zemra-feed-msg.success { background: #d1fae5; color: #065f46; }
.zemra-feed-msg.error { background: #fee2e2; color: #991b1b; }
.zemra-feed-msg.warn { background: #fef3c7; color: #92400e; }

/* ===== Posts ===== */
.zemra-post {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.zemra-post-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px;
}
.zemra-post-meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.zemra-post-author { font-weight: 700; font-size: 15px; color: #1a1a1a; }
.zemra-post-verified { color: #3b82f6; font-weight: 700; }
.zemra-post-time { font-size: 12px; color: #9ca3af; }

.zemra-post-delete {
    background: transparent; border: none;
    font-size: 14px; cursor: pointer;
    opacity: 0.4; padding: 4px;
}
.zemra-post-delete:hover { opacity: 1; }

.zemra-post-text {
    font-size: 15px; line-height: 1.5;
    color: #1f2937;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.zemra-post-image img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 12px;
    cursor: zoom-in;
    -webkit-user-select: none; user-select: none;
    -webkit-user-drag: none; -webkit-touch-callout: none;
}

/* Aktionen */
.zemra-post-actions {
    display: flex; gap: 8px;
    margin-top: 10px;
    border-top: 1px solid #f3f4f6;
    padding-top: 8px;
}

.zemra-post-like, .zemra-post-comment-toggle {
    background: transparent; border: none;
    cursor: pointer;
    font-size: 14px; font-weight: 600;
    color: #6b7280;
    padding: 6px 12px;
    border-radius: 16px;
    transition: background 0.15s;
}
.zemra-post-like:hover, .zemra-post-comment-toggle:hover { background: #f3f4f6; }
.zemra-post-like.is-liked { color: #ff4458; }

/* Kommentare */
.zemra-post-comments { margin-top: 10px; border-top: 1px solid #f3f4f6; padding-top: 10px; }

.zemra-post-comment {
    display: flex; gap: 8px;
    margin-bottom: 8px;
    align-items: flex-start;
}
.zemra-post-comment-body {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 14px;
    color: #1f2937;
    flex: 1;
    word-break: break-word;
}
.zemra-post-comment-body .zemra-post-time { margin-left: 6px; }

.zemra-post-comment-form {
    display: flex; gap: 8px;
    margin-top: 8px;
}
.zemra-post-comment-input {
    flex: 1;
    border: 1px solid #e5e7eb !important;
    border-radius: 20px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    min-height: auto !important;
    background: #fafafa !important;
}
.zemra-post-comment-send {
    background: #ff4458; color: #fff;
    border: none; border-radius: 50%;
    width: 36px; height: 36px;
    cursor: pointer; font-size: 15px;
    flex: 0 0 36px;
}

/* Sonstiges */
.zemra-feed-loading, .zemra-feed-empty {
    text-align: center;
    color: #9ca3af;
    padding: 32px 16px;
    background: #fff;
    border: 1px dashed #e5e7eb;
    border-radius: 16px;
}

.zemra-feed-more-wrap { text-align: center; margin: 8px 0 24px; }

@media (max-width: 768px) {
    .zemra-feed { padding: 8px; }
    .zemra-post, .zemra-feed-composer { padding: 12px; border-radius: 12px; }
    .zemra-post-image img { max-height: 360px; }
}
