/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
}

body {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    background-color: #f4f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}


  

/* Dark Mode Styles */

/* Body and General Text */
body.dark-mode {
    background-color: #121212; /* Dark background */
    color: #ffffff !important; /* White text */
}

/* Ensure all text is white */
body.dark-mode h1, body.dark-mode p, body.dark-mode a, 
body.dark-mode span, body.dark-mode li, 
body.dark-mode div, body.dark-mode button, 
body.dark-mode input, body.dark-mode textarea {
    color: #ffffff !important; /* Force white text */
}

/* Headers */
body.dark-mode header {
    background-color: #1f1f1f !important; /* Dark header */
    color: #ffffff !important; /* White text in header */
}

/* Sidebar */
body.dark-mode .left {
    background-color: #1f1f1f !important; /* Dark sidebar */
    color: #ffffff !important; /* White text in sidebar */
}

/* Sidebar Links */
body.dark-mode .left .link li {
    background-color: transparent;
    color: #ffffff !important;
}

body.dark-mode .left .link li.active {
    background-color: #333333; /* Active menu item background */
}

body.dark-mode .left .link li:hover {
    background-color: #333333; /* Hover effect */
}

/* Main Content */
body.dark-mode .right {
    background-color: #1a1a1a; /* Dark main content area */
    color: #ffffff !important;
}

/* Device Cards */
body.dark-mode .devices {
    background-color: #1f1f1f !important; /* Dark cards */
    color: #ffffff !important; /* White text in cards */
}

/* Ensure h2 inside devices is white in dark mode */
body.dark-mode .devices h2 {
    color: #ffffff !important; /* Force white text for h2 inside devices */
}


body.dark-mode .devices ul li {
    background-color: #2a2a2a; /* Dark card items */
    color: #ffffff !important;
}

body.dark-mode .devices ul li:hover {
    background-color: #333333; /* Slightly lighter hover effect */
}

/* Download Alert */
body.dark-mode .download-alert {
    background-color: #444444; /* Darker alert background */
    color: #ffffff !important;
}

/* Footer */
body.dark-mode .foot {
    background: linear-gradient(90deg, #333333 15%, #1a1a1a 85%);
    color: #ffffff !important;
}

body.dark-mode .footlink a {
    color: #ffffff !important;
}

body.dark-mode .footlink a:hover {
    color: #333333;
}




/* Expandable Section */
body.dark-mode .Expand {
    background-color: #1f1f1f;
    color: #ffffff !important;
    border-color: #333333;
}

body.dark-mode .ExpandInput {
    background-color: #2a2a2a;
    color: #ffffff !important;
    border-color: #444444;
}

body.dark-mode .ExpandInput:focus {
    border-color: #FDD400;
}

/* Tips and Config Information */
body.dark-mode .tips1, 
body.dark-mode .tips2, 
body.dark-mode .config-inform {
    background-color: #1f1f1f;
    color: #ffffff !important;
    border-color: #333333;
}

/* Alarm Tips */
body.dark-mode .alarmtip {
    background-color: #331111;
    color: #ffffff !important;
}

/* Expandable Section in Dark Mode */
body.dark-mode .Expand {
    background-color: #1f1f1f !important; /* Dark background */
    color: #ffffff !important; /* White text */
    border-color: #333333 !important; /* Dark border */
}

/* Text inside Expand Section */
body.dark-mode .Expand .ExpandLeft {
    color: #ffffff !important; /* White text for left section */
}

body.dark-mode .Expand .ExpandRight {
    color: #ffffff !important; /* White text for right section */
}

/* Input Fields in Expand Section */
body.dark-mode .ExpandInput {
    background-color: #2a2a2a !important; /* Dark input background */
    color: #ffffff !important; /* White input text */
    border-color: #444444 !important; /* Dark border */
}

body.dark-mode .ExpandInput:focus {
    border-color: #FDD400 !important; /* Highlight color on focus */
}

/* Ensure text inside textarea is white in dark mode */
body.dark-mode textarea {
    color: #000000 !important; /* White text */
    background-color: #2a2a2a !important; /* Dark background for textarea */
    border-color: #444444 !important; /* Dark border */
}

/* Ensure input inside table is styled correctly in dark mode */
body.dark-mode .AlarmTable input[type="checkbox"] {
    accent-color: #FDD400; /* White checkbox with yellow accent */
    background-color: #2a2a2a !important; /* Dark background for checkbox */
    border-color: #444444 !important; /* Dark border */
}

/* Ensure the label text is white */
body.dark-mode .AlarmTable label {
    color: #ffffff !important; /* White label text */
}

/* Ensure input field and unit text are white in dark mode */
body.dark-mode input[type="text"] {
    color: #ffffff !important; /* White text inside input */
    background-color: #2a2a2a !important; /* Dark background for input */
    border-color: #444444 !important; /* Dark border for input */
}

/* Ensure the unit text is white */
body.dark-mode .displayUnit {
    color: #030303 !important; /* White text for unit */
}

body.dark-mode .AlarmTable .displayUnit {
    color: #000000 !important; /* Ensure white text for displayUnit in AlarmTable */
}

body.dark-mode .displayUnit {
    color: #000000 !important;
}

/* Specific Styling for AlarmTable Display Unit */
body.dark-mode .AlarmTable .displayUnit {
    color: #000000 !important; /* Ensure white text for displayUnit in AlarmTable */
    background-color: transparent; /* Optional: Transparent background */
}

/* Styling for selectM class inside AlarmTable in dark mode */
body.dark-mode .AlarmTable .span {
    color: #000000 !important; /* White text */
}


/* Ensure randomCode div and inputRandomCode have white text in dark mode */
body.dark-mode #randomCode {
    color: #ffffff !important; /* White text */
    background-color: #2a2a2a !important; /* Dark background */
    border-color: #FDD400 !important; /* Yellow border */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important; /* Darker shadow for better contrast */
}

body.dark-mode #inputRandomCode {
    color: #ffffff !important; /* White text inside input */
    background-color: #2a2a2a !important; /* Dark background for input */
    border-color: #FDD400 !important; /* Yellow border */
}

/* Ensure displayUnit text is white in dark mode */
body.dark-mode .displayUnit {
    color: #ffffff !important; /* White text for unit */
}

#darkModeToggle {
    position: fixed; /* Ensures the button stays fixed at the bottom */
    bottom: 20px;    /* Adjust the distance from the bottom */
    align-content: center;
    z-index: 1000;   /* Ensures it appears above other elements */
}

/* Dark Mode Icon */
.dark-mode-icon {
    position: fixed; /* Position fixed relative to the viewport */
    bottom: 20px; /* Position it 20px above the bottom of the screen */
    left: 6%; /* Center it horizontally */
    background-color: #333; /* Example dark background for the icon */
    padding: 10px; /* Adjust padding */
    border-radius: 50%; /* Make it round */
    cursor: pointer; /* Make it clickable */
    z-index: 1000; /* Ensure it stays above other content */
}

.dark-mode-icon:hover {
    background-color: #555; /* Change color on hover */
}

/* Dark Mode Styles for Card */
body.dark-mode .card {
    background-color: #1f1f1f; /* Dark background for the card */
    border: 1px solid #333333; /* Dark border */
    border-radius: 8px; /* Rounded corners */
    padding: 16px;
    color: #ffffff; /* White text for dark mode */
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* Subtle shadow */
}

/* Icon in Dark Mode */
body.dark-mode .card .icon {
    background-color: #333333; /* Dark background for the icon */
    color: #ffffff; /* White text for the icon */
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%; /* Circular shape */
    font-weight: bold;
    font-size: 18px;
    margin-right: 16px;
}

/* Text in Dark Mode */
body.dark-mode .card .text {
    color: #ffffff; /* White text */
    font-size: 20px;
    font-weight: normal;
    font-weight: bold;
}



/* Responsive Adjustments for Dark Mode */
@media (max-width: 768px) {
    body.dark-mode .main {
        background-color: #1a1a1a;
    }

    body.dark-mode .left {
        background-color: #1a1a1a;
    }
}



/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fdd400;
    z-index: 1000;
    padding: 15px 20px;
    /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
    /* padding: 8px 40px;   */
}

header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .header-content h1 {
    color: #01325c;
    font-size: 20px;
}

.header img {
    object-fit: contain;
    margin-left: 50px; /* Add spacing on the left of the image */
}

/* Main Layout */
.main {
    display: flex;
    margin-top: 80px; /* To account for fixed header */
    padding: 20px;
}

/* Sidebar */
.left {
    position: fixed;
    top: 80px;
    left: 0;
    height: calc(100vh - 80px);
    width: 250px;
    background-color: #01325c; /* Dark blue background */
    box-shadow: 2px 0px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-y: auto;
    color: #fff;
}

/* Menu Links */
.left .link {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Sidebar Links - Bold Text */
.left .link li {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 5px;
    background-color: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: bold; /* Make text bold */
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.left .link li a {
    color: inherit;
    text-decoration: none;
    flex-grow: 1;
    font-weight: bold; /* Ensure links are bold */
}

/* Active and Hover Styling */
.left .link li.active {
    background-color: #0a427f; /* Active menu item background */
    font-weight: bold; /* Keep text bold for active items */
}

.left .link li:hover {
    background-color: #fdd400; /* Hover effect */
    transform: translateX(5px);
    font-weight: bold; /* Keep text bold on hover */
}

#left-tab-id a {
    color: #ffffff; /* Default text color */
}

#left-tab-id a:hover {
    color: black; /* Hover color */
}

/* Icon Styling */
.left .link li::before {
    content: attr(data-icon); /* Use data attributes for icons */
    display: inline-block;
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

/* Language Selector */
.left .Lang {
    margin-bottom: 20px;
    width: 100%;
    height: 35px;
    border-radius: 5px;
    text-align: center;
}

/* Version Text */
.version-text {
    font-size: 14px;
    margin-top: 20px;
    text-align: center;
    color: #fff;
}

/* Footer Link */
.left .new-link a {
    display: block;
    text-align: center;
    color: #fdd400;
    text-decoration: none;
    font-size: 14px;
}

.left .new-link a:hover {
    color: #fff;
    text-decoration: underline;
}

/* .image-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 300px; 
    background-color: #f5f5f5; 
    border-radius: 20px; 
    overflow: hidden;
    margin: 20px 0; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
 } */

 .banner {
    width: 100%;
    height: auto;
    object-fit: cover; 
} 



.right .image-banner {
    position: absolute;
    top: 10px;
    left: 5;
    width: 100%;      /* Stretch the image to fill the container */
    height: auto;     /* Maintain the aspect ratio */

    z-index: 1;
    padding-right: 5;
}
.right {
    position: relative; /* This is to allow absolute positioning inside */
}



/* Right Content Area */
.right {
    margin-left: 260px;
    padding: 20px;
    flex: 1;
}

.menu {
    display: flex;
    justify-content: space-around;
    background-color: #00ab84;
    padding: 45px;
    border-radius: 5px;
}

.ConfigDevice {
    position: absolute;
    left: -1px;
    font-size: 20px;
    font-weight: bold;
}

.card {
    width:100%;
    background: #00ab84;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 16px;
    display: flex;
    align-items: center;
}

/* Circle icon styling */
.card .icon {
    width: 50px;
    height: 50px;
    /* background-color: #FDD400; */
    color: #FDD400;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    border-radius: 50%;
    margin-right: 16px;
}

.icon img {
    width: 64px;
    height: 44px;
}


/* Text styling */
.card .text {
    flex-grow: 1;
    font-size: 20px;
    color: #ffffff;
    font-weight: bold;
}

/* Adjust Card layout for smaller screens */
@media (max-width: 768px) {
    .card {
        flex-direction: column; /* Stack the card elements vertically */
        padding: 12px; /* Adjust padding for smaller screens */
    }

    .card .icon {
        width: 40px;
        height: 40px;
        font-size: 14px; /* Adjust icon size */
        margin-right: 0;
        margin-bottom: 12px; /* Add space between icon and text */
    }

    .card .text {
        font-size: 18px; /* Smaller text for smaller screens */
    }

    .icon img {
        width: 50px; /* Smaller image size */
        height: 34px;
    }
}

/* Further adjustments for very small screens */
@media (max-width: 480px) {
    .card {
        padding: 8px; /* Reduce padding on very small screens */
    }

    .card .icon {
        width: 35px;
        height: 35px;
        font-size: 12px; /* Even smaller icon */
    }

    .card .text {
        font-size: 16px; /* Adjust text size for mobile */
    }

    .icon img {
        width: 40px; /* Even smaller image size */
        height: 28px;
    }
}


.menu a {
    text-decoration: none;
    color: #fcfcfc;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    transition: 0.3s;
    text-align: left;
}

.menu a:hover {
    background-color: #333;
    color: #fff;
}

/* Device Cards */
.devices {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    /* border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); */
    margin-bottom: 20px;
}

.devices h2 {
    color: #333;
    font-size: 20px;
    margin-bottom: 15px;
}

/* Container for Device Cards */
.devices ul {
    display: flex;
    flex-wrap: wrap;
    gap: 85px; /* Space between cards */
    justify-content: center; /* Align cards in the center */
    padding: 0; /* Remove default list padding */
    list-style: none; /* Remove bullets from list */
}

/* Individual Card Styles */
.devices ul li {
    width: 180px;
    height: 240px; /* Adjust card height */
    display: flex;
    flex-direction: column; /* Stack image and text */
    justify-content: center;
    align-items: center;
    background-color: #01325c;
    border: 2px solid #f3f3f3; /* Subtle border around cards */
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 15px; /* Add padding inside cards */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow effect */
}

/* Hover Effect */
.devices ul li:hover {
    transform: scale(1.05); /* Slight zoom on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Darker shadow on hover */
    border-color: #FDD400; /* Highlight border */
}

/* Image Inside Cards */
.devices ul li img {
    max-width: 100%; /* Ensure image doesn't overflow */
    height: auto;
    max-height: 150px; /* Maintain consistent size */
}

/* Text Inside Cards */
.devices ul li p {
    text-align: center;
    color: #f9f9f9; /* Match text color with theme */
    font-size: 16px; /* Slightly larger font size */
    font-weight: bold; /* Make the text bold */
    margin-top: 10px;
}  

/* Highlight Selected Card */
.devices ul li.selected {
    /* background-color: #f9f9f9; Slightly lighter background */
    color: #01325c;
    border: 2px solid #FDD400; /* Highlight selected card */
}


#randomCode:hover {
    background-color: #FDD400;
    color: #fff;
    transform: scale(1.05);
}

#inputRandomCode:focus {
    border-color: #FDD400;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 214, 0, 0.5);
}



/* Styling for download alert section */
.download-alert {
    background-color: #ffeb3b;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.downloadalart {
    display: inline-block;
    padding: 10px 20px;
    background-color: #FDD400;
    color: #000;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    border: 2px solid #FDD400;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.downloadalart:hover {
    background-color: #01325c;
    color: #fff;
    transform: scale(1.05);
}

.download-alert span {
    font-size: 16px;
}

#submit {
    background-color: #01325c; /* navi blue */
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}

#submit:hover {
    background-color: #FDD400; /* yellow */
    color: black; /* Hover color */
}


/* Tips sections styling */
.download-tips, .zlog-tips {
    margin-top: 15px;
}

.tips1, .tips2 {
    margin: 5px 0;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
}

.config-inform {
    display: flex;
    margin-top: 20px;
}

.config-inform img {
    max-width: 50px;
    margin-right: 10px;
}

.alarmtip {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
}

/* Footer */
.foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(90deg, #FDD400 15%, #219c6e 85%);
    color: #fff;
    font-size: 14px;
    margin-top: 20px;
}

.footlink a {
    text-decoration: none;
    color: #fff;
    padding: 0 15px;
    transition: 0.3s;
}

.footlink a:hover {
    color: #FDD400;
}


/* Expandable Section */
.Expand {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
}

.Expand .ExpandLeft {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.Expand .ExpandRight {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ExpandInput {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.ExpandInput:focus {
    border-color: #FDD400;
    outline: none;
}

#tripdesc {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    display: block;
}

#tripdesc {
    display: block !important; /* Ensure it's visible */
    visibility: visible !important;
}

#tripdesc-container {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
}

#tripdesc {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.4;
}


/* Styling for the Language Selector */
.left .Lang {
    margin-bottom: 20px;
    width: 100%;
    height: 35px;
    border-radius: 5px;
    text-align: center;
    background-color: #ffffff;  /* White background */
    border: 2px solid #003366;  /* Blue border */
    color: #003366;  /* Blue text */
}

.left .Lang option {
    background-color: #ffffff; /* White background for options */
    color: #003366;  /* Blue text for options */
}

/* Hover effect for the Lang select */
.left .Lang:hover {
    border-color: #006699;  /* Lighter blue on hover */
}




/* Responsive Design */
/* @media (max-width: 768px) {
    .main {
        flex-direction: column;
    }

    .left {
        position: static;
        height: auto;
        width: 100%;
    }

    .right {
        margin-left: 0;
    } */

    /* Responsive Design */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
        padding: 15px; /* Adjust padding for smaller screens */
    }

    /* Adjust Sidebar (left) for mobile view */
    .left {
        position: static;
        height: auto;
        width: 100%;
        padding: 10px; /* Reduce padding for better space utilization */
    }

    /* Adjust Right Content Area for mobile */
    .right {
        margin-left: 0;
        padding: 10px; /* Adjust padding */
    }

    /* Menu Links in mobile view */
    .menu {
        flex-direction: column; /* Stack menu items vertically */
        padding: 10px;
    }

    .menu a {
        font-size: 16px; /* Increase font size for better readability */
        padding: 12px;  /* Add more padding for touch-friendly interaction */
        text-align: center; /* Center the text */
        width: 100%; /* Make the links take up the full width */
        margin: 5px 0;  /* Add spacing between links */
    }

    /* Adjust Device Cards for smaller screens */
    .devices ul {
        flex-direction: column; /* Stack the device cards vertically */
        gap: 10px; /* Add space between cards */
    }

    .devices ul li {
        width: 100%; /* Make the device cards take full width */
        height: auto; /* Adjust the height to fit content */
        padding: 20px; /* Add padding for better spacing */
    }

    /* Sidebar links */
    .left .link li {
        font-size: 16px; /* Increase font size for easier reading */
        padding: 15px; /* Add more padding for touch-friendly interaction */
    }

    /* Language Selector */
    .left .Lang {
        width: 100%; /* Make the language selector take up full width */
        font-size: 16px; /* Make text inside the selector larger */
        padding: 10px; /* Add padding for easier interaction */
    }

    /* Footer Adjustments */
    .foot {
        flex-direction: column; /* Stack footer elements vertically */
        align-items: center; /* Center align footer content */
    }

    .footlink a {
        padding: 10px 0; /* Add vertical padding for easier interaction */
        font-size: 16px; /* Increase font size for better readability */
    }

    /* Adjust the header for mobile screens */
    header {
        padding: 10px 20px; /* Adjust padding for mobile */
    }

    header .header-content h1 {
        font-size: 18px; /* Reduce font size for header */
    }

    .header img {
        max-width: 100px; /* Limit the size of the image */
        margin-left: 20px; /* Adjust spacing */
    }

    
}

