﻿/* ===== MODAL OVERLAY ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* ===== MODAL CONTAINER ===== */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    width: 60%;
    max-height: 85vh;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 15px;
    border-bottom: 1px solid #eee;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    /* Title */
    .modal-header h2 {
        margin: 0;
        font-size: 20px;
    }

/* Center buttons */
.tab-buttons {
    position: absolute;
    left: 78%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

/* Close button */
.close-btn {
    font-size: 30px;
    cursor: pointer;
}

/* ===== SCROLLABLE CONTENT ===== */
#trendingContent {
    overflow-y: auto;
    padding: 15px;
}

    /* Scrollbar */
    #trendingContent::-webkit-scrollbar {
        width: 6px;
    }

    #trendingContent::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 10px;
    }

/* ===== ANIMATION ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/*new*/
@media (max-width: 768px) {

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

        /* Heading */
        .modal-header h2 {
            font-size: 18px;
        }

    /* REMOVE absolute positioning */
    .tab-buttons {
        position: static;
        transform: none;
        width: 100%;
        display: flex;
        justify-content: flex-start;
        gap: 10px;
    }

        /* Buttons smaller */
        /*.tab-buttons a {
            font-size: 12px;
            padding: 5px 10px;
        }*/

    /* Close button to top-right */
    .close-btn {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 24px;
    }

    /* Fix found-actions alignment */
    #divfoundheaderTrending {
        margin-left: 0 !important;
        width: 100%;
    }
}

/* This targets the main Fancybox container and forces it above your modal */
.fancybox-wrap {
    z-index: 10001 !important;
}

/* You also need to move the semi-transparent background (overlay) up */
.fancybox-overlay {
    z-index: 10000 !important;
}

/* Force the "Loading/Processing" scroller to the very top */
#fancybox-loading, .fancybox-loading {
    z-index: 10002 !important;
}