:root {
  /* --gblue: #4889F4; */
  --gblue: #007bff;
  --gred: #EB493B;
  --gyellow: #FBBE0D;
  --ggreen: #3AAB58;
  --cblue: #005073;
  --charcoal: #1F1F1F;
  --darkgray: #808080;
}

/* Base styles */
body {
    font-family: sans-serif, system-ui;
    background-color: #f8f9fa;
    letter-spacing: 0.3px;
}

.container {
    margin-top: 50px;
}

.content {
    margin-left: 14rem;
    margin-right: 1rem;
    margin-top: 4rem;
}


/* checkboxes */
.form-check-input {
  height: 1rem;
  width: 1rem;
}


/* Slider Toggle Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 25px;
    /* height: 34px; */
  }
  
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  /* height: 26px; */
  width: 20px;
  /* width: 26px; */
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--gblue);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--gblue);
}

input:checked + .slider:before {
  -webkit-transform: translateX(32px);
  -ms-transform: translateX(32px);
  transform: translateX(32px);
  /* -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px); */
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}




/* Table Styling */

table {
  width: 100%;
}

table .actions {
  min-width: 6rem;
}

.emptytable {
  min-height: 4rem;
  background-color: #eee;
  padding: 1rem;
  text-align: center;
}


.green-circle {
  width: 1rem; /* Adjust size as needed */
  height: 1rem;
  background-color: var(--ggreen);
  border-radius: 50%; /* Makes it a circle */
}

.red-circle {
  width: 1rem; /* Adjust size as needed */
  height: 1rem;
  background-color: var(--gred);
  border-radius: 50%; /* Makes it a circle */
}

.yellow-circle {
  width: 1rem; /* Adjust size as needed */
  height: 1rem;
  background-color: var(--gyellow);
  border-radius: 50%; /* Makes it a circle */
}

.gmaps-circles {
  justify-content: right;
}

.gmaps-circles label {
  /* margin-left: 0.3rem;
  margin-right: 1rem; */
  width: unset !important;
}

.gmaps-circles img {
  height: 20px;
  width: unset !important;
  padding-right: unset !important;
}

.configure-buttons {
  margin-top: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}


.btn-container {
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  margin-left: 0.6rem;
  flex-wrap: nowrap;
}

.btn-container .btn {
  padding: 0px;
  padding-bottom: 0rem;
  border-radius: 3rem;
  height: 2rem;
  width: 2rem;
}

.btn-container label {
  margin-left: 1rem;
  padding-top: 0.3rem;
}

.material-symbols-sharp {
  font-size: 30px !important;
}


#map {
  height: 400px;
  width: 100%;
  min-width: 19rem;
  
}


.patrol {
  padding: 0 !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

#shutter {
  opacity: 0;
  transition: all 30ms ease-in;/* Shutter speed */
  position: fixed;
  height: 0%;
  width: 0%;
  pointer-events: none;
  background-color: white;/* Shutter Color */
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%)
}

#shutter.on {
  opacity: 1;/* Shutter Transparency */
  height: 100%;
  width: 100%;
}



#captured-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.captured-image-container {
  position: relative;
}
.captured-image-container img {
  max-width: 200px;
  height: auto;
  border: 1px solid #ccc;
}
.delete-button {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: rgba(255, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 5px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 12px;
}
#image-capture-input {
  display: none; /* Hide the file input */
}


.popover-custom {
  width:1.2rem;
  height:1.2rem;
}


.legend img {
  width: 15px;
  height: 20px;
  margin-right: 0.5rem;
}

.legend span {
  font-size: 0.8rem;
}

.circle-chart {
  width: 200px;
  height: 200px;
}


.flash-checkbox-hidden {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none; /* Ensure it can't be interacted with directly */
}

/* Style the icon container label */
#flash-icon {
  color: white; /* Default color (assuming dark background) */
  transition: color 0.2s ease-in-out;
  /* If using fillable icons */
  font-variation-settings: 'FILL' 0;
   transition: color 0.2s ease-in-out, font-variation-settings 0.2s ease-in-out;
}

/* Change icon color and fill when the hidden checkbox is checked */
.flash-checkbox-hidden:checked + #flash-icon {
  color: #fdd835; /* Yellow color when checked */
  font-variation-settings: 'FILL' 1; /* Make filled */
}

.pie-chart {
  /* Use custom properties for flexibility */
  --percentage: 0;      /* Default percentage */
  --color: #03a9f4;   /* Default active color (Tomato) */
  --track-color: #ddd; /* Default track color */
  --size: 150px;      /* Default size */
  --thickness: 5px;   /* Thickness of the chart ring */

  width: var(--size);
  height: var(--size);
  border-radius: 50%; /* Make it a circle */
  position: relative; /* Needed for centering text */
  display: inline-flex; /* Use flex to center text easily */
  align-items: center;
  justify-content: center;

  /* The magic: conic-gradient background */
  background: conic-gradient(
    var(--color) calc(var(--percentage) * 1%), /* Active color segment */
    var(--track-color) 0 /* The rest is the track color */
    /* '0' means the track color starts immediately after the active color ends */
  );
}

.pie-chart .inner-div {
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.pie-chart-container {
  width: 100%;
  text-align: center;
  justify-content: space-evenly;
  display: flex;
  margin-bottom: 1rem;
}

/* Create the "hole" in the middle to make it a donut */
.pie-chart::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  /* Calculate the inner circle size based on thickness */
  width: calc(var(--size) - (var(--thickness) * 2));
  height: calc(var(--size) - (var(--thickness) * 2));
  background-color: white; /* Or match your page background */
  border-radius: 50%;
  transform: translate(-50%, -50%); /* Center the pseudo-element */
  z-index: 1;
}

.inner-text-lg {
  font-size: calc(var(--size) / 6); /* Adjust text size relative to chart size */
  font-weight: bold;
  color: #333;
  z-index: 2;
}

.inner-text-sm {
  font-size: calc(var(--size) / 9); /* Adjust text size relative to chart size */
  font-weight: light;
  color: #333;
  z-index: 2;
  width: 99%;
}

/* Optional: Add a subtle hover effect */
.pie-chart:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Mobile styles */
@media (max-width: 768px) {

  .content {
    margin-left: 1rem;
    margin-right: 1rem;
    margin-top: 5rem;
  }
  .circle-chart {
    width: 100px;
    height: 100px;
    display:none;
  }

  .pie-chart {
    --size: 80px;      /* Default size */
  }

  .inner-text-sm {
    font-weight: bold;
  }
  
}
