﻿.newsfeed-post-item {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    overflow: hidden;
    background: #1a1a1a;
    margin-bottom: 20px;
    border: 1px solid #333;
}

.newsfeed-post-item:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    transform: translateY(-2px);
    border-color: #555;
}

.post-repost-video,
.post-repost-media {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,.2);
}

.post-repost-video-preview,
.post-repost-media-preview {
    display: block;
    position: relative;
    overflow: hidden;
}

.post-repost-video-preview.video-thumbnail-container {
    aspect-ratio: 16/9;
}

.post-repost-video-preview img,
.post-repost-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-repost-media-preview {
    aspect-ratio: 16/9;
}

.post-repost-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,.03);
    border-top: 1px solid rgba(255,255,255,.06);
}

.post-repost-bar i {
    color: rgba(255,255,255,.6);
    font-size: 12px;
}

.post-repost-bar span:first-of-type {
    font-size: 11px;
    color: rgba(255,255,255,.65);
}

.post-repost-bar-link {
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-repost-bar-link:hover {
    color: #f4f4f4;
    text-decoration: underline;
}

.post-repost-bar-sub {
    font-size: 12px;
    color: rgba(255,255,255,.55);
}

.post-repost-video .video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
}

.post-repost-video .video-link:hover .video-overlay {
    opacity: 1;
}

.post-repost-video .play-button {
    color: white;
    background: rgba(231,76,60,.9);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-repost-video .newsfeed-inline-player {
    position: relative;
    width: 100%;
    background: #000;
    padding-top: 56.25%;
}

.post-repost-video .newsfeed-inline-iframe,
.post-repost-video .newsfeed-inline-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.post-repost-attachment {
    display: flex;
    align-items: stretch;
    gap: 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 0;
    background: rgba(255,255,255,.02);
    overflow: hidden;
}

.post-repost-attachment-inner {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.post-repost-attachment-inner:hover {
    color: inherit;
}

.post-repost-attachment--no-link {
    cursor: default;
    pointer-events: none;
}

.post-repost-attachment__thumb {
    flex: 0 0 100px;
    min-height: 72px;
    background: rgba(0,0,0,.3);
}

.post-repost-attachment__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-repost-attachment__content {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.post-repost-attachment__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255,255,255,.72);
}

.post-repost-attachment__title {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-repost-attachment__subtitle {
    font-size: 12px;
    color: rgba(255,255,255,.65);
}

.newsfeed-post-item .card-header:not(.osk-post-card__header) {
    background: transparent;
    border-bottom: 1px solid #333;
    padding: 16px 20px;
}

.newsfeed-post-item .card-header:not(.osk-post-card__header) h6 {
    color: #ffffff;
    font-weight: 600;
    margin: 0;
    font-size: 0.93rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.newsfeed-post-item .card-header small {
    color: #888;
    font-size: 0.8rem;
}

.newsfeed-post-item .card-body {
    padding: 20px;
    background: transparent;
}

.post-content p {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.post-image-container {
    border-radius: 0;
    overflow: hidden;
    margin: 0;
    background: transparent;
}

/* Stage post con widget posizionati (come composer) */
.osk-post-stage {
    position: relative;
    margin: 12px -16px;
    background: transparent;
}
.osk-post-stage--widgets-only {
    min-height: 120px;
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
    border-radius: 0;
}
.osk-post-widget-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    overflow: visible;
}
.osk-post-widget-layer--viewer .osk-post-w-bar__chip {
    cursor: grab;
    touch-action: none;
}
.osk-post-w-bar.is-dragging .osk-post-w-bar__chip {
    cursor: grabbing;
}
.osk-post-w-bar.is-dragging {
    z-index: 12;
}
.osk-post-w-bar.is-dropped {
    transition: filter .2s ease;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .5));
}
.post-stage-media {
    position: relative;
    width: 100%;
}
.post-stage-inline-player {
    position: relative;
    width: 100%;
    background: #000;
    aspect-ratio: 4 / 5;
    max-height: min(72vh, 560px);
    overflow: hidden;
}
.osk-post-stage--widgets-only .post-stage-inline-player {
    aspect-ratio: 16 / 9;
    max-height: min(56vh, 480px);
}
.osk-post-stage.is-playing-embed .osk-post-widget-layer {
    z-index: 6;
}
.post-stage-inline-iframe,
.post-stage-inline-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    background: #000;
}
.post-stage-inline-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 8;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, transform .15s ease;
}
.post-stage-inline-close:hover {
    background: rgba(230, 0, 0, .88);
    transform: scale(1.05);
}
.osk-post-w-bar {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    max-width: min(220px, 52vw);
    min-width: 148px;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .4));
}
.osk-post-w-bar__chip {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px 5px 5px;
    border-radius: 999px;
    background: rgba(12, 12, 16, .9);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px);
    min-height: 36px;
}
.osk-post-w-bar__preview {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    overflow: hidden;
    background: rgba(255, 255, 255, .08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.osk-post-w-bar__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.osk-post-w-bar__preview--icon {
    font-size: .82rem;
    color: rgba(255, 255, 255, .75);
}
.osk-post-w-bar__play-mark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .62rem;
    color: #fff;
    background: rgba(0, 0, 0, .35);
}
.osk-post-w-bar__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.osk-post-w-bar__title {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.osk-post-w-bar__sub {
    display: block;
    font-size: .64rem;
    color: rgba(255, 255, 255, .48);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.osk-post-w-bar__play {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff3030, #d40000);
    color: #fff;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .18), 0 4px 16px rgba(230, 0, 0, .5);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.osk-post-w-bar__play:hover {
    transform: scale(1.08);
    background: linear-gradient(145deg, #ff4545, #e60000);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .28), 0 6px 20px rgba(230, 0, 0, .62);
}
.osk-post-w-bar__play:active {
    transform: scale(.96);
}
.osk-post-w-bar__play svg {
    display: block;
    margin-left: 2px;
}
.osk-post-w-bar__preview--video {
    position: relative;
}
.osk-post-w-bar__preview--video .osk-post-w-bar__play--video {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 40px;
    height: 40px;
    z-index: 2;
    background: rgba(0, 0, 0, .62);
    border: 2px solid rgba(255, 255, 255, .85);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .45);
}
.osk-post-w-bar__preview--video .osk-post-w-bar__play--video:hover {
    background: rgba(230, 0, 0, .92);
    border-color: #fff;
}
.osk-post-w-bar--music .osk-post-w-bar__chip {
    border-color: rgba(230, 0, 0, .32);
    padding-right: 6px;
}
.osk-post-w-bar--poll .osk-post-w-bar__chip { border-color: rgba(99, 179, 255, .28); }
.osk-post-w-bar--embed .osk-post-w-bar__chip { border-color: rgba(255, 180, 80, .3); }
.osk-post-w-bar--audio .osk-post-w-bar__chip { border-color: rgba(180, 120, 255, .28); }

/* Pannello informazioni allegati */
.osk-post-info-panel {
    display: none;
    margin: 10px 0 0;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}
.osk-post-info-panel.is-open {
    display: block;
}
.osk-post-info-panel .osk-post-dock--info-panel {
    margin-bottom: 0;
    border: 0;
    background: transparent;
}
.osk-post-dock__meta-row {
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
    padding: 2px 0 4px;
}
.osk-post-dock__meta-row a {
    color: #fff;
    text-decoration: none;
}
.osk-post-dock__meta-row a:hover {
    text-decoration: underline;
}
.osk-post-dock__meta-row--muted {
    color: rgba(255, 255, 255, 0.5);
}
.osk-post-dock__widget--meta {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.osk-post-dock__widget--meta:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}
.osk-post-dock__embed-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    width: 88px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
}
.osk-post-dock__embed-thumb-wrap .osk-post-dock__embed-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.osk-post-dock__embed-body--playable {
    display: flex;
    align-items: center;
    gap: 12px;
}
.osk-post-dock__embed-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 42px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, .88);
    border-radius: 50%;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
    transition: transform .15s ease, background .15s ease;
}
.osk-post-dock__embed-play:hover {
    transform: scale(1.06);
    background: rgba(230, 0, 0, .9);
}
.osk-post-dock__embed-play--solo {
    position: static;
    flex-shrink: 0;
}
.post-icon-btn--info.is-active {
    color: var(--main, #e60000);
    background: rgba(230, 0, 0, .12);
    border-radius: 10px;
}

.post-gallery {
    width: 100%;
    overflow: hidden;
    background: #08090c;
    position: relative;
    transition: height .22s ease;
}

.post-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(0,0,0,.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.post-gallery-nav:hover {
    background: rgba(0,0,0,.75);
    border-color: rgba(255,255,255,.45);
}

.post-gallery-nav-prev {
    left: 10px;
}

.post-gallery-nav-next {
    right: 10px;
}

@media (max-width: 680px) {
    .post-gallery-nav {
        display: none;
    }
}

.post-gallery-track {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    height: 100%;
}

.post-gallery-track::-webkit-scrollbar {
    display: none;
}

.post-gallery-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    width: 100%;
    min-width: 0;
    position: relative;
    overflow: hidden;
    background: #08090c;
    line-height: 0;
}

/* Aspect ratio reale (impostato da JS) → riempimento perfetto senza bande */
.post-gallery-slide.is-adapted:not(.is-tall) {
    aspect-ratio: var(--post-slide-ar, auto);
}

.post-gallery-slide.is-adapted:not(.is-tall) .post-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center;
}

/* Portrait molto alti: cap altezza, full-bleed (leggero crop verticale, zero bande laterali) */
.post-gallery-slide.is-tall {
    max-height: min(78vh, 680px);
}

.post-gallery-slide.is-tall .post-image {
    width: 100% !important;
    height: min(78vh, 680px) !important;
    max-height: min(78vh, 680px) !important;
    object-fit: cover !important;
    object-position: center center;
}

/* Fallback prima del load JS */
.post-gallery-slide:not(.is-adapted) .post-image {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: unset !important;
    display: block;
    cursor: pointer;
}

.post-gallery-slide.is-adapted .post-image {
    display: block;
    cursor: pointer;
    border-radius: 0;
}

.post-gallery-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 0 12px;
}

.post-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.35);
    padding: 0;
    transition: transform .15s ease, background .15s ease;
}

.post-gallery-dot.is-active {
    background: #ffffff;
    transform: scale(1.18);
}

.post-actions {
    margin-top: 15px;
}

.post-music-attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #31384a;
    background: rgba(77, 102, 206, 0.12);
    border-radius: 12px;
    padding: 10px;
    transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}

.post-music-attachment.is-playing {
    border-color: rgba(126, 240, 178, .75);
    background: linear-gradient(120deg, rgba(88, 140, 238, .22), rgba(55, 195, 137, .18), rgba(88, 140, 238, .2));
    background-size: 220% 220%;
    animation: postMusicPlayingBg 3s ease-in-out infinite;
    box-shadow: 0 0 0 1px rgba(126, 240, 178, .2), 0 10px 28px rgba(0,0,0,.3);
}

.post-music-cover-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 44px;
}

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

.post-music-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.post-music-meta strong {
    color: #fff;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-music-meta span {
    color: #bac3de;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-music-icon-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.post-music-icon-action {
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: #c9d5ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    cursor: pointer;
    border-radius: 999px;
    transition: color .2s ease, transform .15s ease, background .2s ease;
}

.post-music-icon-action:hover {
    color: #ffffff;
    transform: translateY(-1px);
    background: rgba(255,255,255,.09);
}

.post-music-icon-play {
    color: #f4f7ff;
}

.post-music-icon-action.is-disabled {
    opacity: .45;
}

.post-music-icon-action.is-added {
    color: #7ef0b2;
}

.post-music-icon-play.is-playing {
    color: #7ef0b2;
    background: rgba(126, 240, 178, .14);
}

/* Post compilation box (replica music-comp-card) */
.post-compilation-box .music-comp-card {
    position:relative;
    border-radius:14px;
    padding:14px;
    transform:none;
    transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
    border:1px solid rgba(255,255,255,.18);
    background:linear-gradient(155deg,rgba(26,10,10,.94),rgba(10,10,10,.95));
    box-shadow:0 16px 28px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.06);
    overflow:hidden;
}
.post-compilation-box .music-comp-card:hover{transform:translateY(-3px);}
.post-compilation-box .music-comp-badge{font-size:10px;padding:3px 8px;border-radius:999px;background:rgba(127,29,29,.5);border:1px solid rgba(239,68,68,.45);text-transform:uppercase;letter-spacing:.06em}
.post-compilation-box .music-cd-case{position:relative;height:140px;border-radius:12px;overflow:hidden;}
.post-compilation-box .music-cd-case__collage{position:absolute;inset:0;z-index:0;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:1px;padding:0;overflow:hidden;}
.post-compilation-box .music-cd-case__collage:after{content:'';position:absolute;inset:0;background:rgba(0,0,0,.45);pointer-events:none;}
.post-compilation-box .music-cd-case__collage-img{width:100%;height:100%;object-fit:cover;opacity:1;}
.post-compilation-box .music-cd-case__disc{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:116px;height:116px;border-radius:50%;background:radial-gradient(circle at 50% 50%,rgba(0,0,0,0) 0 17px,rgba(255,255,255,.2) 17px 19px,rgba(0,0,0,0) 19px),repeating-radial-gradient(circle at center,rgba(255,255,255,.14) 0 1px,rgba(255,255,255,0) 1px 3px),radial-gradient(circle at 28% 22%,#fff 0%,#e5e7eb 28%,#cbd5e1 52%,#9ca3af 72%,#374151 100%);border:2px solid rgba(255,255,255,.42);box-shadow:0 0 0 1px rgba(0,0,0,.35),0 10px 18px rgba(0,0,0,.45),inset 0 -12px 18px rgba(0,0,0,.2);z-index:1;}
.post-compilation-box .music-cd-case__disc:after{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:20px;height:20px;border-radius:50%;background:#f8fafc;border:2px solid rgba(255,255,255,.8);box-shadow:0 0 0 4px rgba(10,10,10,.42);}
.post-compilation-box .music-cd-case__cover{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:76px;height:76px;border-radius:50%;object-fit:cover;background:#0f172a;border:2px solid rgba(255,255,255,.78);box-shadow:0 0 0 3px rgba(2,6,23,.55),0 6px 14px rgba(0,0,0,.5);z-index:2;}
.post-compilation-box .music-cd-case__hinge{display:none;}
.post-compilation-box .music-comp-repost-btn{color:rgba(255,255,255,.7);}
.post-compilation-box .music-comp-repost-btn:hover{color:rgba(239,68,68,.9);}
.post-compilation-box .music-comp-card__organizer{margin-top:10px;border-top:1px dashed rgba(255,255,255,.2);padding-top:8px;}
.post-compilation-box .music-comp-sort-list{display:flex;flex-direction:column;gap:6px;max-height:220px;overflow:auto;padding-right:2px;}
.post-compilation-box .music-comp-sort-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;border-radius:10px;background:rgba(10,10,10,.55);border:1px solid rgba(255,255,255,.14);}

@keyframes postMusicPlayingBg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.post-audio-attachment {
    border: 1px solid rgba(117, 134, 197, .28);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(39,45,66,.72) 0%, rgba(23,27,41,.72) 100%);
    padding: 10px 12px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.post-audio-attachment.is-playing {
    border-color: rgba(126, 240, 178, .55);
    background: linear-gradient(180deg, rgba(36,58,72,.76) 0%, rgba(21,38,51,.76) 100%);
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
}

.post-audio-attachment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.post-audio-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(129,147,216,.35);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #e4ebff;
    background: rgba(129,147,216,.14);
}

.post-audio-duration {
    font-size: 12px;
    font-weight: 600;
    color: #bcc8ef;
}

.post-audio-attachment .post-audio-player {
    display: none;
}

.post-audio-ui {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 8px;
}

.post-audio-play-btn,
.post-audio-speed-btn {
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.05);
    color: #e8eeff;
    border-radius: 999px;
    height: 32px;
    min-width: 32px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.post-audio-play-btn {
    width: 32px;
    padding: 0;
}

.post-audio-progress {
    width: 100%;
    accent-color: #7f8fff;
}

.post-audio-time {
    font-size: 12px;
    color: #c9d4f6;
    min-width: 78px;
    text-align: right;
}

@media (max-width: 768px) {
    .post-audio-attachment {
        padding: 9px 10px;
        border-radius: 10px;
    }
    .post-audio-attachment-head {
        margin-bottom: 6px;
    }
    .post-audio-ui {
        grid-template-columns: auto 1fr auto;
        row-gap: 6px;
    }
    .post-audio-time {
        grid-column: 1 / span 2;
        text-align: left;
    }
    .post-audio-speed-btn {
        justify-self: end;
    }
}

.post-actions .btn {
    border-radius: 6px;
    font-size: 0.85rem;
    padding: 6px 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-width: 1px;
}

.post-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.post-actions .btn svg {
    transition: transform 0.2s ease;
}

.post-actions .btn:hover svg {
    transform: scale(1.1);
}

.post-actions .btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}
.community-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.community-chip {
    background: rgba(74, 158, 255, 0.15);
    color: #9ac8ff;
    border: 1px solid rgba(74, 158, 255, 0.35);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
}
.community-meta-sep {
    color: #6b7280;
}
.community-meta-item {
    color: #9ca3af;
    font-size: 0.78rem;
}
.feed-reason-badge {
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
}
.feed-reason-badge:empty {
    display: none;
}

/* Responsive Mobile First */
@media (max-width: 768px) {
    .newsfeed-post-item {
        margin-bottom: 15px;
        border-radius: 10px;
    }
    
    .newsfeed-post-item .card-header {
        padding: 12px 15px;
    }
    
    .newsfeed-post-item .card-header img {
        width: 35px;
        height: 35px;
    }
    
    .newsfeed-post-item .card-header h6 {
        font-size: 0.9rem;
    }
    
    .newsfeed-post-item .card-header small {
        font-size: 0.75rem;
    }
    
    .newsfeed-post-item .card-body {
        padding: 15px;
    }
    
    .post-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .post-image-container {
        margin: 15px -15px;
    }
    
    .post-image { max-height: none; }
    
    .post-actions .btn {
        font-size: 0.8rem;
        padding: 5px 10px;
        margin-bottom: 5px;
    }
    
    .post-actions .d-flex {
        gap: 5px;
    }
}

@media (max-width: 576px) {
    .newsfeed-post-item {
        margin-bottom: 12px;
        border-radius: 8px;
    }
    
    .newsfeed-post-item .card-header {
        padding: 10px 12px;
    }
    
    .newsfeed-post-item .card-header img {
        width: 30px;
        height: 30px;
    }
    
    .newsfeed-post-item .card-header h6 {
        font-size: 0.85rem;
    }
    
    .newsfeed-post-item .card-header small {
        font-size: 0.7rem;
    }
    
    .newsfeed-post-item .card-body {
        padding: 12px;
    }
    
    .post-content p {
        font-size: 0.85rem;
    }
    
    .post-image-container {
        margin: 12px -12px;
    }
    
    .post-image { max-height: none; }
    
    .post-actions .btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .post-actions .btn svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .newsfeed-post-item .card-header {
        padding: 8px 10px;
    }
    
    .newsfeed-post-item .card-header img {
        width: 28px;
        height: 28px;
    }
    
    .newsfeed-post-item .card-body {
        padding: 10px;
    }
    
    .post-content p {
        font-size: 0.8rem;
    }
    
    .post-image-container {
        margin: 10px -10px;
    }
    
    .post-image { max-height: none; }
    
    .post-actions .btn {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .post-actions .btn svg {
        width: 12px;
        height: 12px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .newsfeed-post-item {
        margin-bottom: 18px;
    }
    
    .newsfeed-post-item .card-header {
        padding: 18px 22px;
    }
    
    .newsfeed-post-item .card-body {
        padding: 22px;
    }
    
    .post-image { max-height: none; }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .newsfeed-post-item:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }
    
    .post-actions .btn:hover {
        transform: none;
    }
    
    .post-actions .btn:active {
        transform: scale(0.95);
    }
}

/* Share menu styles */
.share-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 8px 0;
    background: #1a1a1a;
    border: 1px solid #333;
    min-width: 200px;
    position: relative;
    z-index: 9999;
    margin-top: 5px;
    display: none;
}

.share-menu.show {
    display: block;
    margin-top: 0;
}

.share-item {
    padding: 10px 20px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.share-item:hover {
    background-color: #333;
    color: #ffffff;
    text-decoration: none;
}

.share-item svg {
    margin-right: 10px;
}

.dropdown-divider {
    border-color: #333;
    margin: 5px 0;
}

/* Dropdown positioning */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    transform-origin: top center;
    animation: dropdownFadeIn 0.2s ease-out;
    position: relative;
    top: 100%;
    left: 0;
    margin-top: 0;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile positioning */
@media (max-width: 768px) {
    .share-menu {
        min-width: 180px;
        position: relative;
    }
    
    .share-item {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .share-menu {
        min-width: 160px;
        position: relative;
    }
    
    .share-item {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .share-menu {
        min-width: 150px;
        position: relative;
    }
    
    .share-item {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

/* Button focus and hover effects */
.like-btn, .dislike-btn, .comment-btn, .share-btn {
    transition: all 0.2s ease;
    border-radius: 6px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.like-btn:focus, .dislike-btn:focus, .comment-btn:focus, .share-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

.like-btn:hover, .dislike-btn:hover, .comment-btn:hover, .share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.post-icon-btn.like-btn:active, .post-icon-btn.dislike-btn:active, .post-icon-btn.comment-btn:active, .post-icon-btn.share-btn:active {
    transform: scale(0.95);
}

/* Like button specific styles */
.post-icon-btn.like-btn {
    color: #3b82f6;
    border-color: #3b82f6;
}

.post-icon-btn.like-btn:hover {
    background-color: #3b82f6;
    color: white;
}

.post-icon-btn.like-btn:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Dislike button specific styles */
.post-icon-btn.dislike-btn {
    color: #6b7280;
    border-color: #6b7280;
}

.post-icon-btn.dislike-btn:hover {
    background-color: #6b7280;
    color: white;
}

.post-icon-btn.dislike-btn:focus {
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.3);
}

/* Comment button specific styles */
.comment-btn {
    color: #06b6d4;
    border-color: #06b6d4;
}
.comment-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    color: #fff;
    font-weight: 600;
}
.comment-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    border-color: #1e40af;
    color: #fff;
}

.comment-btn:hover {
    background-color: #06b6d4;
    color: white;
}

.comment-btn:focus {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.3);
}

/* Share button specific styles */
.share-btn {
    color: #10b981;
    border-color: #10b981;
}

.share-btn:hover {
    background-color: #10b981;
    color: white;
}

.share-btn:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

/* Active states */
.newsfeed-post-item .like-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.newsfeed-post-item .dislike-btn.active {
    background-color: #6b7280;
    color: white;
    border-color: #6b7280;
}

/* Comment section styles */
.comment-section {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 15px;
    margin-top: 15px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-input-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: 0;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 0;
}

.comment-textarea {
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.16);
    color: #ffffff;
    border-radius: 0;
    resize: none;
    font-size: 0.9rem;
    padding-left: 0;
    padding-right: 0;
}

.comment-textarea:focus {
    background: transparent;
    border-color: #3b82f6;
    box-shadow: none;
    color: #ffffff;
}

.comment-textarea::placeholder {
    color: #888;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
}

.comment-item {
    display: flex;
    margin-bottom: 12px;
    padding: 8px 0;
    background: transparent;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-item .comment-avatar {
    width: 28px;
    height: 28px;
    margin-right: 10px;
}

.comment-content {
    flex-grow: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.comment-username {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.85rem;
    margin-right: 8px;
}

.comment-time {
    color: #888;
    font-size: 0.75rem;
}

.comment-text {
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .comment-input-container {
        padding: 12px;
    }
    
    .comment-avatar {
        width: 28px;
        height: 28px;
    }
    
    .comment-textarea {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .comment-section {
        padding-top: 12px;
        margin-top: 12px;
    }
    
    .comment-input-container {
        padding: 10px;
    }
    
    .comment-avatar {
        width: 24px;
        height: 24px;
    }
    
    .comment-textarea {
        font-size: 0.8rem;
    }
}

/* Channel name clickable styles */
.channel-name {
    transition: color 0.2s ease;
}

.channel-name:hover {
    color: #4a9eff !important;
    text-decoration: none;
}

/* Verification badge styles */
.verified {
    color: #4a9eff !important;
    font-size: 14px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Share dropdown styles */
.share-dropdown {
    position: relative;
    display: inline-block;
}

/* Prevent layout shift when menu appears */
.post-actions {
    overflow: visible;
    position: relative;
}

.share-menu {
    position: absolute;
    top: calc(100% - 5px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    display: none;
    min-width: 200px;
    padding: 8px 0;
    margin: 0;
    font-size: 0.875rem;
    color: #ffffff;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.share-menu.show {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%);
}

.share-menu .dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 16px;
    clear: both;
    font-weight: 400;
    color: #ffffff;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: all 0.15s ease;
}

.share-menu .dropdown-item:hover,
.share-menu .dropdown-item:focus {
    color: #ffffff;
    background-color: #3a3a3a;
}

.share-menu .dropdown-divider {
    height: 0;
    margin: 8px 0;
    overflow: hidden;
    border-top: 1px solid #444;
}

.share-btn {
    position: relative;
}

.share-btn svg {
    transition: transform 0.2s ease;
}

.share-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Responsive adjustments for share menu */
@media (max-width: 768px) {
    .share-menu {
        left: auto;
        right: 0;
        transform: translateX(0);
        min-width: 180px;
    }
    
    .share-menu.show {
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .share-menu {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-width: 160px;
        max-width: calc(100vw - 40px);
    }
    
    .share-menu.show {
        transform: translateX(-50%);
    }
}

.newsfeed-post-item .card-header.osk-post-card__header {
    padding: 0 !important;
    justify-content: space-between;
    border-bottom: none !important;
}

.newsfeed-post-item .card-header.osk-post-card__header img.osk-post-card__avatar {
    width: 48px !important;
    height: 48px !important;
}

.newsfeed-post-item .card-header:not(.osk-post-card__header) {
    padding: 10px 14px !important;
    justify-content: space-between;
}

.newsfeed-post-item .card-header:not(.osk-post-card__header) img {
    width: 36px !important;
    height: 36px !important;
}

.osk-post-card__meta-row .nf-post-time {
    font-size: 0.76rem !important;
    margin-top: 0;
    color: rgba(255, 255, 255, .5);
}

.nf-post-time {
    font-size: 0.74rem !important;
    line-height: 1.1;
    margin-top: 2px;
    opacity: .9;
}

.post-icon-actions {
    gap: 14px;
}

.post-icon-btn {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #d7dae1;
    display: inline-flex;
    align-items: center;
    padding: 0 !important;
    font-weight: 600;
    line-height: 1;
}

.post-icon-btn:hover,
.post-icon-btn:focus {
    color: #fff;
    outline: none;
}

.post-icon-btn.like-btn.active {
    color: #5bb6ff;
}

.post-icon-btn.dislike-btn.active {
    color: #ff7f9f;
}

.post-options-dropdown {
    position: relative;
    margin-left: auto !important;
    flex: 0 0 auto;
}

.post-header-left {
    min-width: 0;
    flex: 1 1 auto;
}

.nf-post-subscribe-btn .btn {
    font-size: 0.75rem;
    padding: 4px 10px;
    line-height: 1.2;
}

.post-options-toggle {
    border: 0;
    background: transparent;
    color: #b9bcc5;
    padding: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.post-options-toggle:hover,
.post-options-toggle[aria-expanded="true"] {
    color: #fff;
}

.post-save-toggle {
    border: 0;
    background: transparent;
    color: #aeb4c2;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
}

.post-save-toggle:hover,
.post-save-toggle.is-saved {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.post-options-menu {
    position: absolute;
    right: 0;
    top: 34px;
    min-width: 190px;
    background: #1f2127;
    border: 1px solid #2b2e36;
    border-radius: 10px;
    padding: 6px;
    list-style: none;
    margin: 0;
    z-index: 1200;
    display: none;
}

.post-options-menu.show {
    display: block;
}

.post-options-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9da3b1;
    padding: 6px 10px;
}

.post-option-item {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: #e7e9ee;
    text-decoration: none;
    font-size: 13px;
}

.post-option-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.post-option-item.is-active {
    background: rgba(231, 76, 60, 0.22);
    color: #fff;
    font-weight: 700;
}

.post-options-menu hr {
    border-color: #2b2e36;
    margin: 5px 0;
}

/* Share menu: espansione orizzontale, ottimizzata mobile */
.share-menu.show {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.share-menu .dropdown-item {
    display: inline-flex;
    align-items: center;
    width: auto;
    border-radius: 999px;
    padding: 6px 10px;
}

.share-menu .dropdown-divider {
    display: none;
}

@media (max-width: 768px) {
    .share-menu {
        width: min(94vw, 420px);
        max-width: min(94vw, 420px);
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
}
