/*  notifications.css
    Purpose        Desktop + mobile notification system:
                     • bell-icon badge
                     • dropdown lists with unread-dot + delete
                     • full-screen / inline modal viewer
                     • two mobile break-points (≤ 768 px portrait, ≤ 932 px landscape)

    Load-order     After Font-Awesome (icons) and core theme, before notification JS:
                     <link rel="stylesheet" href="css/core-theme.css">
                     <link rel="stylesheet" href="css/notifications.css">

    Last updated   31 Jul 2025
*/


/*// =========================================
// NOTIFICATION DESKTOP
// =========================================*/

/*// =========================================
// 1. Notification Icon
// =========================================*/

html {
    overflow-y: scroll !important; /* Always show the vertical scrollbar */
}


.notification-icon {
    position: relative;
    cursor: pointer;
    z-index: 10000;
}

.notification-icon .fas {
    font-size: 24px;
    color: white; /* Icon color */
}

.notification-icon .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    display: none; /* Hidden by default */
}

/*// =========================================
// 2. Dropdown Menu
// =========================================*/

.notifications-dropdown {
    position: absolute;
    top: 50px;
    right: 10px;
    width: 600px;
    max-height: 400px;
    background-color: #1e1e1e;
    color: white;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.notifications-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notifications-dropdown li {
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    background-color: transparent;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: background-color 0.2s ease-in-out;
    cursor: pointer !important; /* Change cursor to pointer on hover */
}

.notifications-dropdown li.unread {
    font-weight: bold; /* Highlight unread notifications */
    position: relative;
}

.notifications-dropdown li.unread .notification-dot {
    width: 10px;
    height: 10px;
    background-color: #de6075;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    display: inline-block;
    flex-shrink: 0; /* Prevent shrinking in flex containers */
    aspect-ratio: 1; /* Ensure equal width and height */
}

.notifications-dropdown li .notification-dot {
    display: none; /* Hidden by default */
}

.notifications-dropdown li.unread .notification-dot {
    display: inline-block;
}

.notifications-dropdown li .notification-content {
    flex-grow: 1;
}

.notifications-dropdown li .notification-content strong {
    display: flex;
    align-items: center;
}

.notifications-dropdown li .notification-content p {
    margin: 5px 0;
}

.notifications-dropdown li .notification-content small {
    color: #ccc;
    font-size: 12px;
}

.notifications-dropdown li:hover {
    background-color: #4EA1D3 !important;
    color: #fff;
}

.notifications-dropdown li:nth-child(odd) {
    background-color: #2c3e50;
}

.notifications-dropdown li:nth-child(even) {
    background-color: #354b63;
}

.notifications-dropdown li:last-child {
    border-bottom: none;
}

/*// =========================================
// 3. Delete Notification Button
// =========================================*/

.delete-notification {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 10px;

}

.delete-notification i {
    color: #de6075;
    font-size: 18px;
    transition: color 0.3s ease;
}

.delete-notification i:hover {
    color: #e33b3b;
}




/*// =========================================
// NOTIFICATION MODAL
// =========================================*/

/*// =========================================
// 1. Modal Background
// =========================================*/


.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

/*// =========================================
// 2. Modal Content
// =========================================*/

.notification-modal-content {
    background-color: #333;
    color: white;
    padding: 30px 50px;
    border-radius: 10px;
    width: 95%;
    max-width: 1000px;
    max-height: 70vh;
    margin: 0 auto;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notification-modal-content p,
.notification-modal-content small {
    word-wrap: break-word;
    margin-bottom: 15px;
}

.notification-modal-content small {
    display: block;
    color: #ccc;
    font-size: 14px;
    margin-top: 10px;
}

/*// =========================================
// 3. Modal Title
// =========================================*/

.notification-modal-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1px;
}

.notification-modal-title-wrapper h2 {
    margin: 0;
    font-size: 1.5em;
    flex-grow: 1;
    color: white;
    text-align: left !important;
}

/*// =========================================
// 4. Modal Controls
// =========================================*/

.modal-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.modal-controls button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: white;
    transition: color 0.3s ease;
}

.modal-controls button:hover {
    color: #ccc;
}

i.fas.fa-expand::before {
    margin-right: -200px !important;
}

button.fullscreen-toggle {
    margin-top: 1px;
    z-index: 5000;
}

.delete-notification {

}

.modal-controls .fullscreen-toggle:hover {
    color: #ccc;
}

.modal-controls .delete-notification {
    color: white;
}

.modal-controls .delete-notification:hover {
    color: #de6075;
}

/*// =========================================
// 5. Fullscreen Modal
// =========================================*/

.notification-modal.fullscreen .notification-modal-content {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    padding: 50px 80px;
    box-shadow: none;
    overflow-y: auto;
}

.notification-modal.fullscreen #notification-modal-content {
    margin: 30px 50px;
    line-height: 1.6;
    color: white;
}

/*// =========================================
// 6. Signature and Timestamps
// =========================================*/

.notification-signature {
    margin-top: -20px;
    font-style: italic;
    color: #ccc;
}

.notification-modal-content small {
    display: block;
    margin-top: -15px;
    color: #ccc;
    font-size: 14px;
}

.manage-notifications {
    margin-top: -50px;
    margin-left: -45px;
    font-size: 14px;
}
.manage-notifications-link {
    color: #4EA1D3;
    text-decoration: none;
    font-weight: bold;
}
.manage-notifications-link:hover {
/*    text-decoration: underline;*/
    color: #3b8bb1;
}




/* =========================================
   NOTIFICATION MOBILE
========================================= */

/*// =========================================
// 1. Notification Icon
// =========================================*/

/* Mobile-Specific Styles */
@media screen and (max-width: 768px) {
    /* Container for notification and video help icons */
    .mobile-navbar-icons {
        display: flex;
        align-items: center;
        justify-content: flex-end; /* Align icons to the right */
        gap: 10px; /* Space between icons */
        position: absolute;
        right: 10px; /* Adjust placement to the right of the navbar */
        top: 15px; /* Vertical alignment in the navbar */
    }

    /* Notification Icon for Mobile */
    .mobile-notification-icon {
        position: relative;
        cursor: pointer;
        font-size: 18px; /* Consistent size for mobile */
        color: white;
        display: inline-flex; /* Ensures inline alignment */
        align-items: center;
        justify-content: center;
        z-index: 5001;
    }

    /* Notification Badge for Mobile */
    .mobile-notification-icon .badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background-color: red;
        color: white;
        font-size: 10px;
        font-weight: bold;
        padding: 2px 5px;
        border-radius: 50%;
        display: none; /* Hidden by default */
    }

    i.fas.fa-bell::before {
        font-size: 20px;
        padding-right: 5px;
    }
}


/*// =========================================
// 2. Dropdown Menu
// =========================================*/

@media screen and (max-width: 768px) {
    /* Mobile Notifications Dropdown */
    .mobile-notifications-dropdown {
        position: absolute;
        top: 50px;
        right: 5px;
        width: 90%;
        max-width: 350px;
        max-height: 500px;
        background-color: #1e1e1e;
        color: white;
        border-radius: 5px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        padding: 10px;
        overflow-y: auto;
        z-index: 2000;
    }

    .mobile-notifications-dropdown ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-notifications-dropdown li {
        padding: 12px 15px;
        border-bottom: 1px solid #333;
        display: flex; /* Flexbox for horizontal alignment */
        align-items: center; /* Align items vertically */
        background-color: transparent;
        transition: background-color 0.2s ease-in-out;
        cursor: pointer;
        position: relative; /* Enable positioning for child elements */
    }

    /* Title and Red Dot Alignment */
    .mobile-notifications-dropdown li.unread strong {
        display: flex;
        align-items: center;
        font-size: 14px;
        font-weight: bold; /* Emphasize unread titles */
    }

    .mobile-notifications-dropdown li.unread .notification-dot {
        width: 10px;
        height: 10px;
        background-color: #de6075;
        border-radius: 50%;
        margin-right: 10px; /* Space between dot and title */
        display: inline-block;
        flex-shrink: 0; /* Prevent shrinking in flex containers */
        aspect-ratio: 1; /* Ensure equal width and height */
    }

    .mobile-notifications-dropdown li .notification-dot {
        display: none; /* Hidden by default */
    }

    .mobile-notifications-dropdown li.unread .notification-dot {
        display: inline-block; /* Show red dot for unread messages */
    }

    /* Content (e.g., body text, metadata) */
    .mobile-notifications-dropdown li .notification-content {
        flex-grow: 1; /* Allow content to take up remaining space */
        margin-left: 10px; /* Prevent overlap with red dot and title */
    }

    .mobile-notifications-dropdown li .notification-content p {
        margin: 5px 0;
        font-size: 12px;
        line-height: 1.4;
        color: #ccc;
    }

    .mobile-notifications-dropdown li .notification-content small {
        color: #777;
        font-size: 10px;
    }

    /* Delete Button Alignment */
    .mobile-notifications-dropdown li .delete-notification {
        background: none;
        border: none;
        cursor: pointer;
        align-self: center; /* Ensure it aligns horizontally with the title */
        margin-left: 10px; /* Space from content */
    }

    .mobile-notifications-dropdown li .delete-notification i {
        color: #de6075;
        font-size: 18px;
        transition: color 0.3s ease;
    }

    .mobile-notifications-dropdown li .delete-notification i:hover {
        color: #e33b3b;
    }

    /* Hover Effect */
    .mobile-notifications-dropdown li:hover {
        background-color: #4EA1D3;
        color: #fff;
    }

    .notifications-dropdown li:nth-child(odd) {
        background-color: #2c3e50;
    }

    .notifications-dropdown li:nth-child(even) {
        background-color: #354b63;
    }

    .mobile-notifications-dropdown li:last-child {
        border-bottom: none;
    }
}


    /* Delete Notification Button */
    .delete-notification {
        background: none;
        border: none;
        cursor: pointer;
        margin-left: 8px; /* Spacing for icon */
        align-self: flex-start; /* Align delete button to the top */
    }

    .delete-notification i {
        color: #de6075;
        font-size: 16px !important; /* Increase visibility for touch */
        transition: color 0.3s ease;
    }

    .delete-notification i:hover {
        color: #e33b3b;
    }
}

/*// =========================================
// 3. Notfication Modal
// =========================================*/


@media screen and (max-width: 768px) {
    /* Mobile-specific Modal Styles */
    .notification-modal.mobile-modal {
        display: flex; /* Ensure the modal is visible */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%; /* Fullscreen width */
        height: 100%; /* Fullscreen height */
        background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
        align-items: center;
        justify-content: center;
        z-index: 2000; /* Keep above other elements */
        overflow: hidden; /* Prevent scrolling behind modal */
    }

    .notification-modal-content {
        background-color: #333; /* Modal background color */
        color: white;
        padding: 20px; /* Adjust padding for better readability */
        border-radius: 8px;
        width: 90%; /* Take up most of the screen width */
        max-width: 480px; /* Constrain the width */
        max-height: 80vh; /* Limit height to viewport */
        font-size: 14px; /* Reduce font size for mobile */
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); /* Add subtle shadow */
        overflow-y: auto; /* Enable vertical scrolling for long content */
        position: relative;
    }

    /* Title and Header Adjustments */
    .notification-modal-title-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px; /* Space below the title */
        text-align: left !important;
    }



    .notification-modal-title-wrapper h2 {
        font-size: 1.2em; /* Adjust font size for smaller screens */
        margin: 0;
        flex: 1; /* Allow the title to take up available space */
    }

    /* Control Buttons */
    .modal-controls {
        display: flex;
        gap: 10px; /* Space between buttons */
    }

    .modal-controls button {
        font-size: 16px; /* Slightly smaller button icons for mobile */
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        transition: color 0.3s ease;
    }

    .modal-controls button:hover {
        color: #ccc; /* Change color on hover */
    }

    .modal-controls .fullscreen-toggle i,
    .modal-controls .delete-notification i {
        font-size: 18px; /* Ensure buttons are touch-friendly */
    }

    /* Metadata and Content Adjustments */
    #notification-modal-content,
    .notification-signature,
    #notification-modal-timestamp {
        font-size: 14px; /* Maintain consistency for text readability */
        line-height: 1.5; /* Improve readability */
    }

    #notification-modal-content {
        margin-top: 10px;
        color: #f0f0f0; /* Softer color for content */
    }

    #notification-modal-timestamp {
        color: #bbb; /* Subtle color for metadata */
        font-size: 12px; /* Slightly smaller font size */
        margin-top: 5px;
    }


    .notification-signature {
        font-size: 12px; /* Smaller signature text */
        color: #aaa; /* Softer color for the signature */
        margin-top: 15px;
        text-align: left;
    }

    /* Fullscreen Modal for Mobile */
    .notification-modal.fullscreen .notification-modal-content {
        width: 100%; /* Full width */
        height: 100%; /* Full height */
        max-width: none;
        max-height: none;
        border-radius: 0;
        padding: 20px; /* Maintain padding */
        overflow-y: auto; /* Allow scrolling */
    }


}




/* =========================================
   NOTIFICATION MOBILE
========================================= */

/*// =========================================
// 1. Notification Icon
// =========================================*/

/* Mobile-Specific Styles */
@media screen and (max-width: 932px) and (orientation: landscape) {
    /* Container for notification and video help icons */
    .mobile-navbar-icons {
        display: flex;
        align-items: center;
        justify-content: flex-end; /* Align icons to the right */
        gap: 10px; /* Space between icons */
        position: absolute;
        right: 10px; /* Adjust placement to the right of the navbar */
        top: 15px; /* Vertical alignment in the navbar */
    }

    /* Notification Icon for Mobile */
    .mobile-notification-icon {
        position: relative;
        cursor: pointer;
        font-size: 18px; /* Consistent size for mobile */
        color: white;
        display: inline-flex; /* Ensures inline alignment */
        align-items: center;
        justify-content: center;
        z-index: 5001;
    }

    /* Notification Badge for Mobile */
    .mobile-notification-icon .badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background-color: red;
        color: white;
        font-size: 10px;
        font-weight: bold;
        padding: 2px 5px;
        border-radius: 50%;
        display: none; /* Hidden by default */
    }

    i.fas.fa-bell::before {
        font-size: 20px;
        padding-right: 5px;
    }
}


/*// =========================================
// 2. Dropdown Menu
// =========================================*/

@media screen and (max-width: 932px) and (orientation: landscape) {
    /* Mobile Notifications Dropdown */
    .mobile-notifications-dropdown {
        position: absolute;
        top: 50px;
        right: 5px;
        width: 90%;
        max-width: 700px;
        max-height: 500px;
        background-color: #1e1e1e;
        color: white;
        border-radius: 5px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        padding: 10px;
        overflow-y: auto;
        z-index: 2000;
    }

    .mobile-notifications-dropdown ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-notifications-dropdown li {
        padding: 12px 15px;
        border-bottom: 1px solid #333;
        display: flex; /* Flexbox for horizontal alignment */
        align-items: center; /* Align items vertically */
        background-color: transparent;
        transition: background-color 0.2s ease-in-out;
        cursor: pointer;
        position: relative; /* Enable positioning for child elements */
    }

    /* Title and Red Dot Alignment */
    .mobile-notifications-dropdown li.unread strong {
        display: flex;
        align-items: center;
        font-size: 14px;
        font-weight: bold; /* Emphasize unread titles */
    }

    .mobile-notifications-dropdown li.unread .notification-dot {
        width: 10px;
        height: 10px;
        background-color: #de6075;
        border-radius: 50%;
        margin-right: 10px; /* Space between dot and title */
        display: inline-block;
        flex-shrink: 0; /* Prevent shrinking in flex containers */
        aspect-ratio: 1; /* Ensure equal width and height */
    }

    .mobile-notifications-dropdown li .notification-dot {
        display: none; /* Hidden by default */
    }

    .mobile-notifications-dropdown li.unread .notification-dot {
        display: inline-block; /* Show red dot for unread messages */
    }

    /* Content (e.g., body text, metadata) */
    .mobile-notifications-dropdown li .notification-content {
        flex-grow: 1; /* Allow content to take up remaining space */
        margin-left: 10px; /* Prevent overlap with red dot and title */
    }

    .mobile-notifications-dropdown li .notification-content p {
        margin: 5px 0;
        font-size: 12px;
        line-height: 1.4;
        color: #ccc;
    }

    .mobile-notifications-dropdown li .notification-content small {
        color: #777;
        font-size: 10px;
    }

    /* Delete Button Alignment */
    .mobile-notifications-dropdown li .delete-notification {
        background: none;
        border: none;
        cursor: pointer;
        align-self: center; /* Ensure it aligns horizontally with the title */
        margin-left: 10px; /* Space from content */
    }

    .mobile-notifications-dropdown li .delete-notification i {
        color: #de6075;
        font-size: 18px;
        transition: color 0.3s ease;
    }

    .mobile-notifications-dropdown li .delete-notification i:hover {
        color: #e33b3b;
    }

    /* Hover Effect */
    .mobile-notifications-dropdown li:hover {
        background-color: #4EA1D3;
        color: #fff;
    }

    .notifications-dropdown li:nth-child(odd) {
        background-color: #2c3e50;
    }

    .notifications-dropdown li:nth-child(even) {
        background-color: #354b63;
    }

    .mobile-notifications-dropdown li:last-child {
        border-bottom: none;
    }
}


    /* Delete Notification Button */
    .delete-notification {
        background: none;
        border: none;
        cursor: pointer;
        margin-left: 8px; /* Spacing for icon */
        align-self: flex-start; /* Align delete button to the top */
    }

    .delete-notification i {
        color: #de6075;
        font-size: 16px !important; /* Increase visibility for touch */
        transition: color 0.3s ease;
    }

    .delete-notification i:hover {
        color: #e33b3b;
    }
}

/*// =========================================
// 3. Notfication Modal
// =========================================*/


@media screen and (max-width: 932px) and (orientation: landscape) {
    /* Mobile-specific Modal Styles */
    .notification-modal.mobile-modal {
        display: flex; /* Ensure the modal is visible */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%; /* Fullscreen width */
        height: 100%; /* Fullscreen height */
        background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
        align-items: center;
        justify-content: center;
        z-index: 2000; /* Keep above other elements */
        overflow: hidden; /* Prevent scrolling behind modal */
    }

    .notification-modal-content {
        background-color: #333; /* Modal background color */
        color: white;
        padding: 20px; /* Adjust padding for better readability */
        border-radius: 8px;
        width: 90%; /* Take up most of the screen width */
        max-width: 480px; /* Constrain the width */
        max-height: 80vh; /* Limit height to viewport */
        font-size: 14px; /* Reduce font size for mobile */
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); /* Add subtle shadow */
        overflow-y: auto; /* Enable vertical scrolling for long content */
        position: relative;
    }

    /* Title and Header Adjustments */
    .notification-modal-title-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px; /* Space below the title */
        text-align: left !important;
    }

    .notification-modal-title-wrapper h2 {
        font-size: 1.2em; /* Adjust font size for smaller screens */
        margin: 0;
        flex: 1; /* Allow the title to take up available space */
    }

    /* Control Buttons */
    .modal-controls {
        display: flex;
        gap: 10px; /* Space between buttons */
    }

    .modal-controls button {
        font-size: 16px; /* Slightly smaller button icons for mobile */
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        transition: color 0.3s ease;
    }

    .modal-controls button:hover {
        color: #ccc; /* Change color on hover */
    }

    .modal-controls .fullscreen-toggle i,
    .modal-controls .delete-notification i {
        font-size: 18px; /* Ensure buttons are touch-friendly */
    }

    /* Metadata and Content Adjustments */
    #notification-modal-content,
    .notification-signature,
    #notification-modal-timestamp {
        font-size: 14px; /* Maintain consistency for text readability */
        line-height: 1.5; /* Improve readability */
    }

    #notification-modal-content {
        margin-top: 10px;
        color: #f0f0f0; /* Softer color for content */
    }

    #notification-modal-timestamp {
        color: #bbb; /* Subtle color for metadata */
        font-size: 12px; /* Slightly smaller font size */
        margin-top: 5px;
    }

    .notification-signature {
        font-size: 12px; /* Smaller signature text */
        color: #aaa; /* Softer color for the signature */
        margin-top: 15px;
        text-align: left;
    }

    /* Fullscreen Modal for Mobile */
    .notification-modal.fullscreen .notification-modal-content {
        width: 100%; /* Full width */
        height: 100%; /* Full height */
        max-width: none;
        max-height: none;
        border-radius: 0;
        padding: 20px; /* Maintain padding */
        overflow-y: auto; /* Allow scrolling */
    }

}

