/* General Style */
.navbar>.container-fluid {
    width: 60vw;
}

@media only screen and (max-width: 600px) {
.navbar>.container-fluid {
  width: 100vw;
}
}

.bg-light {
background-color: #1E4D2B !important;}

.navbar .navbar-brand {
    color: white;
}

a.nav-link {
    color: white;
}

.navbar {
  position: relative; /* Set navbar to relative so the image can be positioned in front of it */
}


.navbar-toggler {
    border-color: white !important; /* Changes the border color */
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}



.navbar-img {
  position: fixed;
  top: 28px; /* Fixed image to the top */
  left: 50%; /* Center the image horizontally */
  transform: translate(-50%, -50%); /* Adjust the position to truly center the image */
  height: 56px; /* Set the image height to match the navbar height */
  object-fit: contain; /* Ensure the aspect ratio is maintained */
}

.sticky-top {
            position: -webkit-sticky;
            position: sticky;
            top: 0;
            z-index: 1030; /* Ensures it appears above the content */
        }

h2.h2_dash {
    text-align: center;
    background-color: green;
    color: white;
    font-weight: bolder;
}

.content {
    text-align: center;
}

ul#pagination {
    /* margin: auto; */
    /* text-align: center; */
    display: inline-flex;
}

.pagination {
    display: flex !important;
    justify-content: center !important;
}

.obfuscated {
    display: none;
}

.reveal-btn {
    cursor: pointer;
    color: blue;
}


/* Admin Page */

div#admin_page_user_search {
    text-align: center;
}

div#admin_page_user_search > label {
    padding-left: 20px;
}

button#btn_update_user {
    float: right;
    margin-right: 50px;
}

span#page_login {
    text-align: center;
}

div#chartPanel {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 0vw;
    height: 90vh;
    background: white;
    box-shadow: rgba(0, 0, 0, 0.5) -2px 0px 5px;
    transition: right 0.3s;
}

body.page_index {
    height: 100vh !important;
    overflow-y: clip;
    width: 100vw !important;
    overflow-x: clip;
}

/*Front page  */

button#closeChart {

}

#map {
    background-color: white; /* or any other color */
    position: relative; /* Ensures the background covers behind the map */
    z-index: 1; /* Ensure the map is on top of other elements */
}

html, body {
    height: 100%; /* Ensure html and body take full height */
    margin: 0; /* Remove default margin */
}

#chartContainer {
    height: 98%; /* Use the specified height */
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack children vertically */
    justify-content: center; /* Center children vertically */
    align-items: center; /* Center children horizontally (if needed) */
}

#pm25Chart {
    display: block; /* Ensures the canvas behaves like a block element */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    max-height: 100%; /* Optional: prevent overflow */
    width: 100% !important;
    height: 90% !important;
}

@media (max-width: 768px) {
    #pm25Chart {
    height: 70vh !important
}
    }



/* Style for the label box */
.leaflet-control-label {
    background-color: rgba(255, 255, 255, 0.8);
            padding: 10px;
            font-size: 16px;
            font-weight: bold;
            border-radius: 5px;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
            position: relative;
        }

/* Style to ensure the label is at the bottom left */
.leaflet-bottom.leaflet-left {
            bottom: 100px;
            left: 10px;
        }

        /* Style for the control container holding the 6 colored boxes */
        .box-container {
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            align-items: center;
            background: white;
            padding: 10px;
            border-radius: 10px;
            border: 2px solid #ccc;
            width: 120px;
        }

        /* Style for each box */
        .box {
            width: 200px;
            height: 40px;
            display: flex;
            justify-content: center;
            align-items: center;
            color: black;
            font-weight: bold;
            border-radius: 10px;
            text-align: center;
            font-size: 14px;
	    margin: auto;
        }

        /* Specific colors for each box */
        .box1 { background-color: #00e400; 
color: white} 
        .box2 { background-color: #ffff00; }
        .box3 { background-color: #ff7e00; }
        .box4 { background-color: #ff0000; }
        .box5 { background-color: #8f3f97;
	color: white; }
        .box6 { background-color: #7e0023;
color: white; }

/* Sticky bottom bar for small screens */
@media (max-width: 768px) {
    .leaflet-control-label {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        width: 100%;
        max-width: none;
        border-radius: 0;
        font-size: 14px;
        padding: 10px;
        overflow-x: auto;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    }

    .leaflet-control-label .box {
        white-space: nowrap;
        margin-right: 10px;
        flex: 0 0 auto;
        padding: 6px 10px;
        border-radius: 4px;
    }

    .leaflet-control-label .legend_box {
        display: none; /* Hide label on mobile to save space */
    }
}

.legend-toggle {
    background-color: #333;
    color: white;
    border: none;
    padding: 6px 12px;
    margin-bottom: 6px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
}

/* Legend layout */
.leaflet-control-label .legend-content {
  padding: 8px 10px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  max-width: 260px;
  font-size: 13px;
  line-height: 1.3;
}

.leaflet-control-label .legend-toggle {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  margin-bottom: 6px;
}

.leaflet-control-label .legend_box {
  font-weight: 600;
  margin: 4px 0 6px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.legend-text { white-space: nowrap; }

/* Symbol swatches to match map markers */
.legend-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid #888;
  background: #bbb;
  box-shadow: 0 0 0 1px rgba(0,0,0,.2);
  display: inline-block;
}

.legend-square {
  width: 12px; height: 12px;
  border: 2px solid #000;
  background: #bbb;
  display: inline-block;
}

/* Color chips for AQI boxes if you want them filled */
.box1 { background:#00e44c66; border-left:6px solid #00e400; padding:2px 6px; margin:2px 0; }
.box2 { background:#f5f54566; border-left:6px solid #ffff00; padding:2px 6px; margin:2px 0; }
.box3 { background:#ff8a1a66; border-left:6px solid #ff7e00; padding:2px 6px; margin:2px 0; }
.box4 { background:#ff333366; border-left:6px solid #ff0000; padding:2px 6px; margin:2px 0; }
.box5 { background:#a24ca866; border-left:6px solid #8f3f97; padding:2px 6px; margin:2px 0; }
.box6 { background:#7e003366; border-left:6px solid #7e0023; padding:2px 6px; margin:2px 0; }

@media (max-width: 768px) {
    .leaflet-control-label {
        flex-direction: column;
        align-items: flex-start;
    }

    .legend-content {
        display: block; /* initial state: visible */
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
    }

    .legend-content .box {
        flex: 0 0 auto;
    }

    .leaflet-control-label.leaflet-control {
    width: fit-content;
}

    #legend-content {
        display: none;
    }
}



/* Device Page */
button#btn_register_device {
    float: right;
}

div#device_search {
    text-align: center;
}

div#device_search > label {
    padding-left: 20px;
}

.hidden {
    display: none;
}

.table td, .table th {
    padding: 2px !important
}

.device_inactive {
    color: white;
    width: fit-content;
    background-color: lightcoral;
    padding-left: 1px;
    border-radius: 1px;
    padding-right: 1px;
    margin: auto;
}

.device_active {
    color: white;
    width: fit-content;
    background-color: green;
    padding-left: 1px;
    border-radius: 1px;
    padding-right: 1px;
    margin: auto;
}

.device_private {
    color: lightgray;
    width: fit-content;
    background-color: dimgray;
    padding-left: 1px;
    border-radius: 1px;
    padding-right: 1px;
    margin: auto;
}

.device_public {
    color: white;
    width: fit-content;
    background-color: green;
    padding-left: 1px;
    border-radius: 1px;
    padding-right: 1px;
    margin: auto;
}



table {
    text-align: center;
}

/* Login Page */
button#btn_user_register {
    background-color: green;
    display: block;
    text-align: center;
    margin: auto;
    border-radius: 8px;
    border-color : black;
    color: white;
    font-weight: bolder;
}

span#page_login input#submit {
    background-color: green;
    border-radius: 8px;
    padding: 5px;
    COLOR: white;
    font-weight: bolder;
}


/* User Registration PAge */
span#page_registration {
    text-align: center;
}


/* Device Detail Page */
span#page_details {
    text-align: center;
}

form#device_details_form > label {
    font-weight: bolder;
    display: block;
    margin-top: 20px;
}



button#btn_device_details {
    display: block;
    text-alignt: center;
    margin: auto;
    background-color: green;
    display: block;
    text-align: center;
    margin: auto;
    border-radius: 8px;
    border-color : black;
    color: white;
    font-weight: bolder;
    margin-top: 30px;
}

button#btn_back_devices {
   margin: auto;
   text-aling: center;
   display: flex;
}

div#device_explain {
    text-align: center;
    font-style: italic;
}

ul.nav-tabs li {
    background-color: green;
    border-radius: 20px 20px 0 0;
    color: white !important;
    font-weight: bolder;
    margin-left: 10px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

ul.nav-tabs li a {
    color: white;
}

/* Manage API Page */
span#page_api {
    text-align: center;
}

span#page_api > table {
    text-align: center;
    margin: auto;
}


span#page_api > input {
    text-align: center;
    margin: auto;
    display: flex;
    margin-top: 20px;
}

span#page_api label {
    font-weight: bolder;
    display: block;
    margin-bottom: 0px;
}

span#page_api button {
    display: block;
    margin: auto;
    margin-bottom: 20px;
    background-color: green;
    display: block;
    text-align: center;
    margin: auto;
    border-radius: 8px;
    border-color : black;
    color: white;
}

button.btn_delete {
    color: red !important;
    border: none  !important;
    background: none !important;
    background-color: white !important;
    cursor: pointer !important;
    border-style: solid !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19) !important;
    padding-botton: 0px !important;
}

ul#user_pagination, ul#device_pagination, {
    display: inline-flex !important;
}

/* Fleet Health */
span#page_fleet > table {
    margin: auto;
    width: 80%;
}

/* Info Box Sections */
/* Container for the info circle and popup */
    .info-container {
      position: absolute;
      display: inline-flex;
      align-items: center;
      cursor: pointer;
      padding-left: 5px;
      right: 8px;
    }

    /* Styling the info circle */
    .info-circle {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background-color: #007bff;
      color: white;
      font-size: 14px;
      text-align: center;
      line-height: 20px;
      font-weight: bold;
      margin-right: 10px; /* Spacing between circle and text */
      
    }

    /* The popup box */
    .info-popup {
      display: none;
      position: absolute;
      top: 0;
      left: 30px; /* Place to the right of the circle */
      background-color: #fff;
      border: 1px solid #ddd;
      border-radius: 5px;
      padding: 10px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      z-index: 10;
      white-space: nowrap;
      color: black;
    }

    /* Show the popup on hover */
    .info-container:hover .info-popup {
      display: block;
    }


/* T&C Lightbox */
    /* Sticky button */
    .sticky-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #1E4D2B;
        color: white;
        padding: 5px 10px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        z-index: 9999;
        font-size: xx-small;
    }

    .sticky-button:hover {
        background-color: #005bb5;
    }

    /* Lightbox popup */
    .lightbox {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        justify-content: center;
        align-items: center;
        z-index:9999;
    }

    .lightbox-content {
        background: #fff;
        padding: 20px;
        border-radius: 8px;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .lightbox-close {
        background: #1E4D2B;
        color: white;
        padding: 5px 10px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        margin-top: 10px;
    }

    .lightbox-close:hover {
        background: #005bb5;
    }



/* Start sample page */
p#start_sample_instructions {
    width: 70vw;
    text-align: center;
    margin: auto;
}

.qr_camera_div {
    border-style: solid;
    width: 100vw;
    min-width: fit-content;
    margin-bottom: 10px;
    margin: auto;
    padding: 13px;
    margin-bottom: 20px;
    border-radius: 20px;
    border-width: thick;
    box-shadow: 5px 5px #1E4D2B;
}

button#start-sampler {
    background-color: green;
    display: block;
    text-align: center;
    margin: auto;
    border-radius: 8px;
    border-color : black;
    color: white;
    font-weight: bolder;
}


/* About page */

.carousel-img {
    max-height: 30vh;
    width: auto;
    object-fit: contain;
}

 .about_content-container {
        max-width: 70vw;
        margin: 0 auto; /* Centers the content */
        text-align: left;
}


.about_content-container > p {
  text-align: justify;
  text-justify: inter-word;
}


/* Precheck page */
 .precheck_content-container {
        max-width: 70vw;
        margin: 0 auto; /* Centers the content */
        text-align: left;
}


.precheck_content-container > p {
  text-align: justify;
  text-justify: inter-word;
}

div#pollution_sources_div > div {
    text-align: left;
}


/* Informed consent page */
 .informed_content-container {
        max-width: 70vw;
        margin: 0 auto; /* Centers the content */
        text-align: left;
}

.consent_header {
color:orange;
font-style:emphasis;
font-style:underline
}


.informed_content-container p {
  text-align: justify;
  text-justify: inter-word;
}


/* Intake form */
.add_alt_div {
    border-style: solid;
    margin: 10px;
    padding: 10px;
}

 .intake_content-container {
        max-width: 70vw;
        margin: 0 auto; /* Centers the content */
        text-align: left;
}



/* Start EDF Sample Page */

button#edf_check_status {
    background-color: green;
    display: block;
    text-align: center;
    margin: auto;
    border-radius: 8px;
    border-color : black;
    color: white;
    font-weight: bolder;
}

span#edf_status_field {
    display: block;
}

.qr_camera_div {
    display: none;
}


/*Start of FAQ*/
.faq {
  margin: 10px 0 20px 0;
  text-align: left;
  padding-left: 20px;
}

h2.faq {
  color: green;
  padding-top: 20px;
}

.faq h3 {
  margin-bottom: 5px;
  color: #2c3e50;
}

.faq p {
  margin: 0 0 10px 0;
}


/*Follow up survey*/
ul#outdoor_cooking {
    list-style: none;
}

ul#construction_observed {
    list-style: none;
}

ul#other_sources {
    list-style: none;
}


select#device_id_select {
    background-color: coral;
    font-weight: bold;
    border-radius: 20px;
    color: white;
}

.flash-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 2000;
  text-align: center;
  pointer-events: none; /* clicks pass through except the alert itself */
}

.flash-container .flash-message {
  display: inline-block;
  width: 100%;
  margin: 0;
  border-radius: 0;
  white-space: normal;      /* wrap within full width */
  overflow-wrap: anywhere;  /* avoid ugly overflow on long tokens */
  pointer-events: auto;     /* allow closing the alert if it has a dismiss button */
  /* optional animation */
  animation: flashSlideDown 0.3s ease-out;
}

@keyframes flashSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}


span#opera_status_field {
    display: block;
}