/* Import Lato Font */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

/* General Reset */
html, body {
  margin: 0;
  padding: 0;
  height: 100%; /* Ensure full viewport height */
  background-color: #121212; /* Global dark background */
  color: #e0e0e0; /* Light text for readability */
  font-family: 'Lato', sans-serif; /* Updated font to Lato */
  display: flex;
  flex-direction: column;
}

body {
  background-color: #121212 !important; /* Matches your desired dark theme */
  margin: 0;
  padding: 0;
  color: #e0e0e0; /* Ensures readability */
}

/* Sticky Navbar */
.navbar {
  background-color: #1e1e1e !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  color: #28a745 !important;
  font-weight: bold;
}

.nav-link {
  color: #28a745 !important;
}

.nav-link.text-danger {
  color: #dc3545 !important;
}

.nav-link:hover {
  color: #22c55e !important;
}

.navbar-toggler {
  border-color: #28a745;
}

/* Hide Navbar on Mobile 
@media (max-width: 768px) {
  .navbar {
    display: none;
  }
}
*/
/* Remove Bullet Points */
ul.navbar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Main Content Styling */
main.container {
  background-color: #1e1e1e;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  /*margin: 3rem auto;*/
  /*max-width: 960px;*/
}

body > main {
  flex: 1;
  background-color: #121212; /* Ensure no white gaps */
}

/* Dashboard Cards */
.card {
  background-color: #1e1e1e !important; /* Dark card background */
  color: #e0e0e0 !important; /* Light text */
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
  border: none !important; /* Removes the border */
  padding: 0 !important; /* Removes the padding */
  text-align: center;
}

.card h5 {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.macro-graphics {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important; /* Removes the box shadow */
  padding: 0 !important; /* Removes padding */
  /* Added */
  min-height: 125px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.habit-grid {
  justify-content: center;
}

.habit-card-column {
  display: flex;
}

.habit-card-column .card {
  min-height: 230px;
}

.macro-graphics h4 {
    /* Use clamp for fluid font sizes */
    font-size: clamp(1.25rem, 2.5vw, 2rem);
}

.gauge-holder {
  width: min(160px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Grid Layout */
.row {
  display: flex;
  gap: 1.5rem;
  justify-content: space-around;
}

.col-md-6 {
  flex: 1;
  max-width: 48%;
}

/* Form Styling */
.form-control, .form-select {
  background-color: #2a2a2a; /* Dark input background */
  border: none;
  color: #e0e0e0 !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.form-control:focus, .form-select:focus {
  background-color: #333;
  box-shadow: 0 0 4px #28a745;
  outline: none;
}

/* Buttons */
.btn-primary, .btn-success {
  background-color: rgb(40, 167, 69) !important;
  border: none;
  color: #fff !important;
  font-weight: bold;
  text-transform: uppercase;
}

/* Hover styling */
.btn-primary:hover, .btn-success:hover {
  background-color: #22c55e !important; /* Same green hover color */
  color: #ffffff !important;           /* Explicitly keep text white */
  transform: scale(1.02);
  transition: all 0.2s ease-in-out;
}

/* Links */
a {
  color: #28a745 !important;
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  color: #22c55e !important;
}

/* Footer */
footer {
  background-color: #1e1e1e;
  color: #b3b3b3;
  text-align: center;
  padding: 1rem 0;
  margin-top: auto;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.4);
}

/* Full Height Background Fix */
body > footer {
  background-color: #121212;
}

/* Adjustments for Smaller Screens */
@media (max-width: 768px) {
  .col-md-6 {
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .navbar-collapse {
    text-align: center;
  }

  .navbar-nav {
    margin: 0 auto;
  }

  #logFoodButtonContainer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(env(safe-area-inset-bottom, 0) + 16px);
    padding: 0 16px;
    margin: 0;
    z-index: 1050;
    pointer-events: none;
  }

  #logFoodButtonContainer .btn {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    font-weight: 700;
  }

  .dashboard-content {
    padding-bottom: calc(128px + env(safe-area-inset-bottom, 0));
  }
}

.form-control {
  color: #f5f5f5 !important; /* Brighter text */
  background-color: #2a2a2a !important; /* Darker background */
  font-weight: 600; /* Slightly bolder text */
}

.form-control:focus {
  background-color: #333 !important; /* Even darker focus state */
  border-color: #28a745 !important; /* Green border for focus */
  color: #ffffff !important; /* Keep text bright */
}

.status-indicator {
  display: inline-block;
  width: 10px;       /* Adjust size as needed */
  height: 10px;
  margin-left: 0.5rem; /* Space between text and circle */
  border-radius: 50%;  /* Makes it circular */
}

/* Example color classes */
.bg-green {
  background-color: #28a745;
}
.bg-yellow {
  background-color: #ffc107;
}
.bg-red {
  background-color: #dc3545;
}

@media (min-width: 992px) {
  .list-lg-margin {
    margin: 0 11%; /* 15% margin on the left and right only on large screens */
  }
}

.bg-gray {
  background-color: #6c757d;
}

.binary-indicator {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1;
}

.binary-indicator.completed {
  color: #28a745;
}

.binary-indicator.pending {
  color: #dc3545;
}

.status-dot-large {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 0.5rem auto;
}

.gauge-placeholder {
  font-size: 1.5rem;
  color: #6c757d;
  line-height: 1;
}
