/* GridStream User Posts Module Styles */
.gridstream-userposts {
    background: linear-gradient(135deg, #1a0a0f 0%, #2a1520 100%);
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #e63946, #ff8a24) 1;
    border-radius: 20px 0 20px 0;
    padding: 15px;
    position: relative;
    overflow: hidden;
}

/* Scanline effect */
.gridstream-userposts::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(230, 57, 70, 0.03) 0px,
        transparent 1px,
        transparent 2px,
        rgba(230, 57, 70, 0.03) 3px
    );
    pointer-events: none;
    z-index: 1;
}

.gridstream-userposts > * {
    position: relative;
    z-index: 2;
}

/* Header */
.userposts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(230, 57, 70, 0.3);
}

.userposts-title {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #e63946;
    text-shadow: 0 0 10px rgba(230, 57, 70, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.title-icon {
    font-size: 20px;
}

.posts-count {
    background: rgba(230, 57, 70, 0.2);
    border: 2px solid #e63946;
    border-radius: 10px;
    padding: 2px 10px;
    font-size: 14px;
    min-width: 30px;
    text-align: center;
}

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 10px 0 10px 0;
    padding: 12px;
    display: flex;
    gap: 10px;
    transition: all 0.3s ease;
}

.post-item:hover {
    border-color: #e63946;
    background: rgba(230, 57, 70, 0.05);
    transform: translateX(3px);
}

/* Avatar */
.post-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 10px 0 10px 0;
    border: 2px solid #e63946;
    object-fit: cover;
}

/* Post Content */
.post-content {
    flex: 1;
    min-width: 0;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    gap: 10px;
    flex-wrap: wrap;
}

.post-author {
    font-weight: bold;
    color: #ff8a24;
    font-size: 14px;
}

.post-date {
    font-size: 11px;
    color: #999;
}

.post-body {
    color: #ddd;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 6px;
    border-top: 1px solid rgba(230, 57, 70, 0.1);
}

.comment-count {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 30px 15px;
    color: #999;
    font-size: 14px;
}

.no-posts p {
    margin: 0;
}

/* Comment Composer */
.comment-composer {
    margin-top: 10px;
    padding: 10px;
    background: rgba(230, 57, 70, 0.05);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 8px;
}

.composer-npc-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.composer-npc-selector label {
    color: #ff8a24;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.npc-icon {
    font-size: 14px;
}

.npc-select {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #e63946;
    border-radius: 5px;
    color: #ddd;
    padding: 4px 8px;
    font-size: 12px;
}

.npc-select:focus {
    outline: none;
    border-color: #ff8a24;
    box-shadow: 0 0 5px rgba(255, 138, 36, 0.3);
}

.comment-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 6px;
    color: #ddd;
    padding: 8px;
    font-size: 13px;
    line-height: 1.4;
    resize: vertical;
    font-family: inherit;
}

.comment-textarea:focus {
    outline: none;
    border-color: #e63946;
    background: rgba(230, 57, 70, 0.05);
}

.comment-textarea::placeholder {
    color: #666;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.comment-cancel-btn,
.comment-submit-btn {
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.comment-cancel-btn {
    background: transparent;
    border-color: #666;
    color: #999;
}

.comment-cancel-btn:hover {
    border-color: #999;
    color: #ddd;
}

.comment-submit-btn {
    background: linear-gradient(135deg, #e63946, #ff8a24);
    border-color: #e63946;
    color: #fff;
}

.comment-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(230, 57, 70, 0.4);
}

.comment-toggle-btn {
    width: 100%;
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 6px;
    color: #e63946;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-toggle-btn:hover {
    background: rgba(230, 57, 70, 0.2);
    border-color: #e63946;
}

.comment-toggle-btn.active {
    background: rgba(230, 57, 70, 0.2);
    border-color: #e63946;
    color: #ff8a24;
}

/* Reactions Display */
.post-reactions-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    padding-top: 10px;
    border-top: 1px solid rgba(230, 57, 70, 0.15);
}

.reaction-count {
    padding: 4px 10px;
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
}

/* Action Buttons */
.post-action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.action-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(230, 57, 70, 0.15);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 10px 0 10px 0;
    color: #e63946;
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.action-btn:hover {
    background: rgba(230, 57, 70, 0.3);
    border-color: #e63946;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.4);
    transform: translateY(-1px);
}

/* Reaction Picker */
.reaction-picker {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    margin-top: 10px;
    justify-content: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reaction-btn {
    width: 40px;
    height: 40px;
    background: rgba(230, 57, 70, 0.2);
    border: 1px solid #e63946;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-btn:hover {
    background: rgba(230, 57, 70, 0.4);
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.6);
}

/* ================================================
   Comments Styling (matches feed module)
   ================================================ */

/* Comments Container */
.post-comments {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(6, 255, 165, 0.2);
}

/* Individual Comments */
.comment {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid #06ffa5;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
    position: relative;
}

.comment-avatar {
    flex-shrink: 0;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 2px solid #e63946 !important;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.5),
                inset 0 0 6px rgba(230, 57, 70, 0.3) !important;
    overflow: hidden !important;
    background: #000;
}

.comment-avatar img {
    width: 100% !important;
    height: 100% !important;
    max-width: 36px !important;
    max-height: 36px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 50% !important;
}

.comment-content-wrapper {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.comment-author {
    font-weight: 600;
    color: #06ffa5;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comment-author::before {
    content: '▸';
    margin-right: 5px;
    color: #e63946;
}

.comment-time {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

.comment-body {
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
    word-wrap: break-word;
}

/* Admin Tag */
.admin-tag {
    display: inline-block;
    background: linear-gradient(135deg, #e63946, #ff8a24);
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Clickable Comment Links */
.comment-author-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.comment-author-link:hover {
    color: #ff8a24;
    text-shadow: 0 0 8px rgba(255, 138, 36, 0.6);
}

.comment-avatar-link {
    display: block;
    transition: transform 0.3s ease;
}

.comment-avatar-link:hover {
    transform: scale(1.1);
}

.comment-avatar-link:hover .comment-avatar {
    box-shadow: 0 0 10px rgba(6, 255, 165, 0.6);
}

/* Show More Comments Button */
.show-more-comments {
    width: 100%;
    padding: 10px;
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid #e63946;
    border-radius: 8px;
    color: #e63946;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.show-more-comments:hover {
    background: rgba(230, 57, 70, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.hidden-comments {
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .userposts-title {
        font-size: 16px;
    }
    
    .post-avatar {
        width: 40px;
        height: 40px;
    }
    
    .post-author {
        font-size: 13px;
    }
    
    .post-body {
        font-size: 12px;
    }
    
    .comment-textarea {
        font-size: 12px;
    }
}
