html {
  font-size: 14px;
}

.fixed-bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050; /* Ensure it's above other content */
    max-width: 300px; /* Limit width for better appearance */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
/* [0] */
@font-face {
    font-family: 'Noto Color Emoji';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/NotoColorEmoji-Regular.woff2) format('woff2');
}

body {
    --google-font-color-notocoloremoji: colrv1;
}

.table{
    border:black !important;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.btn-lock {
    display: inline-block;
    background: #ff5b5b;
    width: 32px;
    height:32px;
    box-sizing: border-box;
    padding: 1px 0 0 3px;
    border-radius: 50%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

    .btn-lock svg {
        fill: none;
        transform: translate3d(0, 0, 0);
    }

        .btn-lock svg .bling {
            stroke: #fff;
            stroke-width: 2.5;
            stroke-linecap: round;
            stroke-dasharray: 3;
            stroke-dashoffset: 15;
            transition: all 0.3s ease;
        }

        .btn-lock svg .lock {
            stroke: #fff;
            stroke-width: 4;
            stroke-linejoin: round;
            stroke-linecap: round;
            stroke-dasharray: 36;
            transition: all 0.4s ease;
        }

        .btn-lock svg .lockb {
            fill: #fff;
            fill-rule: evenodd;
            clip-rule: evenodd;
            transform: rotate(8deg);
            transform-origin: 14px 20px;
            transition: all 0.2s ease;
        }

#encrypt {
    display: none;
}

    #encrypt:checked + label {
        background: #20cca5;
    }

        #encrypt:checked + label svg {
            opacity: 1;
        }

        #encrypt:checked + label svg .bling {
            animation: bling6132 0.3s linear forwards;
            animation-delay: 0.2s;
        }

        #encrypt:checked + label svg .lock {
            stroke-dasharray: 48;
            animation: locked 0.3s linear forwards;
        }

        #encrypt:checked + label svg .lockb {
            transform: rotate(0);
            transform-origin: 14px 22px;
        }

@keyframes bling6132 {
    50% {
        stroke-dasharray: 3;
        stroke-dashoffset: 12;
    }

    100% {
        stroke-dasharray: 3;
        stroke-dashoffset: 9;
    }
}

@keyframes locked {
    50% {
        transform: translateY(1px);
    }
}
.p9 {
padding-left:9px;
}

.form-inline {

margin-right:10px;
}

/* Search highlighting styles */
mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

[data-bs-theme="dark"] mark {
    background-color: #664d03;
    color: #fff3cd;
}

/* Table improvements */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Search form improvements */
.search-highlight {
    transition: all 0.3s ease;
}

.search-highlight:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Daily calendar view improvements for mobile */
    .card-header h5 {
        font-size: 1rem;
    }
    
    .card-body .border.rounded.p-2.mb-2 {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .card-body .border.rounded.p-2.mb-2 .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .card-body .border.rounded.p-2.mb-2 .d-flex.justify-content-between strong {
        font-size: 1rem;
    }
    
    .card-body .border.rounded.p-2.mb-2 .btn-sm {
        width: 100%;
        margin-top: 0.25rem;
    }
}

/* Message threading styles */
.thread-reply td:first-child {
    padding-left: 30px;
    background-image: linear-gradient(to right, transparent 10px, #007bff 10px, #007bff 14px, transparent 14px);
    background-repeat: no-repeat;
    background-position: left center;
}

[data-bs-theme="dark"] .thread-reply td:first-child {
    background-image: linear-gradient(to right, transparent 10px, #007bff 10px, #007bff 14px, transparent 14px);
}

.thread-reply td {
    border-top: 1px dashed #dee2e6;
}

[data-bs-theme="dark"] .thread-reply td {
    border-top: 1px dashed #495057;
}

.thread-indicator {
    margin-right: 5px;
    color: #007bff;
    font-weight: bold;
}

[data-bs-theme="dark"] .thread-indicator {
    color: #66b3ff;
}

.notification-dot {
    /* Positioning */
    position: absolute;
    /* Size and Shape */
    width: 8px;
    height: 8px;
    background-color: red;
    border-radius: 50%; /* This makes it a circle */
}

/* Make top menu items bold */
.navbar-nav .nav-link {
    font-weight: bold;
}

/* Ensure navbar brand is also bold */
.navbar-brand {
    font-weight: bold;
}

/* New message highlighting */
.new-message {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    animation: newMessagePulse 2s ease-in-out;
    position: relative;
    overflow: hidden;
}

/* Ensure new message highlighting works with hover */
.table-hover tbody tr.new-message:hover {
    background-color: rgba(255, 193, 7, 0.3) !important;
}

.new-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.2), transparent);
    animation: shimmer 3s infinite;
}

[data-bs-theme="dark"] .new-message {
    background-color: #2c2c00 !important;
    border-left: 4px solid #ffc107 !important;
    animation: newMessagePulseDark 2s ease-in-out;
}

[data-bs-theme="dark"] .table-hover tbody tr.new-message:hover {
    background-color: rgba(255, 193, 7, 0.2) !important;
}

@keyframes newMessagePulse {
    0% { background-color: #fff3cd; }
    50% { background-color: #ffeaa7; }
    100% { background-color: #fff3cd; }
}

@keyframes newMessagePulseDark {
    0% { background-color: #2c2c00; }
    50% { background-color: #3d3d00; }
    100% { background-color: #2c2c00; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* NEW badge animation */
.new-message .badge.bg-danger {
    animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Message subject links */
.message-subject-link {
    color: #495057;
    text-decoration: none;
    transition: color 0.2s ease;
}

.message-subject-link:hover {
    color: #007bff;
    text-decoration: underline;
}

.message-subject-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Message view page styling */
.message-content {
    line-height: 1.6;
    word-wrap: break-word;
}

.message-content img {
    max-width: 100%;
    height: auto;
}

.message-content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

/* File attachment cards */
.file-attachment-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.file-attachment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Responsive adjustments for message view */
@media (max-width: 768px) {
    .message-header-info {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .message-header-info > div {
        margin-bottom: 0.5rem;
    }
    
    .message-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .message-actions .btn {
        width: 100%;
    }
}

/* Dark mode specific styles for MessagesV2 */
body.dark-mode #message-view-container .card {
    background-color: #343a40; /* Darker background for message view card */
    color: #e9ecef; /* Light text color */
    border-color: #495057;
}

body.dark-mode .message-bubble.bg-light {
    background-color: #495057 !important; /* Darker background for received messages */
    color: #e9ecef;
}

body.dark-mode .message-bubble.bg-primary {
    background-color: #0056b3 !important; /* Slightly darker primary for sent messages */
}

body.dark-mode #message-input-container {
    background-color: #343a40; /* Darker background for input area */
    border-top-color: #495057 !important;
}

body.dark-mode #message-input-container .form-label {
    color: #e9ecef;
}

body.dark-mode #message-input-container .form-control {
    background-color: #495057;
    color: #e9ecef;
    border-color: #6c757d;
}

body.dark-mode #message-input-container .form-control::placeholder {
    color: #adb5bd;
}

body.dark-mode #message-input-container .select2-container--default .select2-selection--multiple {
    background-color: #495057;
    border-color: #6c757d;
}

body.dark-mode #message-input-container .select2-container--default .select2-selection__choice {
    background-color: #6c7577;
    color: #e9ecef;
    border-color: #adb5bd;
}

body.dark-mode #message-input-container .select2-container--default .select2-selection__choice__remove {
    color: #e9ecef;
}

body.dark-mode #message-input-container .select2-container--default .select2-selection__placeholder {
    color: #adb5bd;
}

body.dark-mode #message-input-container .select2-dropdown {
    background-color: #495057;
    border-color: #6c757d;
}

body.dark-mode #message-input-container .select2-results__option {
    color: #e9ecef;
}

body.dark-mode #message-input-container .select2-results__option--highlighted {
    background-color: #007bff !important;
    color: #fff !important;
}

/* TinyMCE dark mode adjustments */
body.dark-mode .tox .tox-editor-container,
body.dark-mode .tox .tox-menubar,
body.dark-mode .tox .tox-toolbar-overlord,
body.dark-mode .tox .tox-toolbar__primary,
body.dark-mode .tox .tox-statusbar {
    background-color: #495057 !important;
    color: #e9ecef !important;
    border-color: #6c757d !important;
}

body.dark-mode .tox .tox-edit-area__iframe {
    background-color: #343a40 !important;
    color: #e9ecef !important;
}

body.dark-mode .tox .tox-tbtn,
body.dark-mode .tox .tox-tbtn--select,
body.dark-mode .tox .tox-tbtn--bespoke {
    color: #e9ecef !important;
}

body.dark-mode .tox .tox-tbtn:hover,
body.dark-mode .tox .tox-tbtn--select:hover,
body.dark-mode .tox .tox-tbtn--bespoke:hover {
    background-color: #6c757d !important;
}

/* Print styles for message view */
@media print {
    .btn,
    .card-footer,
    .card-header .btn {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .card-header {
        background: none !important;
        border-bottom: 2px solid #000 !important;
    }
    
    .card-body {
        padding: 0 !important;
    }
    
    .message-content {
        border: none !important;
        background: none !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .file-attachment-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h4, h5 {
        color: #000 !important;
        margin-bottom: 0.5rem;
    }
    
    .alert {
        border: 1px solid #000 !important;
        background: none !important;
        color: #000 !important;
    }
}




.dropdown-menu li.dropend:hover > .dropdown-menu {
    display: block;
    margin-left: 0;
}

/* Position the nested menu */
.dropend .dropdown-menu {
    top: 0;
    left: 100%;
}

.linksonmobile{
    display:none !important;
} 
@media only screen and (max-width: 600px) {

    .navbar{
        position: absolute;
    }
.mainlinksnonmobile{
    display:none;
}
.linksonmobile{
    display:block !important;
}
.navbar-nav .nav-link {
    font-size:  1.5rem !important;
}
.navbar-nav .dropdown-item {
    font-size:  1.4rem !important;
}
.navbar-nav a i {
    font-size:  3rem !important;
}
.navbar .navbar-brand {
    width: 100%;
    text-align: center;
}
.navbar .navbar-toggler{
    width: 100%;
}
.navbar .nav-item.dropdown{
    width: 50%;
    text-align: center;
}
body>div.container{
padding-top: 120px !important;
}
#mainmenu .nav-link.dropdown-toggle{
    text-align: left;
}
/* Desktop layout fixes */
@media (min-width: 768px) {
    .user-section {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .user-section .form-inline {
        margin-right: 10px;
    }
    
    .user-section .nav-item.dropdown {
        margin-left: 0;
    }
}

/* Mobile layout: Logo, User Section, Menu */
.navbar .container-fluid {
    display: flex;
    flex-wrap: wrap;
}

.navbar-brand {
    order: 1;
    flex: 0 0 auto;
}

.user-section {
    order: 2;
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.navbar-toggler {
    order: 3;
    flex: 0 0 auto;
}

.navbar-collapse {
    order: 4;
    width: 100%;
}

/* Ensure the main menu appears last on mobile */
#mainmenu {
    order: 4;
    width: 100%;
}

/* Make user section always visible on mobile */
@media only screen and (max-width: 600px) {
    .user-section {
        position: static !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        order: 2 !important;
        flex: 1 1 auto !important;
        justify-content: flex-end !important;
        align-items: center !important;
        padding: 0.5rem 0;
    }
    
    .user-section .form-inline,
    .user-section .nav-item.dropdown {
        display: block !important;
        visibility: visible !important;
    }
}
}
