/* New and improved contact page */

table.easy-read-table {
  border: 1px solid gray;
  margin-bottom: 10px;
  font-size: 1.3em;
  border-collapse: collapse;
}

.easy-read-table td {
  padding: 5px;
  border: 1px solid lightgray;
  width: auto;
}

.easy-read-table th {
  background-color: #ebebeb;
  color: #333;
  font-weight: bold;
  text-align: left;
  padding: 8px;
  border: 1px solid #ccc;
  border-bottom: 2px solid lightgray;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.5px;
}

/* Add hover effect to table rows for better readability */
.easy-read-table tr:hover {
  background-color: #f8f8f8;
}

.contact-title-buttons {
    vertical-align: middle;
    margin-left: 40px;
}

#job_container {
  display: flex;
  height: calc(100vh); /* Adjust height based on the header height */
  padding-top: 34px; /* Space for the fixed header */
}

#job_list{
  min-width:200px;
  max-width:200px;
  overflow-y: auto;
  height: 100%;
  border-right: 1px solid lightgray;
  padding-right: 2px;
  padding-top: 4px;
}

#job_display {
  margin-left: 20px; 
  overflow-y: auto;
  height: 100%;
  flex-grow: 1;
  padding-top: 4px;
}

#secondary_navbar {
  position: fixed;
  top: 42px;
  left: 0;
  width: 100%;
  background-color: white;
  z-index: 999; 
  padding: 3px 0px 3px 10px;
  border-bottom: 1px solid lightgray;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}

#secondary_navbar_content {
  display: flex;
  align-items: center;
}

#page_title{
  font-size: 1.5em;
  margin-right: 10px;
}


.bs-button {
  border-radius: 3px;
  border: 1px solid black;
  padding: 5px;
  background-color: #fff;
  color: black;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  margin-bottom: 3px;
  margin-left: 1px;
  margin-right: 3px;
  min-width: 30px;
  font-weight: bold;
  box-sizing:border-box; 
  line-height: normal;
}

.bs-button:disabled,
.bs-button.disabled, .bs-button[aria-disabled="true"]  {
  pointer-events: none;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  color: #aaa;
  cursor: not-allowed;
  opacity: 0.6;
}

.bs-button:hover {
  filter: brightness(90%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow on hover */
  transform: scale(1.02); /* Slightly larger on hover */
}

.bs-button.align-left {
  text-align: left;
}

.bs-button.large {
  font-size: 1.5em;
}

.bs-button.medium {
  font-size: 1.1em;
}

.bs-button.normal-font {
  font-weight: normal;
}

.bs-button.small {
  font-size: .9em;
  font-weight: 500;
  padding: 1px 4px;
}

.bs-button.full-width {
  width: 100%;
}

.secondary_navbar_button{
  line-height: 1em;
  margin-right: 7px; /* Add some space between the title and the button */
  margin-bottom: 0px;
}

/* important link */
.bs-button-important {
  background-color: #007bff;
  color: white;
}

/* delete */
.bs-button-delete {
  background-color: #dc3545;
  color: white;
}

/* create new */
.bs-button-new {
  background-color: #28a745;
  color: white;
}

/* edit */
.bs-button-edit {
  background-color: #ffc107;
  color: black;
}

/* make an action */
.bs-button-action {
  background-color: #fd7e14;
  color: white;
}

/* print */
.bs-button-print {
  background-color: #6f42c1;
  color: white;
}

/* view link */
.bs-button-view {
  background-color: #209bc9;
  color: white;
}

.bs-button-gray {
  background-color: #6c757d;
  color: white;
}

.bs-button-white {
  background-color: white;
  color: black;
}

.bs-button-low-key {
  background-color: white;
  color: #6c6c6c;
  border: 1px solid #515151;
}


.dashboard-info-primary {
  margin-bottom: 3px;
  font-size: 12px;
}

.dashboard-info-secondary {
  margin-bottom: 3px;
  padding: 0px 11px;
}

#contact_title{
  font-size: 2em;
}

#contact_title.selected_list_item {
  border: 1px black solid; 
  box-shadow: 0 0 10px rgb(63 61 58 / 92%);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease; /* Smooth transition */
}

#job_list .list_item{
  max-width: 180px;
  color: #5e5c5c;
  border: 1px #8e8d8d solid;
  border-radius: 3px;
  padding: 3px;
  margin-bottom: .5em;
  margin-left: 3px;
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effects */
}

#job_list .list_item:hover {
  color: #000;
  background-color: #f9f9f9; /* Slightly lighter background on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow on hover */
  transform: scale(1.02); /* Slightly larger on hover */
}

#job_list .selected_list_item {
  background-color: #ffeb3b; /* Bright yellow background to stand out */
  border: 2px #ff9800 solid; /* Orange border */
  color: #000308; /* Darker text color for contrast */
  box-shadow: 0 0 10px rgba(255, 152, 0, 0.5); /* Glowing shadow effect */
  transform: scale(1.02); /* Slightly larger to emphasize selection */
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease; /* Smooth transition */
}

.list_item .job_title{
  font-weight: 600;
}

.bundled_job_listing .job_title{
  font-weight: 200;
}

.bundled_job_listing:hover {
  background-color: #dcdcdc; /* Different background color on hover */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Optional: adds a shadow for better separation */
}

#job_list .selected_bundled_list_item {
  background-color: #aad3f6;
  border: solid #000 2px;
}

.bundled_job_listing{
  font-weight: 550;
  padding: 5px;
  background-color: #fff;
  border: 1px solid gray;
  border-radius: 2px;
  margin-bottom: 3px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effects */
}

#job_list .bundled_job_listing:hover {
  border: 2px solid;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Optional: adds a shadow for better separation */
}

/* Form formatting */
dt{
  padding-top: 4px;
  margin-inline-start: 4px;
}  
dd{
  margin-inline-start: 0px;
}  

.single-line{
  display:flex;
  align-items: flex-start;
  padding-top: 8px;
}

.single-line dt {
  margin-right: 2px;
}

.single-line dd {
  margin-right: 4px;
}

.icon-red{
  color: red !important;
}

#edit_schedules .fa-asterisk {
  font-size: 0.6em;
}

input[readonly] {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

/* invoice formatting */
.print-modal-header {
  background-color: #e6f1fc;  /* Lighter, more modern gray */
  border-radius: 8px;         /* More rounded corners */
  text-align: center;
  font-weight: 600;           /* Slightly less bold for modern look */
  padding: 6px;         /* More padding for better spacing */
  margin-bottom: 1.5rem;      /* Add some bottom margin */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #343a40;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.5px;
}

.table-no-wrap
{
	white-space:nowrap;
}

.estimate-print-table{
  width: 90%;
  margin: 0px auto;
}

.estimate-print-table td{
  vertical-align: top;
}

.estimate-print-table p{
  margin: 0px;
}

.secondary-invoice-info{
  font-size: .9em;
}

.tertiary-invoice-info{
  font-size: .8em;
}

/* Header layout for invoice/estimate print */
.header-container {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.logo-container {
  margin-right: 15px;
}

.logo-container img {
  max-width: 150px; /* Adjust based on your logo size */
  height: auto;
}

.company-info {
  display: flex;
  flex-direction: column;
}

.company-name {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 5px;
}

.secondary-invoice-info {
  font-size: 1em;
}

table.minimal {
  width: 100%;
  border-collapse: collapse;
  font-family: sans-serif;
  font-size: 0.9rem;
}

table.minimal th,
table.minimal td {
  padding: 0.5em 0.75em;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

table.minimal thead th {
  border-bottom: 2px solid #bbb;
}

/* Optional: subtle hover highlight */
table.minimal tbody tr:hover {
  background-color: #f9f9f9;
}

.actions{
  margin-top: 8px;
}

/* Form formatting */
.form-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 20px;
  align-items: flex-start;
  max-width: 800px;
}

.form-group {
  display: contents; /* this allows each label and input to occupy grid cells */
  padding-bottom: 10px;
}

.form-grid label {
  font-size: 14px;
  text-align: right;
  padding: 5px 5px 0 0;
  white-space: nowrap;
}

.form-control,
textarea,
select {
  width: auto;
}

.form-heading-align {
  margin-left: 130px; /* width + padding */
}

.section {
  margin-bottom: 10px;
  border: 1px solid #ededed;
  border-radius: 5px;
  padding: 20px;
  flex: 1 1 0;
  min-width: 0;
  font-size: 1em;
}

.section.compact{
  font-size: .8em;
  padding: 15px;
}

.section.shrink{
  display: inline-block;
}

.section h2 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
}

.section-content table, 
.section-content th, 
.section-content td { 
  border: 1px solid #f1f1f1; 
  border-collapse: collapse; 
  padding: 5px;
}

.section-content th {
  text-align: left;
  font-size: .8em;
  font-weight: 500;
}

.section table td {
  padding: 4px 8px; /* vertical padding, horizontal padding */
}

.section-row {
  display: flex;
  gap: 8px; /* space between the two sections */
  align-items: flex-start; /* align tops */
}

.email-section {
  flex: 0 0 auto; /* shrink to content */
}

.schedule-section {
  flex: 1 1 0; /* take remaining space */
}

.print-section {
  flex: 0 0 auto;
  width: fit-content;
}

.button-stack {
  display: flex;
  flex-direction: column;
  gap: 8px; /* space between buttons */
}

.bs-datatable-link{
  color: #03070a;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.3em;
  display: block;
  transition: color 0.2s ease;
}

.bs-datatable-link:hover{
  color: #0c1df3;
  text-decoration: underline;
}

.bs-simple-list{
  list-style: none; 
  padding: 0; 
  margin: 0;
}

.bs-simple-list li{
  background: white; 
  border: 1px solid #e9ecef; 
  border-radius: 6px; 
  padding: 10px 12px;     
  margin-bottom: 5px;
}

.bs-simple-list li:hover{
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bs-simple-list a{
  color: #0c1df3;
  text-decoration: none;
  font-weight: 600;
  display: block;
}

.material-grid {
  display: grid;
  grid-template-columns: 55% 18% 27%;
  gap: 1px;
  background-color: #ededed;
  width: 100%;
  font-size: 18px;
}

.material-cell {
  background-color: white;
  padding: 8px;
  vertical-align: top;
}

.material-header {
  grid-column: 1 / -1;
  text-align: center;
  font-weight: 500;
  padding: 10px;
  background-color: #dff1fb;
  border-top: 1px solid #bfbfbf;
}

.material-subheader {
  background-color:#fff ;
  font-weight: 400;
  text-align: center;
  font-size: 15px;
}

.material-cell-strong {
  font-weight: bold;
}

.actual {
  background-color: white;
  padding: 8px;
  vertical-align: top;
  font-size: 12px;
}

.estimated {
  background-color: white;
  padding: 8px;
  vertical-align: top;
  text-align: center;
  font-size: 14px;
}

.job-title {
  grid-column: 1 / -1;
  background-color: #b0d7ef;
  padding: 10px;
  font-weight: bold;
}

.supplier-info {
  grid-column: 1 / -1;
  background-color: #f2fbff;
  padding: 8px;
  font-style: italic;
}

.material-list {
  margin-bottom: 10px;
  border: 1px solid #d1d1d1;
  border-radius: 5px;
  overflow: hidden;
  flex: 1 1 0;
  min-width: 0;
  font-size: 1em;
}

/* Responsive Material Grid Layout */

/* Mobile: 2-column stacked layout */
@media screen and (max-width: 768px) {
  .material-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    font-size: 16px;
  }
  
  .material-cell {
    grid-row: span 2;
    display: flex;
    align-items: center;
    padding: 12px;
  }
  
  .material-subheader {
    display: none;
  }
  
  .estimated,
  .actual {
    text-align: left;
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .estimated::before {
    content: "Estimated: ";
    font-weight: bold;
    color: #666;
    font-size: 12px;
  }
  
  .actual::before {
    content: "Actual: ";
    font-weight: bold;
    color: #666;
    font-size: 12px;
  }
}

/* Tablet: 3-column with adjusted proportions */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .material-grid {
    grid-template-columns: 50% 25% 25%;
    font-size: 16px;
  }
}

/* Desktop and larger: Reset to original layout */
@media screen and (min-width: 1025px) {
  .material-grid {
    grid-template-columns: 55% 18% 27%;
    font-size: 18px;
  }
}

/* Tablet and Desktop: Shared 3-column layout styles */
@media screen and (min-width: 769px) {
  .material-cell {
    grid-row: auto;
    display: block;
    align-items: unset;
    padding: 8px;
  }
  
  .material-subheader {
    display: block;
  }
  
  .estimated,
  .actual {
    text-align: center;
    padding: 8px;
    font-size: 14px;
  }
  
  .actual {
    font-size: 12px;
  }
  
  .estimated::before,
  .actual::before {
    content: none;
  }
}

/* Print: Force desktop layout with optimized spacing */
@media print {
  .material-grid {
    grid-template-columns: 55% 18% 27% !important;
    font-size: 14px !important;
  }
  
  .material-cell {
    padding: 6px !important;
  }
  
  .estimated,
  .actual {
    padding: 6px !important;
    font-size: 12px !important;
  }
}

/* Flatpickr Date/Time Picker Styling */
.flatdatetimepicker,
input.flatdatetimepicker,
input[class*="flatdatetimepicker"],
input[class*="flatpickr"] {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: #ffffff;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  min-width: 150px;
  cursor: pointer;
}

/* Fix flatpickr time picker hour and minute input widths */
/* Override min-width for time picker inputs */
.flatpickr-time .numInput,
.flatpickr-time .numInputWrapper input {
  min-width: 0 !important;
  width: 85px;
  padding: 0 4px;
  text-align: center;
  box-sizing: border-box;
}

.flatpickr-time .flatpickr-time-separator {
  margin: 0 4px;
}

#quick_calendar {
  height: 248px;
}

#quick_calendar .flatpickr-calendar {
  transform: scale(0.8);
  transform-origin: top left;
}

/* Followup date single field form container */
#followup_date_container {
  height: 385px;
  background-color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

#followup_calendar_wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

#followup_date_container > div:not(#followup_calendar_wrapper) {
  z-index: 2;
  position: relative;
}

/* Scale calendar in followup date single field form */
#followup_date_container .flatpickr-calendar,
#followup_calendar_wrapper .flatpickr-calendar {
  transform: scale(0.9);
  transform-origin: top left;
}
