/* Publications components styles */

.author-info-avatar.mud-avatar {
    width: 45px !important;
    height: 45px !important;
    min-width: 45px !important;
}

.author-info-avatar .author-info-initials,
.author-info-avatar .initials-avatar {
    width: 45px !important;
    height: 45px !important;
    min-width: 45px !important;
    font-size: 1rem !important;
}

.author-initials-image {
    width: 45px !important;
    height: 45px !important;
    min-width: 45px !important;
}

.d-none {
    display: none !important;
}


.title-publication {
    font-size: 1.2rem !important;
    padding-top: 0.25rem;
}

.publications-list {
    flex-wrap: wrap;
    row-gap: 0 !important;
}

.highlighted-info-icon {
    transition: transform 0.2s ease;
    cursor: help;
}

    .highlighted-info-icon:hover {
        transform: scale(1.12);
    }

.publication-item {
    flex-direction: column;
    height: 100% !important;
    margin-bottom: 0 !important;
    position: relative;
}

    .publication-item > * {
        flex: 1;
    }



.bento-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
    display: block !important;
    vertical-align: top !important;
    line-height: 0 !important;
}

.initials-avatar.bento-image {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    border-top-left-radius: 1rem !important;
    border-bottom-left-radius: 1rem !important;
}

@media (min-width: 960px) and (max-width: 1280px) {
    .description-clamp {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Create article floating button */

.create-article-fab {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    background-color: var(--mud-palette-secondary-blue) !important;
    z-index: 10 !important;
}

.create-article-fab-tooltip {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 10 !important;
}

    .create-article-fab-tooltip .create-article-fab {
        position: static !important;
    }

/* Publications preview styles */

.publication-item-preview {
    display: flex;
    flex-direction: column;
    height: 100% !important;
    margin-bottom: 0 !important;
    position: relative;
}

    .publication-item-preview::before {
        display: none;
    }

    .publication-item-preview:hover::before {
        background-color: transparent;
    }

    .publication-item-preview > * {
        flex: 1;
        position: relative;
        z-index: 1;
    }

.publication-component-preview {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

    .publication-component-preview::before {
        content: '';
        position: absolute;
        top: -1rem;
        left: -0.75rem;
        right: -0.5rem;
        bottom: -0.5rem;
        background-color: transparent;
        border-radius: 0.9rem;
        transition: background-color 0.2s ease;
        pointer-events: none;
        z-index: 0;
    }

    .publication-component-preview:hover::before {
        background-color: var(--mud-palette-secondary-blue-5O);
    }

    .publication-component-preview > * {
        position: relative;
        z-index: 1;
    }

.article-preview {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    height: 5rem;
}

.publication-preview-image {
    width: 4.5rem !important;
    height: 4.5rem !important;
    min-width: 4.5rem !important;
    min-height: 4.5rem !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center !important;
    margin-right: 0.375rem !important;
    display: block !important;
}

.article-preview img.publication-preview-image.object-fill {
    object-fit: cover !important;
}

.article-preview .mud-image.publication-preview-image img {
    object-fit: cover !important;
    object-position: center !important;
}

.divider-publication-preview {
    background-color: var(--mud-palette-light-gray) !important;
}

.article-preview-card {
    overflow: visible;
}

.article-preview-top {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.publication-preview-text-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding-left: 0.75rem;
    overflow: hidden;
    position: relative;
}

.publication-preview-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.articles-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
    gap: 1.5rem;
}

    .articles-preview-grid.articles-preview-grid-three {
        grid-template-columns: repeat(3, minmax(19rem, 1fr));
        justify-content: start;
    }

.infinite-scroll-bento-container {
    height: 900px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    transform: translateZ(0);
    contain: paint layout;
}

@media (max-width: 959.98px) {
    .articles-preview-grid {
        display: flex;
        flex-direction: column;
        height: 100%;
        gap: 0;
        padding-bottom: 0;
        padding-top: 0 !important;
    }
}

.articles-preview-empty {
    grid-column: 1 / -1;
    padding: 1rem 0;
}

/* Publication details modal */

.gd-modal-edge.mud-dialog-container {
    align-items: flex-end !important;
}


/* Mobile responsive styles */
@media (max-width: 959px) {
    .gd-modal-edge.GD-modal {
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        z-index: 2100 !important;
    }

    .gd-modal-edge.mud-dialog-container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        z-index: 2100 !important;
    }

    .gd-modal-edge ~ .mud-overlay {
        z-index: 2099 !important;
    }
}

/* Mobile responsive height */
@media (max-width: 959px) {
    .GD-modal.mud-dialog {
        height: 100vh !important;
        max-height: 100vh !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
        box-sizing: border-box !important;
        z-index: 2100 !important;
    }

        .GD-modal.mud-dialog.modal-create-incident {
            max-height: 70% !important;
        }
}



@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.content-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-expanded {
    display: block;
}

.read-more-container {
    position: relative;
    padding-bottom: 1rem;
}

.read-more-text {
    margin-bottom: 0 !important;
    font-size: 1rem !important;
}

    .read-more-text ol,
    .read-more-text ul {
        margin: 0.5rem 0;
        padding-left: 1.5rem;
    }

    .read-more-text li {
        margin: 0.25rem 0;
    }

.read-more {
    color: var(--mud-palette-primary);
    cursor: pointer;
    font-weight: 500;
    display: block;
    margin-top: 0.5rem;
}

    .read-more:hover {
        text-decoration: underline;
    }

.divider-spacing {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Create/edit article modal */

.modal-create-article.GD-modal {
    width: 45vw !important;
    max-width: 45vw !important;
}

.article-modal-body-content {
    position: relative;
}

@media (max-width: 960px) {
    .modal-create-article.GD-modal {
        width: 100vw !important;
        max-width: 100vw !important;
    }

        .modal-create-article.GD-modal.mud-dialog {
            height: 100vh !important;
            height: 100dvh !important;
            max-height: 100vh !important;
            max-height: 100dvh !important;
            min-height: 100vh !important;
            min-height: 100dvh !important;
            margin: 0 !important;
            border-radius: 0 !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
        }

    .modal-create-article .mud-dialog-title {
        flex-shrink: 0 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
        background: white !important;
    }

    .modal-create-article .mud-dialog-content {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        padding: 0 !important;
    }

    .modal-create-article .mud-dialog-actions {
        flex-shrink: 0 !important;
        z-index: 10 !important;
        background: white !important;
        border-top: 1px solid #e0e0e0;
    }

    .modal-create-article.GD-modal .GD-modal-body {
        max-height: none !important;
        height: 100% !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        padding: 0.75rem 1.5rem !important;
    }

    .modal-create-article .ql-editor {
        max-height: 12rem !important;
        overflow-y: auto !important;
    }
}

.modal-create-article .gd-textarea-spacing {
    margin-top: 32px !important;
}

.article-modal-reel-preview {
    cursor: default !important;
}

    .article-modal-reel-preview.reel-publication-card {
        transform: none !important;
    }

        .article-modal-reel-preview.reel-publication-card:hover {
            transform: none !important;
        }

    .article-modal-reel-preview.publication-component-preview::before,
    .article-modal-reel-preview.publication-component-preview:hover::before {
        background-color: transparent !important;
    }

    .article-modal-reel-preview .article-modal-static-tag {
        cursor: default !important;
        pointer-events: none;
        transition: none !important;
    }

        .article-modal-reel-preview .article-modal-static-tag:hover {
            transform: none !important;
            opacity: 1 !important;
            box-shadow: none !important;
            filter: none !important;
        }

.article-modal-location-field {
    margin-top: 4rem !important;
}

.article-upload-inline-icon {
    font-size: 0.95rem !important;
    margin: 0 0.2rem;
    vertical-align: middle;
}

.article-upload-inline-text {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.article-media-preview {
    flex-shrink: 0;
}

.article-media-preview-container {
    width: 14rem;
    min-width: 14rem;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

    .article-media-fill,
    .article-media-fill img,
    .article-media-preview-container .mud-image,
    .article-media-preview-container .mud-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block;
    }

    .article-media-preview-container.initials-avatar,
    .article-media-preview-container.initials-avatar-fill-parent,
    .article-media-preview-container.initials-avatar-text,
    .article-media-preview-container.initials-avatar-small {
        width: 14rem !important;
        min-width: 14rem !important;
        height: 17.5rem !important;
        min-height: 17.5rem !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0.5rem !important;
    }

.highlighted-article-carousel {
    position: relative;
    outline: none;
}

    .highlighted-article-carousel .carousel-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        cursor: pointer;
        padding: 0.375rem;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s ease;
        pointer-events: none;
    }

        .highlighted-article-carousel .carousel-arrow .mud-icon-root {
            color: rgba(255, 255, 255, 0.7);
            font-size: 2rem;
            filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
            transition: transform 0.2s ease, color 0.2s ease;
        }

    .highlighted-article-carousel:hover .carousel-arrow {
        opacity: 1;
        pointer-events: auto;
    }

    .highlighted-article-carousel .carousel-arrow:hover {
        transform: translateY(-50%) scale(1.25);
    }

        .highlighted-article-carousel .carousel-arrow:hover .mud-icon-root {
            color: rgba(255, 255, 255, 1);
        }

    .highlighted-article-carousel .carousel-arrow-left {
        left: 0.5rem;
    }

    .highlighted-article-carousel .carousel-arrow-right {
        right: 0.5rem;
    }

/* Slide horizontal transition animations */

/* Enter from the right (forward navigation) */
@keyframes carouselEnterFromRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Enter from the left (backward navigation) */
@keyframes carouselEnterFromLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Exit to the left (forward navigation) */
@keyframes carouselExitToLeft {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* Exit to the right (backward navigation) */
@keyframes carouselExitToRight {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }
}

.carousel-slide-enter-right {
    animation: carouselEnterFromRight 600ms ease-in-out both;
}

.carousel-slide-enter-left {
    animation: carouselEnterFromLeft 600ms ease-in-out both;
}

.carousel-slide-exit-left {
    animation: carouselExitToLeft 600ms ease-in-out both;
    pointer-events: none;
}

.carousel-slide-exit-right {
    animation: carouselExitToRight 600ms ease-in-out both;
    pointer-events: none;
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 0.75rem;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 1rem;
    z-index: 4;
}

/* Background (static) track */
.carousel-indicator-line {
    flex: 1;
    height: 0.25rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Fill layer — recreated by Blazor @key on every transition, restarting the animation */
@keyframes carouselIndicatorFill {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

.carousel-indicator-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 1);
    animation: carouselIndicatorFill 8s linear both;
}


/* Highlighted article */

.highlighted-article-container {
    padding: 0;
    margin: 0;
    width: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
    position: relative;
    aspect-ratio: 4;
}

.highlighted-article-image {
    width: 100%;
    height: 17rem;
    object-fit: cover;
    display: block;
    border-radius: 0.75rem;
}

.highlighted-article-image-placeholder {
    background: color-mix(in srgb, var(--mud-palette-secondary-blue) 20%, #fff 80%);
}

.highlighted-article-spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.35);
    border-radius: 0.75rem;
    z-index: 10;
}

.highlighted-article-overlay-box {
    display: none;
}

.highlighted-article-overlay-content {
    display: none;
}

/* Full-size slide wrapper: image + overlay box slide together as one unit */
.highlighted-article-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
}

    /* The entering slide sits on top; the leaving one is behind */
    .highlighted-article-slide:last-of-type {
        z-index: 1;
    }

    .highlighted-article-slide .highlighted-article-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0.75rem;
    }

.highlighted-article-overlay-inner {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    width: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 0.5rem;
    gap: 0.375rem;
    z-index: 2;
    backdrop-filter: blur(2px);
    max-width: calc(100% - 2.5rem);
}

.highlighted-article-title {
    color: white !important;
    font-weight: bold !important;
}

.highlighted-article-date {
    color: white !important;
    opacity: 0.9;
}

.highlighted-article-button {
    background-color: rgba(255, 255, 255, 0.98) !important;
    color: black !important;
    text-transform: none !important;
    font-weight: 500 !important;
    width: fit-content;
    padding: 0.75rem 1.5rem !important;
    height: 2.75rem !important;
    min-height: 2.75rem !important;
    margin-top: 0.5rem !important;
}

    .highlighted-article-button:hover {
        background-color: rgba(255, 255, 255, 1) !important;
    }

    .highlighted-article-button span.mud-button-label {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .highlighted-article-button .mud-icon-root {
        display: none !important;
    }

/* Commons */

.h-100 {
    height: 100%;
}

.no-margin {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.medium-gray-bg {
    background-color: #e0e0e0;
}

.replying-to-banner {
    min-height: 2rem;
}

.replying-to-banner-text {
    line-height: 1;
    min-height: 1.5rem;
    display: flex;
    align-items: center;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.replying-to-banner-text-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    max-width: 100%;
}

.replying-to-banner-label {
    flex-shrink: 0;
    white-space: nowrap;
}

.replying-to-banner-name {
    display: inline-block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.replying-to-banner-close.mud-icon-button {
    width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0 !important;
    flex-shrink: 0;
}

.transparent-close-btn {
    background-color: transparent !important;
    color: #9e9e9e !important;
}

    .transparent-close-btn:hover {
        background-color: #f5f5f5 !important;
        color: #757575 !important;
    }

    .transparent-close-btn .mud-icon-root {
        color: #9e9e9e;
    }

    .transparent-close-btn:hover .mud-icon-root {
        color: #757575;
    }

.no-icon-button .mud-button-label > span:first-child {
    display: none !important;
}

.no-icon-button .mud-button-label {
    justify-content: center;
}

.mud-input > textarea.mud-input-root-outlined.mud-input-root-margin-dense {
    margin-top: 0px;
    padding-top: 10.5px;
    padding-bottom: 10.5px;
    mask-image: none !important;
}

.edit-btn {
    color: var(--medium-gray) !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: background 0.2s;
}

    .edit-btn:hover {
        color: var(--medium-gray) !important;
        background: var(--mud-palette-medium-gray-10O) !important;
        box-shadow: none !important;
    }

.delete-btn {
    color: var(--medium-gray) !important;
    background: transparent !important;
    box-shadow: none !important;
}

    .delete-btn:hover {
        color: var(--mud-palette-danger-red) !important;
        background: none !important;
        box-shadow: none !important;
    }

.gdconfirm-modal.GD-modal.mud-dialog {
    height: unset !important;
    max-height: unset !important;
    min-height: unset !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
}


    .gdconfirm-modal.GD-modal.mud-dialog.leave-channel {
        height: unset !important;
        width: 40vw;
    }

    .gdconfirm-modal.GD-modal.mud-dialog.join-channel {
        height: unset !important;
        width: 40vw;
    }

.cursor-pointer {
    cursor: pointer !important;
}

.reel-square-media {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 12px !important;
    overflow: hidden;
    object-fit: cover !important;
    display: block;
}

    .reel-square-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 12px !important;
        display: block;
    }

    .mud-image.reel-square-media img,
    .reel-square-media.object-fill,
    .reel-square-media.object-fill img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }

.reel-square-fallback .initials-avatar, .reel-square-fallback .initials-avatar-fill-parent, .reel-square-fallback .initials-avatar-large {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 12px !important;
}

.reel-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    isolation: isolate;
    background: #f5f5f5;
}

.reel-image-wrapper-alt {
    border-top-right-radius: 12px !important;
}

.reel-overlay-bar {
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: -1px;
    z-index: 2;
    padding: 0.5rem 0.625rem;
    border-radius: 0 0 12px 12px;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    line-height: 1.25;
    display: flex;
    flex-direction: column;
}

.reel-overlay-title {
    margin: 0 !important;
    display: inline;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    line-height: 1.25;
    vertical-align: middle;
    font-size: 0.75rem;
}

.reel-overlay-title-row {
    display: inline;
    line-height: 1.25;
}

.reel-overlay-summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.7rem;
    line-height: 1.3;
    margin-top: 0.5rem;
    color: var(--darkerBlue);
    opacity: 0.8;
}

.reel-publication-card-mobile .reel-overlay-title {
    font-size: 10px !important;
}

.reel-publication-card-mobile .reel-overlay-summary {
    font-size: 10px !important;
}

.reel-tag-inline {
    display: inline-flex;
    flex-shrink: 0;
    margin: 0;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.reel-tag-click-area {
    display: inline-flex;
    width: fit-content;
}

.reel-publication-card {
    transition: transform 0.2s ease;
    transform-origin: center;
}

    .reel-publication-card::before {
        display: none !important;
    }

    .reel-publication-card:hover {
        transform: scale(1.02);
    }

/* Mobile publication card: full-width, square corners, header above photo */
.reel-publication-card-mobile {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 0 !important;
}

    .reel-publication-card-mobile:hover {
        transform: none !important;
    }

    .reel-publication-card-mobile .reel-image-wrapper,
    .reel-publication-card-mobile .reel-square-media,
    .reel-publication-card-mobile .reel-square-media img,
    .reel-publication-card-mobile .reel-video-thumbnail,
    .reel-publication-card-mobile .reel-video-preview,
    .reel-publication-card-mobile .reel-overlay-bar,
    .reel-publication-card-mobile .reel-square-fallback .initials-avatar,
    .reel-publication-card-mobile .reel-square-fallback .initials-avatar-fill-parent,
    .reel-publication-card-mobile .reel-square-fallback .initials-avatar-large {
        border-radius: 0 !important;
    }

.reel-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
}

.reel-mobile-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.reel-mobile-avatar.mud-avatar {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

.reel-mobile-author-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 10rem;
    font-size: 11px !important;
}

.reel-mobile-time {
    flex-shrink: 0;
    font-size: 11px !important;
}

.reel-publication-card-mobile .reel-footer-row .mud-typography,
.reel-publication-card-mobile .reel-footer-row .mud-icon-root {
    font-size: 11px !important;
}

.reel-publication-card-mobile .reel-footer-row {
    padding-top: 0.25rem !important;
}

.reel-publication-card-mobile .reel-footer-row > .mud-container:first-child {
    gap: 0.5rem !important;
}

.reel-footer-row {
    border-radius: 0.6rem;
}

    .reel-footer-row svg.mud-error-text {
        color: var(--mud-palette-error) !important;
    }

.reel-corner-button {
    width: 2.35rem;
    height: 2.35rem;
    min-width: 2.35rem !important;
    min-height: 2.35rem !important;
    border-radius: 50% !important;
    padding: 0 !important;
    background-color: var(--mud-palette-orange-accent) !important;
    color: white !important;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.reel-corner-anchor {
    position: absolute;
    top: -0.55rem;
    right: -0.55rem;
    z-index: 3;
    display: inline-flex;
}

.reel-corner-button:hover {
    transform: scale(1.05);
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.reel-corner-button .mud-icon-root {
    transform: translate(-2px, 2px);
}


/* Reel Publication Admin Actions */
.reel-admin-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.reel-publication-card:hover .reel-admin-actions {
    opacity: 1;
}

.reel-admin-actions button {
    transition: all 0.2s ease;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.55) !important;
}

    .reel-admin-actions button:hover {
        transform: scale(1.1);
        background-color: #fff !important;
    }

.reel-admin-actions .edit-btn {
    color: var(--medium-gray) !important;
}

.reel-admin-actions .delete-btn {
    color: var(--medium-gray) !important;
}

.shared-publication-page {
    position: relative;
}

.shared-publication-scroll-content {
    padding-bottom: 8rem;
}

.shared-publication-fixed-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background-color: var(--primary-surface-light);
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.publication-content-full-image {
    width: 100% !important;
    height: 18rem !important;
    max-height: 18rem;
    object-fit: cover !important;
    border-radius: 0.75rem;
    display: block;
}

    .mud-image.publication-content-full-image img,
    .publication-content-full-image.object-fill,
    .publication-content-full-image.object-fill img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }
/* Clickable parent username in replies */
.parent-username-link {
    cursor: pointer;
    transition: text-decoration 0.2s ease;
}

    .parent-username-link:hover {
        text-decoration: underline;
    }

/* Highlight animation when scrolling to a comment */
@keyframes commentHighlight {
    0% {
        background-color: rgba(var(--mud-palette-secondary-blue-rgb, 25, 118, 210), 0.15);
    }

    100% {
        background-color: transparent;
    }
}

.comment-highlight {
    animation: commentHighlight 1.5s ease-out;
    border-radius: 0.5rem;
}


/* Video thumbnail preview in reel cards */
.reel-video-thumbnail {
    width: 100%;
    aspect-ratio: 4 / 5; 
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #000;
}

.reel-video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    pointer-events: none;
}

.reel-video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
}

.reel-video-play-icon {
    font-size: 3.5rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s ease, color 0.2s ease;
}

.reel-publication-card:hover .reel-video-play-icon {
    transform: scale(1.1);
    color: rgba(255, 255, 255, 1) !important;
}

.article-modal-reel-preview:hover .reel-video-play-icon {
    transform: none !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ??????????????????????????????????????????????
   Constrained video player inside modal body.
   The outer wrapper clips the fluid Video.js player
   to a max height so the control bar stays visible
   without any scrollbar.
   ?????????????????????????????????????????????? */

.modal-video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000;
    border-radius: 16px;
    overflow: hidden; 
}

    /* Video.js fluid mode uses padding-top on this div to maintain aspect ratio.
   We override it to fill the constrained container instead. */
    .modal-video-container .video-js {
        width: 100% !important;
        height: 100% !important;
    }

        /* Make the actual <video> element fill and fit within the container */
        .modal-video-container .video-js .vjs-tech {
            object-fit: contain;
            width: 100% !important;
            height: 100% !important;
        }


        /* Keep the control bar pinned at the bottom of the wrapper */
        .modal-video-container .video-js .vjs-control-bar {
            position: absolute !important;
            bottom: 0 !important;
            left: 0 !important;
            right: 0 !important;
            width: 100% !important;
        }

        /* ?? Fullscreen: remove ALL modal constraints ?? */
        .modal-video-container .video-js.vjs-fullscreen,
        .modal-video-container .video-js.vjs-fullscreen .vjs-tech {
            width: 100% !important;
            height: 100% !important;
            max-height: none !important;
            object-fit: contain;
        }  


.read-more-text a,
.read-more-text a:visited {
    color: var(--mud-palette-primary) !important;
    text-decoration: underline !important;
}

/* Media Image Cropper */
.media-cropper {
    width: 100%;
}

.media-cropper-host {
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
}

    .media-cropper-host .cr-boundary {
        border-radius: 0.75rem;
    }

    .media-cropper-host .cr-viewport {
        border-radius: 0.5rem !important;
        border: 2px solid rgba(255, 255, 255, 0.7) !important;
    }

.media-cropper-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
}

.media-recrop-btn {
    transition: transform 0.2s ease !important;
}

.media-recrop-btn:hover {
    transform: scale(1.08) !important;
}

.modal-delete-image-btn {
    background-color: var(--mud-palette-error) !important;
    color: #fff !important;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
}

    .modal-delete-image-btn:hover {
        transform: scale(1.06) !important;
        background-color: color-mix(in srgb, var(--mud-palette-error) 80%, #000 20%) !important;
        color: #fff !important;
    }

    .modal-delete-image-btn .mud-icon-root {
        color: #fff !important;
    }
