/* Reset some default styles for better consistency across browsers */
html, body {
    margin: 0;
    padding: 0;
    /* height: 100%; */
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    flex-direction: column;
}


.content-wrap {
    flex: 1 0 auto; /* This makes the content area flexible and pushes the footer down */
}

body, p, ul, li, form, input, select {
    margin: 0;
    padding: 0;
}

.body-frame {
    flex: 1;
    margin-top: 150px;
    margin-bottom: 50px;
    overflow-y: auto;
    padding: 0 10px 50px; /* shorthand for padding-left, right, and bottom */
    width: 100%;
    box-sizing: border-box;
}

.fas {
    margin-right: 8px;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Use at least 100vh (viewport height) for full-height content */

}

#header {
    background-color: #333;
    color: #fff;
    padding: 10px;
}

nav ul {
    list-style-type: none;
}

nav ul li {
    display: inline;
    margin-right: 20px;
}

nav a {
    text-decoration: none;
    color:  #000;
    font-weight: bold;
}

h1, h2, h3 {
    margin-top: 20px ;
    text-align: left ;
    margin-left: 20px;
    color: #079ce9;
}


table {
    width: 80%;
    margin: 20px auto;
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #ddd;
}

th {
    background-color: turquoise; /* Set the background color for the heading */
    padding: 10px; /* Add padding to the heading for spacing */
    text-align: left; /* Align the text to the left within the heading */
}

th, td {
    padding: 10px;
    text-align: left;
}

form {
    width: 50%;
    margin: 20px auto;
}

label {
    display: block;
    margin-bottom: 5px;
}

input, select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
}

input[type="submit"] {
    background-color: #333;
    color: #fff;
    cursor: pointer;
}

.completed-trainings-list {
    list-style: none;
}

.completed-trainings-list li {
    margin-bottom: 20px;
}

.feedback-actions {
    margin-top: 10px;
}

.action-link {
    display: inline-block;
    padding: 8px 12px;
    margin-right: 10px;
    text-decoration: none;
    color: #fff;
    background-color: #333;
    border-radius: 4px;
}

.action-link:hover {
    background-color: #555;
}

/* Dropdown container */
.dropdown {
    display: inline-block;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: darkcyan;
    color:#000;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    display: block;
    text-decoration: none;
}

.dropdown-content span {
    color:#000;
}
/* Change color on hover */
.dropdown-content a:hover {
    background-color: darkblue;
}

/* Show the dropdown content when the mouse is over the dropdown container */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Style for the active tab */
.dropdown-content a.active {
    background-color: #ddd;
    color: black;
}


/* Media query for screens smaller than 600px (adjust as needed) */
@media screen and (max-width: 600px) {
    #extended-top-bar, #top nav ul {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #extended-top-bar nav ul li,
    #top nav ul li {
        margin: 0 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #extended-top-bar nav ul li a,
    #top nav ul li a {
        text-align: center;
        color: #000 !important; /* Set text color to black */
    }

    #extended-top-bar nav ul li a span,
    #top-bar nav ul li a span {
        display: none; /* Hide text for mobile */
    }
    #top-bar span {
        color: whitesmoke
    }
    /* Style for the icons */
    .action-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }

    .action-icons a {
        margin: 10px;
        margin-right: 20px;
        text-align: center;
        display: inline-block;
        color: #000; /* Set text color to black */
    }
    td.actions .action-icons a {
        margin: 10px; /* Adjust the margin for desktop */
        margin-right: 20px; /* Adjust the right margin for desktop */
    }
}
/* Footer Container */
footer {
    flex-shrink: 0;
    background-color: #f2f2f2;
    padding: 10px 20px;
    height: 15px; /* Increased height for better spacing */
    position: fixed;
    width: 100%;
    z-index: 100;
    bottom: 0;
    display: flex;
    justify-content: space-between; /* Pushes left and right content apart */
    align-items: center;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.1); /* Adds subtle shadow */
}

/* Max width container */
#footer-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Left-aligned links */
#footer-links {
    display: flex;
    gap: 25px; /* Adjusts spacing between links */
}

#footer-links a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

#footer-links a:hover {
    text-decoration: underline;
}

/* Right-aligned copyright */
#copyright {
    font-size: 14px;
    color: #666;
    white-space: nowrap; /* Prevents wrapping */
    padding-right: 20px; /* Ensures it doesn’t touch the edge */
}

/* Add this CSS to style your extended top bar and top bar */
#extended-top-bar {
    background: linear-gradient(to right, #40E0D0, #20B2AA);
    padding: 10px 20px;
    color: #fff;
    width: 100vw;
    top: 0;
    display: flex;
    justify-content: space-between; /* Align items to the left and right edges */
    align-items: center;
    position: fixed;
    z-index: 100;
}

.left-items, .right-items {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.left-items, .right-items {
    display: flex;
    align-items: center;
}

.left-items nav ul {
    list-style-type: none;
    display: flex;
    padding: 0;
    margin: 0;
}

.left-items nav ul li {
    margin-left: 20px;
}

.left-items nav ul li a {
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
}

.left-items nav ul li a i {
    margin-left: 5px;
}

.right-items #back-navigation a {
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}

.right-items #back-navigation a i {
    margin-right: 50px;
}
#top-bar {
    background-color: darkcyan !important;
    color-scheme: normal;
    color: white; /* Set text color to black */
    padding: 10px 20px;
    display: flex;
    width: 100vw;
    margin-top: 116px;
    justify-content: space-between;
    position: fixed;
    align-items: center;
    z-index: 100;
}

#top-bar span {
    color: whitesmoke;
}

#top-bar.dropdown-content {
    background-color: darkcyan;
}

#company-logo img {
    max-height: 100%; /* Adjust as needed */
    max-width: 100%; /* Adjust as needed */
    display: block;
    margin: 0 auto;
    width: 150px; /* Set a specific width for the logo */
    height: auto; /* Maintain the aspect ratio */
}

#user-info img {
    max-height: 100%; /* Adjust as needed */
    max-width: 100%; /* Adjust as needed */
    border-radius: 50%;
    width: 50px; /* Set a specific width for the user photo */
    height: auto; /* Maintain the aspect ratio */
    margin-right: 10px;
}
#user-profile {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align items to the left */
}

#user-info #logout  {
    display: flex;
    align-items: center;
    margin: 20px;
    white-space: nowrap; /* Prevents the button from stretching */
}

#user-info span {
    margin-left: 10px; /* Add spacing between user photo and username */
}

#user-info {
    display: flex;
    align-items: center;
    width: 100%;
    margin-left: 10px;
    justify-content: space-between; /* Use if you want to maximize space between elements */
}

#userName {
    white-space: nowrap; /* Prevents the name from wrapping */
    flex-grow: 1;
    margin-right: 50px; /* Adjust the spacing as needed */
}


  #logout {
    background-color: #f44336; /* Red background color for the logout button */
    color: white;
    border: none;
    cursor: pointer;
    text-align: left; /* Adjust text alignment */
    width: 100%; /* Make the button full-width */
    white-space: nowrap; /* Prevents the button from stretching */
    padding: 5px 10px; /* Adjust padding as needed for visual appeal */
    display: flex; /* Aligns the icon and text nicely */
    align-items: center;
    margin-left: 20px;
  }
  
  #logout:hover {
    background-color: #d32f2f; /* Darker red color on hover */
  }
  
  #logout i {
    margin-right: 5px; /* Adjust icon spacing */
  }

#dropdown-content {
    display: none;
    position: absolute;
    background-color: #333;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    right: 0; /* Align the dropdown to the right */
    margin-top: 5px; /* Add a small margin to separate button and dropdown */
}
#dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff; /* Change background color to white or a lighter color */
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    right: 0;
    margin-top: 5px;
}

/* Remove dark background for dropdown items */
#dropdown-content a {
    color: #333; /* Change text color to a darker color */
    padding: 12px 16px;
    display: block;
    text-decoration: none;
    transition: background-color 0.3s; /* Add smooth transition for background color */
}
#dropdown-content span {
    color:#000;
}

/* Change background color on hover */
#dropdown-content a:hover {
    background-color: #f1f1f1;
}
/* Add an arrow indicator */
#dropdown-content::before {
    content: "";
    position: absolute;
    top: -10px; /* Adjust as needed */
    right: 15px; /* Adjust as needed */
    border-width: 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent #333;
}

/* Style for the icons */
.action-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
}

.action-icons a {

    text-align: left;
    display: inline-block;
    color: blue; /* Set text color to black */
    margin: auto;
}

/* Style for the icons
td.actions{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

td.actions {
    margin: 5px;
    margin-right: 10px;
    text-align: center;
    display: inline-block;
    color: #000;   
} */

/* Align the button to the right */
#table-container {
    text-align: right;
}
/* Zebra-striping for table body rows */
table tbody tr:nth-child(even) {
    background-color: #f2f2f2; /* Light grey for even rows */
}

table tbody tr:nth-child(odd) {
    background-color: #ffffff; /* White for odd rows */
}
table {
    width: 100%;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: red;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 20px; /* Round the switch */
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%; /* Round the slider */
}

input:checked + .slider {
    background-color: #28a745; /* Green background when switch is on */
}

input:focus + .slider {
    box-shadow: 0 0 1px #28a745; /* Green shadow when switch is focused */
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

#content {
    position: relative;
}

#create-user-button {
    display: flex;
    text-align: right;
    margin-right: 20px;
    margin: 10px 0; /* Adjust margin for spacing above the table */
    padding: 8px 12px; /* Adjust padding for button size */
    background-color: coral; /* Set the background color to blue */
    color: #fff; /* Set the text color to white */
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Hover effect for the button */
#create-user-button:hover {
    background-color: darkblue; /* Change the background color on hover */
}
#create-button {
    display: flex;
    text-align: right;
    margin-right: 20px;
    margin: 10px 0; /* Adjust margin for spacing above the table */
    padding: 8px 12px; /* Adjust padding for button size */
    background-color: coral; /* Set the background color to blue */
    color: #fff; /* Set the text color to white */
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Hover effect for the button */
#create-button:hover {
    background-color: darkblue; /* Change the background color on hover */
}

#test-button {
    display: flex;
    text-align: right;
    margin-right: 20px;
    margin: 10px 0; /* Adjust margin for spacing above the table */
    padding: 8px 12px; /* Adjust padding for button size */
    background-color: coral; /* Set the background color to blue */
    color: #fff; /* Set the text color to white */
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Hover effect for the button */
#test-button:hover {
    background-color: darkblue; /* Change the background color on hover */
}
#connect-button {
    display: flex;
    text-align: right;
    margin-right: 20px;
    margin: 10px 0; /* Adjust margin for spacing above the table */
    padding: 8px 12px; /* Adjust padding for button size */
    background-color: green; /* Set the background color to blue */
    color: #fff; /* Set the text color to white */
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Hover effect for the button */
#connect-button:hover {
    background-color: lightgreen; /* Change the background color on hover */
}

#reset-button {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1000;
    text-align: right;
    margin-right: 20px;
    margin: 10px 0;
    padding: 8px 12px;
    background-color: red;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Hover effect for the button */
#reset-button:hover {
    background-color: pink; /* Change the background color on hover */
}

/* Style to display buttons in the same row */
.button-container {
    display: flex;
    gap: 10px; /* Adjust the gap between buttons as needed */
}
/* Add more specific styles as needed */

/* Progress Bar settings */

#progressBarContainer {
    width: 100%;
    background-color: #ddd;
    display: none; /* Make sure it's hidden initially */
}

#progressBar {
    height: 30px;
    width: 100%;
    background-color: #4CAF50;
    overflow: hidden;
    position: relative;
    color: white;
}

#loadingBarContainer {
    width: 100%;

    background-color: #ddd;
    display: none; /* Make sure it's hidden initially */
}

#loadingBar {
    top: 8px;
    height: 30px;
    width: 100%;
    background-color:darkorange;
    overflow: hidden;
    position: relative;
    color: white;
}

#scrollingText {
    position: absolute;
    white-space: nowrap;
    align-items: center;
    animation: scrollText 20s linear infinite;
    color: white
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

#videoContainer {
    position: relative;
}

#videoOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* Transparent, but you could use a semi-transparent color for a visual effect */
    z-index: 1; /* Ensure this overlays the video */
}

.message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px;
    color: #fff;
    border-radius: 5px;
    font-size: 16px;
}

.success {
    background-color: #4CAF50;  /* Green background for success */
}

.error {
    background-color: #f44336;  /* Red background for error */
}

.red-star {
    color: red;
    font-size: 1.25em; /* Increase font size */
    padding-left: 5px; /* Add some padding to separate it from other text */
}

.has-submenu {
    position: relative; /* This makes sure that the absolute positioning of the submenu is relative to this item */
}

.submenu {
    display: none; /* Hidden by default */
    position: absolute; /* Positioning relative to its parent due to the above rule */
    left: 0; /* Align with the left edge of the parent item */
    top: 100%; /* Position directly below the parent item */
    z-index: 1200; /* Ensure it's above other content */
    background-color: #40E0D0; /* Light purple background */
    min-width: 250px; /* Minimum width, adjust as needed */
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); /* Optional: Add some shadow for depth */
    border: none; /* Remove any default borders */
}



/* Submenu item styles */
.submenu li a {
    color: white; /* White text color */
    padding: 10px 15px; /* Adequate padding for touch targets */
    text-decoration: none; /* No underlines on links */
    display: block; /* Ensure it takes up the full width */
    background-color: darkcyan; /* Light purple background */
}

/* Submenu item hover/focus styles */
.submenu li a:hover, .submenu li a:focus {
    background-color: #6A0DAD; /* Darker purple background on hover/focus */
}

.popup-content {
    padding: 20px;
}

.popup-content h2 {
    margin-top: 0;
}

.popup-content label {
    display: block;
    margin-top: 10px;
}

.popup-content input,
.popup-content textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.popup-content button {
    margin-top: 10px;
}

.popup-container .close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1300;
    display: none;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.rows-per-page {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.rows-per-page label {
    margin-right: 5px;
}
.filters-row {
    display: flex;
    flex-direction: row; /* Ensure items are arranged in a row */
    align-items: center;
    justify-content: flex-start; /* Align filters to the left */
    gap: 20px; /* Add spacing between filters */
    width: 100%; /* Make the container full-width */
}

.filter-item {
    display: flex;
    flex-direction: column; /* Labels and selects stacked within each filter item */
    min-width: 150px; /* Ensure filters have enough width */
}

.filter-item label {
    font-weight: normal; /* Optional: Bold for better readability */
    margin-bottom: 5px; /* Space between label and dropdown */
}

.filter-item select {
    padding: 5px; /* Add some padding inside the dropdown */
    width: 100%; /* Make dropdown take full width of the container */
}

.filters {
    display: flex;
    flex-direction: column; /* Labels and selects stacked within each filter item */
    min-width: 150px; /* Ensure filters have enough width */
}

.filters label {
    font-weight: normal; /* Optional: Bold for better readability */
    margin-bottom: 5px; /* Space between label and dropdown */
}

.filters select {
    padding: 5px; /* Add some padding inside the dropdown */
    width: 100%; /* Make dropdown take full width of the container */
}
        /* CSS for the modal */
        .modal {
            display: none; /* Initially hide the modal */
            position: fixed; /* Position the modal relative to the viewport */
            top: 0;
            left: 0;
            width: 100%; /* Cover the entire viewport */
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
            z-index: 9999; /* Ensure the modal appears on top of other content */
        }

        .modal-content {
            background-color: white; /* White background for the modal content */
            padding: 20px;
            border-radius: 10px;
            position: absolute; /* Position the modal content within the modal */
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%); /* Center the modal content */
        }


        /* Scrollable content */
        .modal-body {
        max-height: 300px;
        overflow-y: auto;
        }

        .close {
            position: absolute;
            top: 10px;
            right: 10px;
            cursor: pointer;
        }

        .modal-footer {
            display: flex;
            justify-content: space-between; /* Spread the buttons across the modal footer */
            padding: 10px; /* Add some padding around the buttons */
        }

        #acceptBtn {
            background-color: green; /* Green background for accept button */
            color: white; /* White text color */
            border: none; /* Remove default border */
            padding: 10px 20px; /* Add some padding */
            cursor: pointer; /* Pointer cursor on hover */
            border-radius: 5px; /* Optional: Rounded corners */
        }

        #declineBtn {
            background-color: red; /* Red background for decline button */
            color: white; /* White text color */
            border: none; /* Remove default border */
            padding: 10px 20px; /* Add some padding */
            cursor: pointer; /* Pointer cursor on hover */
            border-radius: 5px; /* Optional: Rounded corners */
        }

        .action-icons i {
            color: blue;
            cursor: auto;
            margin-right: 10px; /* Adds space between icons */
        }
        
        .action-icons i:last-child {
            margin-right: 0; /* Removes margin for the last icon */
        }
        
        .action-icons i:hover {
            color: darkblue; /* Optional: Changes color on hover */
        }

        #timer {
            font-size: 1.5em;
            font-weight: bold;
            color: red;
        }

        .editor-container {
            height: 150px;
            margin-bottom: 20px;
            border: 1px solid #ccc;
            padding: 5px;
            background-color: white;
        }
        /* Make the Quill editor background white */
        .ql-editor {
            background-color: white;
            border: 1px solid #ccc;
            padding: 10px;
            border-radius: 4px;
            min-height: calc(1.5em * 4); /* Default to 4 rows */
            max-height: 90vh; /* Expand up to full window height */
            overflow-y: auto; /* Enable scrolling when content overflows */
        }

        /* Optional: Match toolbar styling */
        .ql-toolbar {
            width: 98vw;
            background-color: white;
            border: 1px solid #ccc;
            border-bottom: none;
        }

        /* Add spacing between editors */
        .editor {
            width: 98vw;
            margin-bottom: 20px;
        }

        /* Match form container styling */
        .form-container input,
        .form-container textarea {
            min-height: calc(1.5em * 4); /* Default to 4 rows */
            max-height: 90vh; /* Expand up to full window height */
            resize: none; /* Disable manual resizing to keep consistent behavior */
            overflow-y: auto; /* Enable scrolling when content overflows */
            width: 98vw; /* Ensure it spans the container */
            border: 1px solid #ccc;
            padding: 10px;
            border-radius: 4px;
            box-sizing: border-box;
            margin-bottom: 20px;
        }

        .checkbox-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 300px; /* or set to 100% or any suitable width */
            font-size: 16px;
            margin: 15px 0;
        }
        
        .checkbox-container input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        #saveBtn {
            background-color: green; /* Green background for accept button */
            color: white; /* White text color */
            border: none; /* Remove default border */
            padding: 10px 20px; /* Add some padding */
            cursor: pointer; /* Pointer cursor on hover */
            border-radius: 5px; /* Optional: Rounded corners */
        }

        #cancelBtn {
            background-color: red; /* Red background for decline button */
            color: white; /* White text color */
            border: none; /* Remove default border */
            padding: 10px 20px; /* Add some padding */
            cursor: pointer; /* Pointer cursor on hover */
            border-radius: 5px; /* Optional: Rounded corners */
        }

        textarea {
            min-height: calc(1.5em * 4); /* Default to 4 rows */
            max-height: 90vh; /* Expand up to full window height */
            resize: none; /* Disable manual resizing to keep consistent behavior */
            overflow-y: auto; /* Enable scrolling when content overflows */
            width: 100%; /* Ensure it spans the container */
        }

 /* Status light styling */
.status-light {
  width: 16px; /* reduced size for better balance */
  height: 16px;
  border-radius: 50%;
  border: 2px solid black;
  background-color: gray;
  transition: background-color 0.3s ease-in-out;
  pointer-events: none;
}

/* Control icons container */
.control-icons {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 99999;
  background: rgba(255, 255, 255, 0.85);
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Buttons inside control-icons */
.control-icons button {
  background-color: #007bff;
  color: white;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.2s ease-in-out;
}

.control-icons button:hover {
  background-color: #0056b3;
}

.control-icons button:active {
  background-color: #004494;
}

.control-icons button:focus {
  outline: none;
}

/* Additional classes for button state */
.control-icons button.muted {
  background-color: #d9534f; /* red */
}

.control-icons button.unmuted {
  background-color: #5cb85c; /* green */
}

/* Timer styling inside control-icons */
#timer {
  font-family: monospace;
  font-size: 1.2em;
  font-weight: bold;
  color: white;
  background: black;
  padding: 2px 8px;
  border-radius: 4px;
}

.timer-text {
  font-size: 14px;
  color: #333;
  margin: 0 4px;
}

/* Make sure status-light aligns well with text & button */
.status-light {
  margin-right: 4px;
}

          
        /* Full-Screen Top Bar */
        #fullscreenTopBar {
            width: 100%;
            height: 50px;
            background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black */
            color: white;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            position: fixed; /* Stays on top */
            top: 0;
            left: 0;
            z-index: 2147483647; /* Highest possible value */
        }

        #network-warning {
            display: none;
            padding: 15px;
            background-color: red;
            color: white;
            text-align: center;
            font-size: 18px;
            font-weight: bold;
            margin: 20px;
            border-radius: 5px;
        }

        #network-status-topbar {
            display: flex;
            align-items: center;
            background: #222;
            padding: 8px 16px;
            border-radius: 12px;
            font-family: "Arial", sans-serif;
            font-size: 16px;
            font-weight: bold;
            color: #fff;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        /* Network Status Light */
        #network-status {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            /* background-color: gray; Default */
        }

        .status-label {
            margin-right: 10px;
        }
        
        .status-indicator {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            display: inline-block;
            transition: background 0.3s ease-in-out;
        }
        /* Fix: Ensure CSS class updates properly */
        .green { background-color: #28a745 !important; }
        .yellow { background-color: #ffc107 !important; }
        .red { background-color: #dc3545 !important; }
        .gray { background-color: #6c757d !important; }

        .mandatory {
            color: red;
            font-size: 1em;
            }

            .error-message {
            color: red;
            font-size: 0.8em;
            }

            #chatWrapper {
                position: fixed;
                bottom: 20px;
                right: 20px;
                width: 60px;
                height: 60px;
                background: transparent;
                border: none;
                display: none;
                z-index: 2147483647 !important;
                transition: all 0.3s ease;
                overflow: hidden;
              }
              
              #chatWrapper.expanded {
                width: 400px;
                height: 400px;
                border-radius: 12px;
              }
              
              #chatWrapper.minimized {
                width: 150px;
                height: 150px;
                border-radius: 50%;
                background: transparent;
              }
              
              /* Iframe always fills space */
              #avatarIframe {
                width: 100%;
                height: 100%;
                border: none;
                display: block;
                background: transparent;
              }
              
              /* Hide iframe in minimized if needed (optional) */
              /* You can comment this if you want video to be shown while minimized */
              /*
              #chatWrapper.minimized #avatarIframe {
                display: none;
              }
              */
              
              #iframeLoader {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(255, 255, 255, 0.8);
                font-size: 18px;
                color: #111;
                display: flex;
                align-items: center;
                justify-content: center;
                z-index: 2;
              }

            #loaderIcon {
                font-size: clamp(1.5rem, 20%, 3rem);
                animation: pulse 1.2s infinite ease-in-out;
            }

            @keyframes pulse {
            0%   { transform: scale(1); opacity: 1; }
            50%  { transform: scale(1.3); opacity: 0.6; }
            100% { transform: scale(1); opacity: 1; }
            }
              /* Chat header hidden by default, appears on hover when expanded */
              #chatHeader {
                position: absolute;
                top: 0;
                left: 0;
                height: 40px;
                width: 100%;
                background-color: rgba(245, 245, 245, 0.9);
                display: flex;
                justify-content: flex-start;
                align-items: center;
                padding: 0 10px;
                opacity: 0;
                transition: opacity 0.3s ease;
                padding-right: 10px;
                padding: 0 10px;
                z-index: 10000;
                overflow: visible;
              }
              /* Minimized Style */
            #chatWrapper.minimized #loaderIcon {
            font-size: 2.5rem; /* larger in bubble */
            }

            /* Expanded Style */
            #chatWrapper.expanded #loaderIcon {
            font-size: 3rem; /* slightly larger in chat window */
            }
              #chatWrapper.expanded:hover #chatHeader {
                opacity: 1;
              }
              
              /* Hide expand button if expanded */
              #chatWrapper.expanded #expandBtn {
                display: none;
              }
              
              /* Launch Button */
              #launchChatBtn {
                position: fixed;
                bottom: 20px;
                right: 20px;
                padding: 12px 16px;
                font-size: 16px;
                background-color: #0084ff;
                color: white;
                border: none;
                border-radius: 24px;
                cursor: pointer;
                z-index: 9998;
                box-shadow: 0 4px 8px rgba(0,0,0,0.2);
              }
              
              /* Control Buttons */
              #chatHeader button {
                background: none;
                border: none;
                font-size: 16px;
                margin-left: 10px;
                cursor: pointer;
                color: #333;
                padding: 5px 10px;
              }
              
              /* Hide expand controls when minimized */
              #chatWrapper.minimized #chatHeader,
              #chatWrapper.minimized #iframeLoader {
                display: none;
              }
              #clickCatcher {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                z-index: 1;
                display: none; /* Only shown in minimized mode */
                cursor: pointer;
              }
              #chatWrapper.minimized #clickCatcher {
                display: block;
              }

              
#timing-stats {
  position: absolute;
  top: 65px;           /* Adjust to clear the top bar */
  right: 20px;         /* Align right with control bar */
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: white;
  font-family: "Inter", sans-serif;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#timing-stats div {
  white-space: nowrap;
}

#timing-stats .textContent {
  color: #facc15; /* yellow */
  font-weight: bold;
}

.hidden {
  display: none !important;
}

/* For minimized mode, fill the circle and focus on the bot's face */
#chatWrapper.minimized #videoElementbot {
    object-fit: cover;        /* Fill the circle */
    object-position: center 20%; /* Adjust so face is visible */
    background: black;        /* Behind cropped edges */
}

/* For expanded mode, keep your current framing */
#chatWrapper.expanded #videoElementbot {
    object-fit: contain;      /* Preserve full view */
    object-position: center;  /* Center content */
}