/* === Global Reset & Base Styles === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 15;
  }
  
  body {
    font-family: 'Inter', sans-serif;
    background-color: #fafafa; /* Light grey background */
    color: #260101;           /* Deep text color */
    padding: 20px;
  }
  
  /* === Container === */
  .container {
    /* max-width: 1000px; */
    width: 95%;
    margin: 20px auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    /* Subtle shadow for the main container */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  /* === Header === */
  .header {
    background-color: #FFC844; /* Warm yellow brand color */
    color: #260101;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
  }
  
  .header h1 {
    font-size: 2em;
    margin: 0;
  }
  
  /* === Navigation Bar === */
  .nav-bar {
    background-color: #D7952F; /* Secondary accent color */
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
    margin-top: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
  }
  
  .nav-bar a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
  }
  
  .nav-bar a:hover {
    background-color: #FEC994; /* Light accent for hover */
    color: #260101;
  }
  
  .nav-bar a.active {
    background-color: #260101;
    color: #FFC844;
  }
  
  /* === Form Container === */
  form {
    background-color: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 8px;
    /* Very subtle shadow or remove if you prefer no shadows at all */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    max-width: 720px;
    margin: 20px auto;
  }
  
  /* Form Titles */
  form h1,
  form h2
  {
    color: #260101;
    font-weight: 700;
    margin-bottom: 1rem;
  }

  form h3 {
    color: #D7952F;
  }
  
  /* Section backgrounds to visually separate big sections */
  .section {
    background-color: #FEC99420; /* Light, translucent overlay of brand color (#FEC994) */
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
  }
  
  fieldset legend {
    font-size: 1.3em;
    font-weight: bold;
    color: #D7952F;
    margin-bottom: 0.75rem;
    margin-top:1.25rem;
  }


  .grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 5px;
}

.grid-container-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }
  
  /* Example styling for the size-group in the 3M section */
  .size-group {
    margin-top: 1rem;
  }
  
  .size-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  
  .size-header > div {
    flex: 1;
    text-align: center;
    font-weight: bold;
  }
  
  .size-inputs {
    display: flex;
    gap: 10px;
  }
  
  .size-inputs input {
    flex: 1;
    text-align: center;
  }


  /* Field Labels */
  form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #260101;
  }
  
  /* Inputs, Textareas, Selects */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="datetime-local"],
  input[type="date"],
  input[type="file"],
  textarea,
  select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background-color: #fff;
    transition: border-color 0.3s;
  }
  
  input:focus,
  textarea:focus,
  select:focus {
    border-color: #D7952F;
    outline: none;
  }
  
  /* Textarea Specifics */
  textarea {
    min-height: 100px;
    resize: vertical;
  }
  
/* Hide the native checkbox */
.checkbox-container input[type="checkbox"] {
    display: none;
  }
  
  /* Style the label to look like a button and add left padding */
  .checkbox-btn {
    display: inline-block;
    padding: 0.25rem 0.5rem 0.25rem 1.35rem; /* left padding increased for checkmark */
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
    user-select: none;
    position: relative;
    background-color: white;
    margin-right: 0.5rem;
  }
  
  /* Use the ::before pseudo-element to display the checkmark on the left side */
  .checkbox-btn::before {
    content: "✓";
    font-size: 1rem;
    color: transparent;  /* Initially hidden */
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    transition: color 0.3s;
  }
  
  /* Hover effect for the button */
  .checkbox-btn:hover {
    border-color: #D7952F;
  }
  
  /* When the checkbox is checked, change the background, border, text, and show checkmark */
  .checkbox-container input[type="checkbox"]:checked + .checkbox-btn {
    background-color: #FFC844;
    border-color: #D7952F;
    color: #260101;
  }
  
  .checkbox-container input[type="checkbox"]:checked + .checkbox-btn::before {
    color: #260101;
  }

  .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
  }

  /* File Upload Field */
  input[type="file"] {
    padding: 0.75rem;
    border: 2px dashed #D7952F;
    background-color: rgba(254, 201, 148, 0.15); /* Slightly more visible color for the drop zone */
    cursor: pointer;
  }
  
  /* === Buttons === */
  button,
  input[type="submit"] {
    background-color: #FFC844;
    color: #260101;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  button:hover,
  input[type="submit"]:hover {
    background-color: #D7952F;
    color: #fff;
  }
  
  /* Optional Secondary Button */
  .button-secondary {
    background-color: transparent;
    border: 2px solid #260101;
    color: #260101;
  }
  
  .button-secondary:hover {
    background-color: #260101;
    color: #fff;
  }
  
  /* Grid Layout for Consumable Fields */
  .grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 10px;
  }
  
  /* Checkbox & Radio Groups */
  .checkbox-group,
  .radio-group {
    margin-top: 10px;
  }
  
  .checkbox-group label,
  .radio-group label {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
  }
  
  .checkbox-group input[type="checkbox"],
  .radio-group input[type="radio"] {
    margin-right: 5px;
  }
  
  /* Flash Messages (e.g. for success, error) */
  ul.flashes {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
  }
  
  ul.flashes li {
    background-color: #ffdddd;
    border: 1px solid #ff5c5c;
    color: #a94442;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
  }
  
  /* === Responsive Adjustments === */
  @media (max-width: 600px) {
    .nav-bar {
      flex-direction: column;
      align-items: center;
    }
    
    .nav-bar a {
      margin-bottom: 6px;
    }
    
    form {
      margin: 10px auto;
      padding: 1.5rem;
    }
  }


  /* ----- Layout for Base Template ----- */
.page-container {
    display: flex;
    min-height: 100vh;
  }
  
  /* Sidebar Styling */
/* Sticky sidebar and adjusted content margin */
.sidebar {
  position: fixed;
  top: 0;
  left:0px;            /* stick to the very top of the viewport */
  align-self: flex-start;
  /* background:white; */
  padding:1.5rem;
  height:100vh;
  margin-bottom: -15px;
  max-width:260px;
 /* ensure it doesn’t stretch oddly in a flex layout */
  /* remove any bottom or height rules here */
}
.main-content {
  margin-left: 220px; /* still push the content over to accommodate the sidebar */
}
  
  .sidebar h2 {
    color: #260101;
    font-size: 1.5em;
    margin-bottom: 20px;
  }
  
  .sidebar ul {
    list-style: none;
    padding: 0;
  }
  
  .sidebar ul li {
    margin-bottom: 4px;
    border-bottom:rgba(254, 201, 148, 0.15);
    border-bottom:solid;
  }
  
  .sidebar ul li a {
    text-decoration: none;
    color: #260101;
    font-weight: bold;
    padding: 8px 12px;
    display: block;
    border-radius: 4px;
    transition: background-color 0.3s;
  }
  
  .sidebar ul li a:hover {
    background-color: #D7952F;
    color: #FFC844;
  }


  .sidebar-footer form {
    background: none;
    padding: 0;
  }
  
  /* Main Content Styling */
  .main-content {
    flex: 1;
    padding: 20px;
  }
  
/* ----- Calendar View Specific Styles ----- */

/* Fixed sidebar and adjusted content margin */


  .calendar-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .calendar-info {
    flex: 1 1 300px;
    background-color: rgba(254, 201, 148, 0.2);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
  }
  
  .calendar-iframe {
    flex: 2 1 500px;
  }
  
  /* ----- Existing Styles (unchanged) ----- */
  /* (Keep your existing styles for header, navigation, forms, etc.) */

  /* Map container styling */
#map {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 6px;
  }

  .mapboxgl-ctrl-geocoder {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .mapboxgl-ctrl-geocoder input[type='text'] {
    padding: 10px;
    padding-left: 35px!important;
    border: 1px solid #ccc;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom:0px!important;
  }

  #mapbox-geocoder {
    width: 100%!important;
    margin-bottom: 15px;
    height: 50px;
  }
  #mapbox-address-container {
    width:100%!important;
  }

  /* === Job Ticket Styles === */
.job-ticket-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.job-ticket-container h1 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  color: #260101;
  text-align: center;
}

.job-ticket-container .grid-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.job-ticket-container dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
}

.job-ticket-container dt {
  font-weight: 600;
  color: #D7952F;
  align-self: start;
}

.job-ticket-container dd {
  margin: 0 0 0.75rem 0;
  color: #260101;
}

.job-ticket-container .button {
  background-color: #D7952F;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.job-ticket-container .button:hover {
  background-color: #bf7e25;
}

.job-ticket-container .button-secondary {
  background-color: transparent;
  border: 2px solid #260101;
  color: #260101;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.job-ticket-container .button-secondary:hover {
  background-color: #260101;
  color: #ffffff;
}

.job-ticket-container iframe {
  width: 100%;
  height: 300px;
  border: none;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .job-ticket-container .grid-container {
    grid-template-columns: 1fr;
  }
}

/* === Invoice Card View Styles === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.job-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.job-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #260101;
}

.job-card h2 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.job-card h2 a:hover {
  color: #D7952F;
}

.job-card p {
  margin-bottom: 0.5rem;
  color: #444444;
  line-height: 1.4;
}

.card-actions {
  margin-top: auto;
  text-align: right;
}

.card-actions .button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.card-actions .button-secondary {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

/* Status pills (optional) */
.job-card .status-pill {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.job-card .status-pill.requested { background-color: #ffc10720; color: #bf8c00; }
.job-card .status-pill.booked    { background-color: #17a2b820; color: #117a8b; }
.job-card .status-pill.completed { background-color: #28a74520; color: #1e7e34; }
.job-card .status-pill.invoiced  { background-color: #6f42c120; color: #4e2a84; }

/* Responsive adjustments */
@media (max-width: 600px) {
  .job-card {
    padding: 1rem;
  }
  .job-card h2 {
    font-size: 1.1rem;
  }
}

#flash-terminal {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  color: #fbff00;
  font-family: monospace;
  padding: 0.5rem;
  max-height: 150px;
  overflow-y: auto;
  z-index: 1000;
  border-top: 2px solid rgb(255, 251, 0);
}
#flash-terminal .flash-line {
  margin: 0;
  padding: 0.25rem 0;
}

/* Calendar Selector Custom Checkboxes */
.calendar-checkbox-container {
  display: block;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  color: #260101;
}
.calendar-checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
  cursor: pointer;
}
.calendar-checkbox-container .calendar-custom-checkbox {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1.25rem;   /* 20px */
  width: 1.25rem;    /* 20px */
  border: 2px solid #000;
  border-radius: 50%;
  background: #fff;
}
.calendar-checkbox-container input[type="checkbox"]:checked ~ .calendar-custom-checkbox:after {
  content: "✔";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-size: 1.15rem;
  background: #FFC844;
  border-radius: 50%;
}
.calendar-checkbox-container input[type="checkbox"]:checked + .calendar-custom-checkbox {
  background: #FFC844;
}