/* media-viewer.css */
.media-viewer {

    /* Custom styles for media viewer modal */
    #mediaModal .modal-title {
        font-size: 1.25rem;
        /* Decrease modal title font size */
    }

    /* Constrain the maximum size of the thumbnail image */
    #mediaModal img,
    #mediaModal video {
        max-width: 100%;
        max-height: 400px;
        /* Adjust the maximum height as needed */
        width: auto;
        height: auto;
        display: block;
        margin: 0 auto;
        /* Center the image horizontally */
    }

    /* Custom styles for tabbed content */
    .custom-tabs {
        list-style: none;
        padding: 0;
        display: flex;
        border-bottom: 1px solid #ddd;
        margin-bottom: 10px;
        flex-wrap: wrap;
        /* Allow tabs to wrap on small screens */
    }

    .custom-tab-link {
        cursor: pointer;
        padding: 10px 20px;
        margin-right: 5px;
        border: 1px solid #ddd;
        border-bottom: none;
        color: var(--primary-color);
        /* Adjust color as needed */
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        /* Center the text and icon */
        flex: 1 0 auto;
        /* Allow tabs to grow/shrink */
    }

    .custom-tab-link i {
        margin-right: 5px;
    }

    .custom-tab-link.active {
        background-color: var(--background-color);
        font-weight: bold;
    }

    .custom-tab-content {
        display: none;
    }

    .custom-tab-content.active {
        display: block;
    }

    .custom-tab-content .card-body {
        padding: 15px;
    }

    /* Custom styles for loading spinner */
    #loadingSpinner {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background-color: rgba(255, 255, 255, 0.8);
        z-index: 1050;
        display: none;
        /* Initially hidden */
    }

    /* Custom styles for navigation buttons */
    .navigate-prev,
    .navigate-next {
        color: var(--second-accent-color);
        /* Subtle grey color */
        text-decoration: none;
    }

    .navigate-prev i,
    .navigate-next i {
        font-size: 1.5rem;
        /* Adjust the size as needed */
    }

    /* Custom styles for people items */
    .people-item {
        display: flex;
        align-items: center;
        margin-bottom: 15px;
    }

    .people-item .placeholder-icon {
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        margin-right: 10px;
        color: var(--white-color);
        overflow: hidden;
    }

    .people-item .placeholder-icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .people-item .people-info {
        flex-grow: 1;
    }

    .people-item .people-name {
        font-weight: bold;
    }

    .rtl-text {
        direction: rtl;
        text-align: right !important;
    }

    .people-item .people-role {
        color: var(--second-accent-color);
    }

    /* Custom styles for chips */
    .chip {
        display: inline-block;
        padding: 0.25rem 0.75rem;
        /* Adjust padding */
        margin: 0.25rem;
        border-radius: 16px;
        background-color: var(--primary-color);
        /* Background color */
        color: var(--white-color);
        /* Text color */
        font-size: 1rem;
        /* Adjust font size */
        font-weight: 500;
    }

    /* Custom styles for download button */
    .download-btn,
    .deleteButton,
    #edit-file {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
        color: var(--white-color);
    }

    .download-btn:hover,
    .deleteButton:hover,
    #edit-file:hover {
        background-color: var(--secondary-color);
        border-color: var(--secondary-color);
    }

    /* Custom styles for full-screen button */
    .toggle-fullscreen {
        color: var(--primary-color);
        font-size: 1.5rem;
    }

    .icon {
        width: 15px;
    }

    /* Media queries for responsiveness */
    @media (max-width: 576px) {
        .custom-tab-link {
            font-size: 0.875rem;
            padding: 5px 10px;
        }

        .custom-tab-content .card-body {
            padding: 10px;
            word-wrap: break-word;
        }

        .navigate-prev i,
        .navigate-next i {
            font-size: 1.25rem;
        }

        .people-item .placeholder-icon {
            width: 40px;
            height: 40px;
        }

        .people-item .people-name {
            font-size: 0.875rem;
        }

        .people-item .people-role {
            font-size: 0.75rem;
        }

        .chip {
            font-size: 0.875rem;
        }
    }

    /* Ensure full coverage and responsive scaling of images and videos */
    .media-container img,
    .media-container video {
        /* width: 100%; */
        height: auto;
        /* max-width: 512px; */
        max-height: 512px;
        display: block;
    }

    /* Mobile view adjustments */
    /* @media (max-width: 768px) { */
    /* Position navigation buttons on the image */
    .media-container {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navigate-next,
    .navigate-prev {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
        border: none;
        padding: 10px;
        z-index: 10;
        cursor: pointer;
    }

    .navigate-next {
        right: 10px;
    }

    .navigate-prev {
        left: 10px;
    }

    .navigate-next i,
    .navigate-prev i {
        font-size: 1.5rem;
    }

    .navigate-next,
    .navigate-prev {
        width: 40px;
        height: 40px;
        padding: 5px;
    }

    /* } */


    .post-card {
        padding: 12px;
        position: relative;
        transition: transform 0.3s ease;
        border: none;
    }

    .user-profile {
        cursor: pointer;
    }

    .post-description {
        text-align: left;
    }

    .user-profile-name {
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: bold;
        margin-left: 5px;
        color: var(--accent-color);
    }

    .username {
        color: var(--secondary-color);
        font-size: 0.8rem;
        font-weight: bold;
        margin-left: 5px;
        cursor: pointer;
        letter-spacing: 1px;
    }

    .posted-date {
        font-size: 0.8rem;
        color: var(--secondary-color);
        font-weight: bold;
    }

    #confirmEditButton {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

    #confirmEditButton:hover {
        background-color: var(--secondary-color);
        border-color: var(--secondary-color);
    }

    #text-content img {
        width: 100%;
    }

}