.social-container {
    --facebook-blue: #1877f2;
    --facebook-gray: #65676b;
    --facebook-light-gray: #8a8d91;
    --facebook-background: #ffffff;
    --facebook-border: #dadde1;
    --facebook-hover: #f2f3f5;
    --facebook-active: #e4e6ea;
    --facebook-text: #050505;
    --facebook-secondary-text: #65676b;
    --facebook-success: #42b883;
    --facebook-shadow: rgba(0, 0, 0, 0.1);
    --facebook-radius: 0.5rem;
    --facebook-transition: all 0.2s ease;
}

.social-container {
   width: 100%;
   max-width: 100% !important;
   margin: 0 auto;
   padding: 0;
   font-family: "Segoe UI", Helvetica, Arial, sans-serif;
}

.social-container button:focus {
    outline: none;
    background-color: #FFF;
}

/* Post Styles */
.social-container .post {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
    border: 0.0625rem solid #dddfe2;
}

.social-container .post__header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem 0;
    gap: 0.5rem;
}

.social-container .author__avatar .material-icons {
    color: #757575;
    background: #eee;
    border-radius: 50%;
    padding: 0.125rem;
    font-size: 2.25rem;
}

.social-container .author__avatar-img {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    object-fit: cover;
}

.social-container .post__info {
    flex: 1;
}

.social-container .post__author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.social-container .author__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #050505;
    margin-right: 0.5rem;
}

.social-container .post__timebox {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.social-container .post__time {
    font-size: 0.8125rem;
    color: #65676b;
    cursor: pointer;
    position: relative;
}

.social-container .post__timebox .material-icons {
    font-size: 0.75rem;
    color: #65676b;
}

.social-container .post__time__tooltip {
    visibility: hidden;
    width: max-content;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 0.25rem;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8125rem;
    font-weight: normal;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
}

.social-container .post__timebox:hover .post__time__tooltip {
    visibility: visible;
    opacity: 1;
}

.social-container .post__time__tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -0.3125rem;
    border-width: 0.3125rem;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.social-container .post__message {
    padding: 0.75rem 1rem;
    font-size: 1.07rem;
    line-height: 1.5;
    word-break: break-word;
    color: #050505;
    margin-bottom: 0.5rem;
}

/* Post text content wrapper - supports RTL/LTR auto-detection */
.social-container .post-text-content {
    width: 100%;
    white-space: pre-wrap;
}

/* RTL text alignment */
.social-container .post-text-content[dir="rtl"] {
    text-align: right;
    direction: rtl;
}

/* LTR text alignment */
.social-container .post-text-content[dir="ltr"] {
    text-align: left;
    direction: ltr;
}

/* Link styling within post text */
.social-container .post-link {
    color: #1877f2;
    text-decoration: none;
    font-weight: 500;
}

.social-container  .post-link:hover{
    text-decoration: underline;
}

.social-container .show-more-btn {
    background: none;
    border: none;
    color: #65676b;
    font-weight: 600;
    padding: 0.25rem 0;
    margin-top: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.social-container .show-more-btn:hover {
    text-decoration: underline;
}

.social-container .show-more-btn .material-icons {
    font-size: 1rem;
}

.social-container .post__attachments {
    margin: 0.75rem 0;
    display: grid;
    gap: 0.125rem;
    padding: 0;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(12.5rem, auto);
}

/* Single attachment - full width and height */
.social-container .post__attachments > div:only-child {
    grid-column: 1 / -1;
    grid-row: 1;
}

.social-container .post__attachments > div:only-child img,
.social-container .post__attachments > div:only-child video {
    width: 100%;
    height: auto;
    max-height: 31.25rem;
    min-height: 18.75rem;
    object-fit: cover;
    aspect-ratio: 16/9;
}

/* Two attachments - side by side */
.social-container .post__attachments > div:first-child:nth-last-child(2),
.social-container .post__attachments > div:first-child:nth-last-child(2) ~ div {
    grid-column: span 1;
    height: 18.75rem;
}

.social-container .post__attachments > div:first-child:nth-last-child(2) img,
.social-container .post__attachments > div:first-child:nth-last-child(2) ~ div img,
.social-container .post__attachments > div:first-child:nth-last-child(2) video,
.social-container .post__attachments > div:first-child:nth-last-child(2) ~ div video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Three attachments - Facebook style layout */
.social-container .post__attachments > div:first-child:nth-last-child(3) {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 300px;
}

.social-container .post__attachments > div:first-child:nth-last-child(3) ~ div:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    height: 12.5rem;
}

.social-container .post__attachments > div:first-child:nth-last-child(3) ~ div:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    height: 12.5rem;
}

.social-container .post__attachments > div:first-child:nth-last-child(3) img,
.social-container .post__attachments > div:first-child:nth-last-child(3) video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-container .post__attachments > div:first-child:nth-last-child(3) ~ div img,
.social-container .post__attachments > div:first-child:nth-last-child(3) ~ div video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Four attachments - 2x2 grid */
.social-container .post__attachments > div:first-child:nth-last-child(4),
.social-container .post__attachments > div:first-child:nth-last-child(4) ~ div {
    grid-column: span 1;
    height: 200px;
}

.social-container .post__attachments > div:first-child:nth-last-child(4) img,
.social-container .post__attachments > div:first-child:nth-last-child(4) ~ div img,
.social-container .post__attachments > div:first-child:nth-last-child(4) video,
.social-container .post__attachments > div:first-child:nth-last-child(4) ~ div video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Five or more attachments - first large, others in grid with overlay */
.social-container .post__attachments > div:first-child:nth-last-child(n + 5) {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 300px;
}

.social-container .post__attachments > div:first-child:nth-last-child(n + 5) ~ div:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    height: 9.375rem;
}

.social-container .post__attachments > div:first-child:nth-last-child(n + 5) ~ div:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    height: 9.375rem;
    position: relative;
}

/* Hide attachments beyond the 3rd when there are 5+ */
.social-container .post__attachments > div:first-child:nth-last-child(n + 5) ~ div:nth-child(n + 4) {
    display: none;
}

/* Show overlay on 3rd item when there are 5+ attachments */
.social-container .post__attachments > div:first-child:nth-last-child(n + 5) ~ div:nth-child(3)::after {
    content: "+" attr(data-remaining-count);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 0.5rem;
}

.social-container .post__attachments > div:first-child:nth-last-child(n + 5) img,
.social-container .post__attachments > div:first-child:nth-last-child(n + 5) video,
.social-container .post__attachments > div:first-child:nth-last-child(n + 5) ~ div img,
.social-container .post__attachments > div:first-child:nth-last-child(n + 5) ~ div video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post Image Hover Effects */
.social-container .post__image {
    transition: var(--facebook-transition);
    position: relative;
}

.social-container .post__image:hover {
    transform: scale(1.02);
    filter: brightness(0.95);
    cursor: pointer;
}

/* Add a subtle overlay on hover to indicate clickability */
.social-container .post__attachments > div:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    transition: var(--facebook-transition);
    pointer-events: none;
    border-radius: inherit;
}

.social-container .post__attachments > div {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

/* Common styles for all attachments */
.social-container .post__attachments img,
.social-container .post__attachments video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: block;
    cursor: pointer;
}

.social-container .post__attachments img:hover,
.social-container .post__attachments video:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
    z-index: 1;
}

/* Video specific styles */
.social-container .post__attachments video {
    background: #000;
}

/* Ensure Angular's wrapper divs don't create whitespace */
.social-container .post__attachments > div {
    position: relative;
    overflow: hidden;
    background: #f0f2f5;
}

/* For images inside post__image class */
.social-container .post__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

/* For GIFs rendered as <video> */
.social-container .post-gif {
    background: #000;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

/* Reuse video styling with a better fit */
.social-container .post-video {
    background: #000;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.social-container .post__image:hover,
.social-container .post-video:hover,
.social-container .post-gif:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
    z-index: 1;
}

.social-container .post-unsupported-attachment {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* For external links */
.social-container .post__link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    color: #1877f2;
    padding: 1rem;
    border-radius: 0;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    height: 100%;
    min-height: 9.375rem;
    transition: background-color 0.2s ease;
}

.social-container .post__link:hover {
    background-color: #e4e6eb;
    text-decoration: underline;
}

.social-container .post-unavailable {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Comments Sort Controls - already scoped */
.social-container .comments-sort-controls {
    padding: 0.5rem 1rem;
    border-top: 0.0625rem solid var(--facebook-border);
    border-bottom: 0.0625rem solid var(--facebook-border);
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.social-container .load-more-container {
    margin: 0;
    padding: 0;
    order: 1;
}

.social-container .load-more-btn {
    background-color: var(--facebook-blue);
    color: white !important;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 0.375rem;
    text-transform: none;
    letter-spacing: normal;
    height: auto;
    line-height: 1.34;
    transition: var(--facebook-transition);
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-container .load-more-btn:hover {
    background-color: #166fe5;
    transform: translateY(-1px);
    box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1);
}

/* Sort button adjustments to maintain alignment */
.social-container .sort-comments-btn {
    order: 2;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--facebook-secondary-text);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    transition: var(--facebook-transition);
}

.social-container .sort-comments-btn:hover {
    background-color: var(--facebook-hover);
}

.social-container .sort-label {
    color: var(--facebook-secondary-text);
}

.social-container .sort-option {
    color: var(--facebook-blue);
}

.social-container .sort-arrow {
    font-size: 0.625rem;
    margin-left: 0.125rem;
    transition: transform 0.2s ease;
}

.social-container .sort-comments-btn:hover .sort-arrow {
    color: var(--facebook-blue);
}

/* Comments Section */
.social-container .comments-section {
    padding: 0;
    margin-top: 0.5rem;
}

/* Comment Wrapper */
.social-container .comment-wrapper {
    margin: 0;
    padding: 0;
    animation: fadeIn 0.3s ease;
}

/* Comment Item */
.social-container .comment-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem 0.5rem;
    margin: 0;
    border-bottom: 0.0625rem solid rgba(218, 221, 225, 0.3);
}

/* Nested Reply - Progressive Indentation */
.social-container .nested-reply {
    margin: 0;
    padding: 0;
}

.social-container .nested-reply .comment-item {
    padding-left: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.375rem;
    border-bottom: none;
}

/* Comment Content */
.social-container .comment-content {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.social-container .comment-bubble {
    background: var(--facebook-hover);
    border-radius: 1.125rem;
    padding: 0.5rem 0.75rem;
    display: inline-block;
    max-width: calc(100% - 1.25rem);
    word-wrap: break-word;
    box-shadow: 0 0.0625rem 0.0625rem rgba(0, 0, 0, 0.04);
}

/* Comment bubble wrapper - contains bubble + three-dot menu */
.social-container .comment-bubble-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}


.social-container .comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}


/* Three-dot menu container */
.social-container .comment-menu-container {
    position: relative;
    display: inline-flex;
    align-self: flex-start;
    margin-top: 0.5rem;
}


/* Three-dot menu button */
.social-container .comment-menu-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    color: var(--facebook-secondary-text);
}

.social-container .comment-menu-btn:hover {
    background-color: var(--facebook-hover);
}

.social-container .comment-menu-btn .material-icons {
    font-size: 1.125rem;
}

/* Floating popup menu */
.social-container .comment-menu-popup {
    position: absolute;
    top: 2.5rem;
    right: -5rem;
    margin-top: 0.25rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.75rem rgba(0, 0, 0, 0.15);
    min-width: 11.25rem;
    z-index: 1000;
    overflow: visible;
    animation: menuFadeIn 0.15s ease;
}

/* Triangle notch pointing to three-dot button */
.social-container .comment-menu-popup::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    right: 5.25rem;
    width: 0;
    height: 0;
    border-left: 0.5rem solid transparent;
    border-right: 0.5rem solid transparent;
    border-bottom: 0.5rem solid white;
    filter: drop-shadow(0 -0.0625rem 0.0625rem rgba(0, 0, 0, 0.1));
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu option */
.social-container .comment-menu-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--facebook-text);
    font-size: 0.875rem;
    font-weight: 500;
}

.social-container .comment-menu-option:hover {
    background-color: var(--facebook-hover);
}

.social-container .comment-menu-option .material-icons {
    font-size: 1.125rem;
    color: var(--facebook-secondary-text);
}

.social-container .comment-menu-option.comment-menu-delete {
    color: #e41e3f;
}

.social-container .comment-menu-option.comment-menu-delete .material-icons {
    color: #e41e3f;
}

.social-container .comment-menu-option.comment-menu-delete:hover {
    background-color: #fee;
}


.social-container .comment-template-launch {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f2f4;
}

.social-container .comment-author {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--facebook-text);
    margin-bottom: 0.125rem;
}

.social-container .comment-text {
    font-size: 0.875rem;
    color: var(--facebook-text);
    line-height: 1.4;
}

/* Comment Image Container - Facebook-like with action buttons */
.social-container .comment-image-container {
    position: relative;
    max-width: 15rem;
    width: fit-content;
    border-radius: 1.125rem;
    overflow: hidden;
    margin-top: 0.5rem;
}

.social-container .comment-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 1.125rem;
    cursor: pointer;
    transition: var(--facebook-transition);
    object-fit: contain;
}

.social-container .comment-image:hover {
    filter: brightness(0.95);
}

/* Action buttons overlay */
.social-container .comment-image-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.375rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.social-container .comment-image-container:hover .comment-image-actions {
    opacity: 1;
}

.social-container .comment-image-action-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
}

.social-container .comment-image-action-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 0.1875rem 0.375rem rgba(0, 0, 0, 0.3);
}

.social-container .comment-image-action-btn .material-icons {
    font-size: 1.125rem;
    color: var(--facebook-gray);
}

.social-container .comment-image-action-btn:hover .material-icons {
    color: var(--facebook-blue);
}


.social-container .comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
    padding-left: 0.5rem;
    font-size: 0.75rem;
}

.social-container .comment-action-btn {
    background: none;
    border: none;
    color: var(--facebook-secondary-text);
    cursor: pointer;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: var(--facebook-transition);
}

.social-container .comment-action-btn:hover {
    background-color: var(--facebook-hover);
    color: var(--facebook-blue);
}

.social-container .comment-time {
    color: var(--facebook-secondary-text);
    font-size: 12px;
    font-weight: normal;
}

.social-container input[type=text]:not(.browser-default):focus:not([readonly]) {
    border-bottom: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

/* Facebook Reply Section */
.social-container .social-reply-section {
    padding: 0.5rem 1rem;
    background: #f0f2f5;
    border-radius: 0 0 0.5rem 0.5rem;
    margin-top: 0.25rem;
}

/* Reply to [Name] header */
.social-container .social-reply-header {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.social-container .social-reply-to-text {
    color: #65676B;
    font-size: 12px;
    font-weight: 500;
}

.social-container .clear-notification {
    color: #2196f3;
    background: #e3f2fd;
    padding: 0.25rem;
    border-left: 0.1875rem solid #2196f3;
}

/* Input container */
.social-container .social-reply-input-container {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 1.125rem;
    padding: 0.25rem 0.5rem;
    border: 0.0625rem solid #dddfe2;
}

/* Left action buttons */
.social-container .social-reply-actions-left {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.social-container .social-action-icon {
    color: #65676B;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background 0.3s;
}

.social-container .social-action-icon:hover {
    background: #f0f2f5;
}

.social-container .social-action-icon i {
    font-size: 1.25rem;
}

/* Text input */
.social-container .social-reply-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    outline: none;
}

/* Send button (arrow) */
.social-container .social-reply-send {
    background: #1b74e4;
    border: none;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    margin-left: 0.5rem;
}

.social-container .social-reply-send:disabled {
    background: #e4e6eb;
    cursor: default;
}

.social-container .social-reply-send i {
    font-size: 1.125rem;
}

/* Emoji Picker */
.social-container .emoji-picker-container {
    position: relative;
    top: 6.25rem;
    left: 10.625rem;
    z-index: 999;
}

.social-container .emoji-picker {
    right: auto;
}

/* Toggle Section */
.social-container .toggle-section {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    margin: 0;
}

.social-container .toggle-replies-btn {
    background: none;
    border: none;
    color: var(--facebook-secondary-text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: var(--facebook-transition);
}

.social-container .toggle-replies-btn:hover {
    color: var(--facebook-text);
    background-color: var(--facebook-hover);
}

.social-container .toggle-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.social-container .toggle-arrow.rotated {
    transform: rotate(180deg);
}

/* Replies Container */
.social-container .replies-container {
    margin: 0;
    padding: 0;
    border-left: 0.125rem solid rgba(218, 221, 225, 0.3);
    margin-left: 1.5rem;
    padding-left: 0.5rem;
}

/* Smooth Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-0.625rem);
    }

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

/* Focus States for Accessibility */
.social-container .comment-action-btn:focus,
.social-container .toggle-replies-btn:focus {
    outline: 0.125rem solid var(--facebook-blue);
    outline-offset: 0.125rem;
    border-radius: 0.25rem;
}

.social-container .post__attachments img:focus,
.social-container .post__attachments video:focus {
    outline: 0.125rem solid #1877f2;
    outline-offset: 0.125rem;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .social-container {
        --facebook-border: #000000;
        --facebook-secondary-text: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .social-container * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-container { /* Already scoped */
        margin: 0.625rem auto;
        padding: 0 0.5rem;
    }

    .social-container .post {
        border-radius: 0;
        margin-bottom: 0.5rem;
    }

    .social-container .post__attachments {
        grid-auto-rows: minmax(9.375rem, auto);
    }

    .social-container .post__attachments > div:only-child img,
    .social-container .post__attachments > div:only-child video {
        min-height: 12.5rem;
        max-height: 18.75rem;
    }

    .social-container .post__attachments > div:first-child:nth-last-child(2),
    .social-container .post__attachments > div:first-child:nth-last-child(2) ~ div {
        height: 200px;
    }

    .social-container .post__attachments > div:first-child:nth-last-child(3) {
        height: 200px;
    }

    .social-container .post__attachments > div:first-child:nth-last-child(3) ~ div:nth-child(2),
    .social-container .post__attachments > div:first-child:nth-last-child(3) ~ div:nth-child(3) {
        height: 150px;
    }

    .social-container .post__attachments > div:first-child:nth-last-child(4),
    .social-container .post__attachments > div:first-child:nth-last-child(4) ~ div {
        height: 150px;
    }

    .social-container .post__attachments > div:first-child:nth-last-child(n + 5) {
        height: 200px;
    }

    .social-container .post__attachments > div:first-child:nth-last-child(n + 5) ~ div:nth-child(2),
    .social-container .post__attachments > div:first-child:nth-last-child(n + 5) ~ div:nth-child(3) {
        height: 120px;
    }

    .social-container .comment-item {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .social-container .nested-reply .comment-item {
        padding-left: 1rem;
    }

    .social-container .toggle-section {
        padding-left: 1.75rem;
    }

    .social-container .replies-container {
        margin-left: 1rem;
    }

    .social-container .comments-sort-controls { /* Already scoped */
        padding: 0.5rem 0.75rem;
    }

    .social-container .load-more-btn { /* Already scoped */
        padding: 0.3125rem 0.625rem;
        font-size: 0.75rem;
    }

    .social-container .sort-comments-btn { /* Already scoped */
        font-size: 12px;
    }
}

/* ── Social Quick Replies Panel ──────────────────────────────────────────── */

/* Lightning-bolt trigger button highlight */
.social-container .social-quick-reply-trigger {
    color: #1b74e4;
}

.social-container .social-quick-reply-trigger:hover {
    background: #e7f0fd;
}

/* Floating panel — opens above the input bar */
.social-container .social-quick-replies-panel {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15), 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
    z-index: 1100;
    overflow: hidden;
    animation: socialQrFadeIn 0.18s ease;
    border: 0.0625rem solid #e4e6eb;
}

@keyframes socialQrFadeIn {
    from { opacity: 0; transform: translateY(0.5rem); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Search bar row */
.social-container .social-qr-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border-bottom: 0.0625rem solid #e4e6eb;
    background: #f7f8fa;
}

.social-container .social-qr-search-icon {
    font-size: 1.125rem;
    color: #65676b;
    flex-shrink: 0;
}

.social-container .social-qr-search {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-size: 0.875rem;
    color: #050505;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    border-bottom: none !important;
}

.social-container .social-qr-search::placeholder {
    color: #8a8d91;
}

/* Close button */
.social-container .social-qr-close {
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.social-container .social-qr-close:hover {
    background: #e4e6eb;
    color: #050505;
}

.social-container .social-qr-close .material-icons {
    font-size: 1.125rem;
}

/* Replies list */
.social-container .social-qr-list {
    list-style: none;
    margin: 0;
    padding: 0.375rem 0;
    max-height: 14rem;
    overflow-y: auto;
}

.social-container .social-qr-list::-webkit-scrollbar {
    width: 0.25rem;
}

.social-container .social-qr-list::-webkit-scrollbar-track {
    background: transparent;
}

.social-container .social-qr-list::-webkit-scrollbar-thumb {
    background: #dadde1;
    border-radius: 0.25rem;
}

/* Reply item */
.social-container .social-qr-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.12s ease;
    border-left: 0.1875rem solid transparent;
}

.social-container .social-qr-item:hover {
    background: #f0f2f5;
    border-left-color: #1b74e4;
}

/* Keyboard-active highlight */
.social-container .social-qr-item--active {
    background: #e7f0fd !important;
    border-left-color: #1b74e4 !important;
}

.social-container .social-qr-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #050505;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* Empty state */
.social-container .social-qr-empty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: #8a8d91;
    font-size: 0.8125rem;
    justify-content: center;
}

.social-container .social-qr-empty .material-icons {
    font-size: 1.125rem;
    color: #bcc0c4;
}
/* ── End Social Quick Replies Panel ─────────────────────────────────────── */