@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.post-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 24px;
    max-width: 1280px;
    width: 100%;
    margin: 24px auto;
    padding: 0 15px;
    align-items: start;
}

/* Sidebar shared styles */
.post-sidebar-left,
.post-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 80px;
}

.sidebar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sidebar-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Left Sidebar - Profile */
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.profile-avatar-lg {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6A2F85, #E5097F);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.profile-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.profile-handle {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.sidebar-stats {
    display: flex;
    justify-content: space-between;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Left Sidebar - Tags */
.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.tag:hover {
    background: #e2e8f0;
}

/* Center Feed */
.post-feed-center {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Composer */
.post-composer-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.composer-top {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #6A2F85;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.composer-input-wrap {
    flex: 1;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.composer-input-wrap:hover {
    background: #e2e8f0;
}

.composer-placeholder {
    color: #64748b;
    font-size: 15px;
}

.composer-simple-actions {
    display: flex;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    gap: 16px;
    justify-content: space-around;
}

.simple-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.simple-action-btn:hover {
    background: #f1f5f9;
}

.composer-expanded {
    margin-top: 10px;
}

.composer-textarea-full {
    min-height: 80px;
    outline: none;
    font-size: 16px;
    line-height: 1.5;
    color: #0f172a;
    margin-bottom: 16px;
}

.composer-textarea-full:empty:before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
    display: block; /* For Firefox */
}

.image-preview-area {
    position: relative;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.preview-img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

.remove-img-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.composer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.toolbar-btn:hover {
    background: #f1f5f9;
}

.post-submit-btn {
    background: #6A2F85;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.feeling-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.feeling-opt {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
}

.feeling-opt:hover {
    background: #f1f5f9;
}

/* Post Cards */
.post-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.post-header {
    display: flex;
    padding: 16px;
    align-items: center;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-right: 12px;
}

.post-header-info {
    flex: 1;
}

.post-author-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 15px;
}

.post-feeling {
    color: #64748b;
    font-weight: 400;
}

.post-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.post-options-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
}

.post-content {
    padding: 0 16px 16px;
    font-size: 15px;
    color: #1e293b;
    line-height: 1.5;
}

.post-image-wrap {
    width: 100%;
    max-height: 500px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-stats {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
}

.stat-likes {
    display: flex;
    align-items: center;
    gap: 6px;
}

.like-icon-circle {
    background: #3b82f6;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.stat-right {
    display: flex;
    gap: 12px;
}

.post-actions {
    display: flex;
    padding: 4px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 10px 0;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.action-btn:hover {
    background: #f1f5f9;
}

.action-btn.liked {
    color: #6A2F85;
}

.post-comments-section {
    padding: 16px;
    background: #f8fafc;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-item {
    display: flex;
    gap: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #cbd5e1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.comment-body {
    flex: 1;
}

.comment-bubble {
    background: #e2e8f0;
    padding: 10px 14px;
    border-radius: 16px;
    border-top-left-radius: 4px;
    display: inline-block;
}

.comment-author {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.comment-text {
    font-size: 14px;
    color: #1e293b;
}

.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    margin-left: 8px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.comment-action-btn:hover {
    text-decoration: underline;
}

.comment-time {
    font-size: 12px;
    color: #94a3b8;
}

.comment-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.comment-input-box {
    flex: 1;
    display: flex;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 4px 12px;
    align-items: center;
}

.comment-input-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 0;
    font-family: inherit;
    font-size: 14px;
}

.comment-post-icon {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 16px;
    cursor: pointer;
}

/* Right Sidebar */
.friends-list, .groups-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.friend-item:hover {
    background: #f1f5f9;
}

.friend-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.friend-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
}

.group-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

.group-item:hover {
    background: #f1f5f9;
}

.group-icon {
    font-size: 24px;
    background: #f1f5f9;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.group-members {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 992px) {
    .post-layout {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    .post-sidebar-left, .post-sidebar-right {
        display: none; /* Hide sidebars on mobile */
    }
}