/**
 * @file
 * Gen-Z Fashion Feed - Modern Social UI
 * 
 * Clean, compact aesthetic inspired by TikTok, Instagram, and fashion apps.
 * Carefully scoped to only affect feed components.
 */

/* ==========================================================================
   Gen-Z Design Tokens
   ========================================================================== */

.feed-section {
    --genz-card-radius: 12px;
    --genz-avatar-size: 40px;
    --genz-spacing-xs: 8px;
    --genz-spacing-sm: 12px;
    --genz-spacing-md: 16px;
    --genz-font-sm: 13px;
    --genz-font-md: 14px;
    --genz-font-lg: 15px;
    --genz-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Glassmorphism accent */
    --genz-glass-bg: rgba(255, 255, 255, 0.05);
    --genz-glass-border: rgba(255, 255, 255, 0.1);

    /* Accent gradient - Fashion forward */
    --genz-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --genz-gradient-alt: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ==========================================================================
   Feed Container - Clean Layout
   ========================================================================== */

.feed-section {
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Post Composer - Sleek Input
   ========================================================================== */

.feed-section>.content-box.comment-form__container {
    border-radius: var(--genz-card-radius);
    padding: var(--genz-spacing-md);
    margin-bottom: var(--genz-spacing-md);
    backdrop-filter: blur(10px);
}

/* Composer user avatar */
.comment-form__container .profile-pic {
    width: var(--genz-avatar-size);
    height: var(--genz-avatar-size);
    border-radius: 50%;
    border: 2px solid var(--genz-glass-border);
    transition: transform var(--genz-transition);
}

.comment-form__container .profile-pic:hover {
    transform: scale(1.08);
}

/* Composer textarea - pill style */
.comment-form__container textarea,
.comment-form__container .form-textarea {
    border-radius: 24px;
    padding: 12px 18px;
    font-size: var(--genz-font-md);
    line-height: 1.4;
    resize: none;
    min-height: 42px;
    transition: box-shadow var(--genz-transition);
}

.comment-form__container textarea:focus {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.4);
    outline: none;
}

/* Attachment buttons - Pill chips */
.feed-section .awards-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: var(--genz-spacing-sm);
    margin-top: var(--genz-spacing-sm);
}

.feed-section .awards-list__item,
.feed-section .awards-list a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: var(--genz-font-sm);
    font-weight: 500;
    transition: all var(--genz-transition);
    text-decoration: none;
}

.feed-section .awards-list__item:hover,
.feed-section .awards-list a:hover {
    transform: translateY(-1px);
}

.feed-section .awards-list .fi {
    font-size: 14px;
}

/* ==========================================================================
   Post Cards - Clean & Compact
   ========================================================================== */

.feed-section .content-box.comment-item__container {
    border-radius: var(--genz-card-radius);
    padding: var(--genz-spacing-md);
    margin-bottom: var(--genz-spacing-md);
    transition: transform var(--genz-transition), box-shadow var(--genz-transition);
    animation: genzFadeIn 0.3s ease-out;
}

.feed-section .content-box.comment-item__container:hover {
    transform: translateY(-2px);
}

@keyframes genzFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pinned post accent */
.feed-section .content-box.opigno-pinned-post {
    position: relative;
    overflow: hidden;
}

.feed-section .content-box.opigno-pinned-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--genz-gradient);
}

.feed-section .pinned-post {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--genz-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Author Header - Compact Profile
   ========================================================================== */

.feed-section .comment-item__user {
    display: flex;
    align-items: center;
    gap: var(--genz-spacing-sm);
    margin-bottom: var(--genz-spacing-sm);
}

/* Avatar */
.feed-section .comment-item__container>.comment-item__user>.profile-pic,
.feed-section .comment-item__user .profile-pic {
    width: var(--genz-avatar-size);
    height: var(--genz-avatar-size);
    min-width: var(--genz-avatar-size);
    border-radius: 50%;
    border: 2px solid var(--genz-glass-border);
    transition: all var(--genz-transition);
    cursor: pointer;
}

.feed-section .comment-item__user .profile-pic:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.feed-section .comment-item__user .profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* User info */
.feed-section .comment-item__user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Author name */
.feed-section .comment-item__name {
    font-size: var(--genz-font-md);
    font-weight: 600;
    line-height: 1.3;
}

.feed-section .comment-item__name a {
    text-decoration: none;
    transition: opacity var(--genz-transition);
}

.feed-section .comment-item__name a:hover {
    opacity: 0.8;
}

/* Timestamp */
.feed-section .comment-item__date {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.6;
    text-decoration: none;
}

.feed-section .comment-item__date:hover {
    opacity: 1;
}

/* ==========================================================================
   Post Content - Clean Typography
   ========================================================================== */

.feed-section .comment-item__body {
    font-size: var(--genz-font-lg);
    line-height: 1.5;
    margin-bottom: var(--genz-spacing-sm);
}

.feed-section .comment-item__body p {
    margin: 0 0 10px;
}

.feed-section .comment-item__body p:last-child {
    margin-bottom: 0;
}

/* Read more */
.feed-section .link-bold {
    font-size: var(--genz-font-sm);
    font-weight: 600;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity var(--genz-transition);
}

.feed-section .link-bold:hover {
    opacity: 1;
}

/* Hashtags - Gen-Z style */
.feed-section .comment-item__body a[href*="hashtag"],
.feed-section .hashtag {
    background: var(--genz-glass-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    transition: background var(--genz-transition);
}

.feed-section .comment-item__body a[href*="hashtag"]:hover {
    background: rgba(102, 126, 234, 0.2);
}

/* ==========================================================================
   Media - Clean Presentation
   ========================================================================== */

.feed-section .comment-item__body img {
    border-radius: 8px;
    margin-top: var(--genz-spacing-sm);
    max-width: 100%;
    transition: transform var(--genz-transition);
}

.feed-section .comment-item__body img:hover {
    transform: scale(1.01);
}

/* Link preview */
.feed-section .post-text-preview-container {
    margin-top: var(--genz-spacing-sm);
    border-radius: 10px;
    overflow: hidden;
    transition: transform var(--genz-transition);
}

.feed-section .post-text-preview-container:hover {
    transform: translateY(-2px);
}

/* Repost embed */
.feed-section .opigno-post__repost-area {
    margin-top: var(--genz-spacing-sm);
    padding: var(--genz-spacing-sm);
    border-radius: 10px;
    background: var(--genz-glass-bg);
    border: 1px solid var(--genz-glass-border);
}

/* ==========================================================================
   Info Bar - Reactions Count
   ========================================================================== */

.feed-section .comment-item__info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--genz-spacing-xs) 0;
    font-size: var(--genz-font-sm);
    opacity: 0.7;
}

/* ==========================================================================
   ACTION BAR - TikTok/Insta Style
   ========================================================================== */

.feed-section .comment-item__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: var(--genz-spacing-sm);
    margin-top: var(--genz-spacing-xs);
    border-top: 1px solid var(--genz-glass-border);
}

/* Action buttons - Clean horizontal layout */
.feed-section .comment-item__actions>a,
.feed-section .comment-item__actions>span,
.feed-section .comment-item__actions>button,
.feed-section .comment-item__actions>div,
.feed-section .comment-item__actions .reaction-trigger-wrapper,
.feed-section .comment-item__actions .reaction-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: var(--genz-font-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: all var(--genz-transition);
}

.feed-section .comment-item__actions>a:hover,
.feed-section .comment-item__actions>span:hover,
.feed-section .comment-item__actions>button:hover,
.feed-section .comment-item__actions>div:hover,
.feed-section .comment-item__actions .reaction-trigger:hover {
    background: var(--genz-glass-bg);
}

.feed-section .comment-item__actions>a:active,
.feed-section .comment-item__actions>button:active {
    transform: scale(0.95);
}

/* Action icons */
.feed-section .comment-item__actions .fi,
.feed-section .comment-item__actions i {
    font-size: 18px;
    transition: transform var(--genz-transition);
}

.feed-section .comment-item__actions>a:hover .fi {
    transform: scale(1.1);
}

/* Active/Liked state - Gradient */
.feed-section .comment-item__actions .active,
.feed-section .comment-item__actions .liked {
    background: var(--genz-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   New Posts Banner - Floating Pill
   ========================================================================== */

.feed-section .btn-new-post__wrapper {
    text-align: center;
    margin: var(--genz-spacing-md) 0;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.feed-section .btn-new-post,
.feed-section .btn-new-post__wrapper a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--genz-gradient);
    color: white;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: var(--genz-font-sm);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
    transition: all var(--genz-transition);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.feed-section .btn-new-post:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

/* ==========================================================================
   "You're up to date" Divider
   ========================================================================== */

.feed-section .new-comment-devider {
    position: relative;
    text-align: center;
    margin: var(--genz-spacing-md) 0;
}

.feed-section .new-comment-devider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--genz-glass-border);
}

.feed-section .new-comment-devider span {
    position: relative;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
    background: var(--genz-gradient);
    color: white;
}

/* ==========================================================================
   Comments - Compact Bubbles
   ========================================================================== */

.feed-section .opigno-comments-placeholder {
    padding-top: var(--genz-spacing-sm);
}

.feed-section .comment-item__comment--list {
    padding: var(--genz-spacing-sm) 0;
}

.feed-section .comment-item__comment--list__item {
    display: flex;
    gap: 10px;
    margin-bottom: var(--genz-spacing-sm);
    animation: genzSlideIn 0.25s ease-out;
}

@keyframes genzSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Smaller comment avatars */
.feed-section .comment-item__comment--list .profile-pic {
    width: 32px;
    height: 32px;
    min-width: 32px;
}

/* Comment bubble */
.feed-section .comment-item__comment--list .body,
.feed-section .comment-item__comment--list .content {
    background: var(--genz-glass-bg);
    border-radius: 16px;
    padding: 8px 14px;
    font-size: var(--genz-font-md);
    line-height: 1.4;
}

/* Comment author */
.feed-section .comment-item__comment--list .name a {
    font-size: var(--genz-font-sm);
    font-weight: 600;
    text-decoration: none;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .feed-section {
        --genz-avatar-size: 36px;
        --genz-spacing-md: 12px;
    }

    .feed-section .comment-item__actions>a,
    .feed-section .comment-item__actions>span,
    .feed-section .comment-item__actions>button,
    .feed-section .comment-item__actions>div {
        padding: 8px 4px;
        font-size: 12px;
    }

    .feed-section .comment-item__actions .fi {
        font-size: 16px;
    }
}

/* ==========================================================================
   Dark Mode Adjustments
   ========================================================================== */

[data-theme="dark"] .feed-section {
    --genz-glass-bg: rgba(255, 255, 255, 0.08);
    --genz-glass-border: rgba(255, 255, 255, 0.12);
}