/* Main Layout */
.container {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100vw;
  background-color: white;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: #f0f0f0;
  color: grey;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1001;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.sidebar-btn {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  font-size: 14px;
  text-align: center;
  background: #666;
  color: white;
  border: none;
  cursor: pointer;
  min-height: 48px;
  box-sizing: border-box;
  font-family: "Open Sans";
}

.sidebar-btn:hover {
  background: #777;
  color: #007bff;
}

.logo {
  width: 100%;
  max-width: 150px;
  height: auto;
  margin: 10px 0;
}



/* Main Content */
.main-content {
  flex-grow: 1;
  padding: 10px; /* Reduced from 20px, adjust as needed */
  padding-left: 0; /* Remove left padding to eliminate gap */
  overflow-y: auto;
  height: 100vh;
  background-color: white;
  margin-left: 200px; /* Match sidebar width */
  width: calc(100% - 250px); /* Fill remaining space */
}

/* General Styles */
body {
  background-color: #1E1E1E;
  color: #d8d8d8;
  margin: 0;
  padding: 0;
  font-family: "Open Sans";
}

h1, h2, h3, h4, h5 {
  font-family: "Open Sans";
  font-weight: bold;
  letter-spacing: 2.1px;
  font-size: 21px;
  padding-left: 12px;
}

p {
  font-family: "Open Sans";
  font-weight: 400;
  font-size: 14px;
  padding-left: 12px;
}

a {
  text-decoration: none;
}

.text-padding {
  padding: 5px;
}

/* Graph Layout */
.div-for-charts {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  min-height: 300px;
  margin-bottom: 0;
}

#histogram, #map-graph, #fig, #fig_2 {
  flex-grow: 1;
  width: 100%;
  height: auto;
}

.mapboxgl-canvas, .mapboxgl-map {
  min-width: 100%;
}

/* Graph Control Objects */
.div-user-controls {
  padding: 10px;
  width: 100%;
  height: auto;
}

.div-for-dropdown {
  padding-top: 12px;
  padding-bottom: 12px;
}

.div-for-slider {
  width: 100%;
  text-align: center;
}

/* Dark Theme for Controls */
.Select-control,
.Select-menu-outer,
.Select-value,
.Select-placeholder,
.Select-value-label,
.Select--single > .Select-control .Select-value {
  background-color: #1e1e1e !important;
  color: #ffffff !important;
  border: 1px solid #2a2a2a !important;
}

.Select-option {
  background-color: #1e1e1e !important;
  color: #ffffff !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  font-size: 12px !important;
  line-height: 1.2em !important;
  padding: 6px 10px !important;
  border-bottom: 0.5px solid #2a2a2a;
  max-width: 95vw !important;
}

.Select-option.is-focused {
  background-color: #2d2d2d !important;
}

.Select-menu-outer {
  background-color: #1e1e1e !important;
  max-width: 95vw !important;
  max-height: 300px !important;
  overflow-y: auto !important;
  border: 1px solid #2a2a2a !important;
}

.Select-value-label {
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  line-height: 1.3em !important;
  font-size: 12px !important;
}

.Select-multi-value-wrapper {
  flex-wrap: wrap !important;
  gap: 4px;
}

.has-value.Select--single > .Select-control .Select-value .Select-value-label,
.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value .Select-value-label {
  color: #ffffff !important;
  font-weight: 400;
  font-size: 14px;
}

.custom-dropdown .Select-control {
  background-color: black !important;
  color: white !important;
}

.Select-option--is-selected,
.Select-option--is-focused {
  background-color: black !important;
  color: white !important;
}

/* Date Picker */
#date {
  background-color: #1e1e1e;
  font-family: "Open Sans";
  font-weight: 400;
  color: #dbdbdb;
  border: 0.5px solid #dbdbdb44;
}

#date-picker {
  width: 100%;
}

.DateInput.DateInput_1 {
  width: 100%;
  background-color: #1e1e1e;
}

.SingleDatePickerInput__withBorder {
  border: none;
  border-radius: 3px;
  color: #dbdbdb;
  background: #1e1e1e;
}

.SingleDatePickerInput.SingleDatePickerInput_1.SingleDatePickerInput__withBorder.SingleDatePickerInput__withBorder_2,
.SingleDatePicker_1 {
  border: 0px solid #dbdbdb;
  display: block;
}

.SingleDatePicker_picker, .SingleDatePicker_picker_1, .SingleDatePicker_picker__directionLeft,
.SingleDatePicker_picker__directionLeft_2 {
  filter: invert(100%);
}

.CalendarMonth_table td {
  padding: unset;
}

/* Client Table */
.dash-filter input {
  color: white !important;
}

#collapse-clients {
  overflow: hidden;
  transition: height 0.35s ease;
}

#collapse-clients .dash-table-container {
  overflow: hidden;
}

#collapse-clients div {
  overflow-x: auto;
}

.collapse {
  transition: height 0.35s ease;
}

/* Background Image */
.background {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  color: black;
  background-color: white;
}

/* Circle Locations */
.stator-circle {
  top: 400px;
  left: 250px;
}

.rotor-circle {
  top: 250px;
  left: 350px;
}

.aux-circle {
  top: 130px;
  left: 200px;
}

.core-circle {
  top: 200px;
  left: 100px;
}

.wind-circle {
  top: 180px;
  left: 140px;
}

.saux-circle {
  top: 100px;
  left: 150px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  display: block;
}

::-webkit-scrollbar-track {
  background: #1e1e1e;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #666;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d8d8d870;
}

/* Dash App Content */
._dash-app-content {
  overflow-x: hidden;
  overflow-y: hidden;
  position: relative;
}

._dash-undo-redo {
  display: none;
}

/* Rotate Prompt */
@media (max-width: 991.98px) and (orientation: portrait) {
  #rotate-prompt {
    display: flex;
  }
}

@media (max-width: 991.98px) and (orientation: landscape) {
  #rotate-prompt {
    display: none;
  }
}

@media (min-width: 1920px) {
  #rotate-prompt {
    display: none;
  }
}

/* Input Fields */
#fullname, #country, #company, #role, #email_create, #password_create, #email {
  width: 100%;
  max-width: 350px;
  min-height: 48px;
  font-size: 14px;
  border: 1.5px solid black;
  padding: 8px;
  margin-top: 15px;
  box-sizing: border-box;
}

#confirm-button-create {
  width: 100%;
  max-width: 350px;
  min-height: 48px;
  font-size: 16px;
  background-color: rgb(20,54,214);
  color: white;
  border: 1.5px solid black;
  margin-top: 15px;
  padding: 10px;
  border-radius: 5px;
}

.email-signup, .fullname-signup, .country-signup, .companyname-signup, .role-signup, .password-signup {
  padding-right: 0;
}


* Desktop: Keep side-by-side pie charts */
  @media (min-width: 769px) {
  #revenue-by-category-comparison {
    width: 100%;
    max-width: 90vw;
    margin: 0 auto;
  }
  }

/* Desktop */
  @media (min-width: 769px) {
  .button-container {
    display: flex;
    flex-direction: row; /* Horizontal row */
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    width: 100%;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
  }
 }


/* Mobile Adjustments */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    width: 100vw;
    height: 100vh;
  }

  .sidebar {
    width: 100%;
    height: 100px;
    position: fixed;
    bottom: 0;
    left: 0;
    top: auto;
    background-color: #f0f0f0;
    z-index: 1001;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    overflow-y: hidden; /* Prevent vertical overflow */
  }

  .sidebar-content {
    flex-direction: row;
    flex-wrap: nowrap; /* Single row */
    justify-content: flex-start;
    align-items: center;
    padding: 5px;
    overflow-x: auto; /* Scroll horizontally if needed */
    white-space: nowrap; /* Prevent text wrapping */
  }

  .logo {
    display: none; /* Hide logo on mobile */
  }



  .sidebar-btn {
    width: 50px !important;
    /* Smaller width min-width: 36px;*/
    height: 50px; /* Touch-friendly height */
    font-size: 8px; /* Smaller text */
    padding: 4px;
    margin: 0 1px; /* Tighter spacing */
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-grow: 0;
    flex-shrink: 0;
  }

  .sidebar-btn span {
    font-size: 16px; /* Icon size */
  }

  #button-container-logout-button {
    margin-top: 5px;
  }

  .main-content {
    margin: 0 !important;
    margin-left: 0 !important; /* Override desktop margin */
    width: 100% !important; /* Full viewport width */
    padding-bottom: 100px; /* Match sidebar height */
  }

  .div-for-charts {
    height: auto;
    min-height: 200px;
  }

  .div-user-controls {
    padding: 10px;
    height: auto;
  }

  #fullname, #country, #company, #role, #email_create, #password_create, #email {
    max-width: 90vw;
  }

  #confirm-button-create {
    max-width: 90vw;
  }

  #coord-map {
    display: none !important;
  }

  .spacer-mobile-hide {
    display: none;
  }

  .background {
    padding: 0 10px !important;
  }

  .justify-content-center {
    flex-direction: column !important;
    align-items: center !important;
  }

  [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .side-by-side, .side-by-side-right {
    display: block;
    width: 100%;
    float: none;
  }

  .stator-circle, .rotor-circle, .aux-circle, .core-circle, .wind-circle, .saux-circle {
    transform: scale(0.8);
  }


  /* Responsive Typography */
  .responsive-title {
    font-size: 24px !important;
    margin-bottom: 15px !important;
  }

  .responsive-h5 {
    font-size: 16px !important;
    margin-bottom: 10px !important;
  }

  /* Responsive Cards */
  .card {
    width: 100% !important;
    max-width: 90vw !important;
    margin: 0 auto 10px auto !important;
  }

  .responsive-row {
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 10px !important;
  }

/* Responsive Graphs */
  .dash-graph {
    width: 100% !important;
    max-width: 90vw !important;
    margin: 0 auto !important;
  }

  /* Pie Chart Container */
  .responsive-pie-container {
    width: 100% !important;
    max-width: 90vw !important;
    margin: 0 auto !important;
    padding: 10px !important;
  }

  /* Pie Chart Specific Adjustments */
  #revenue-by-category-comparison {
    width: 100% !important;
    max-width: 90vw !important;
    margin: 0 auto !important;
  }

  #revenue-by-category-comparison .js-plotly-plot .plotly .main-svg {
    width: 100% !important;
    max-width: 90vw !important;
  }

  /* Bootstrap Column Overrides */
  [class*="col-"] {
    padding-left: 5px !important;
    padding-right: 5px !important;
    width: 100% !important;
  }

  .button-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important; /* Reduced gap for mobile */
    margin-top: 10px !important;
    width: 80% !important;
    max-width: 90vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow-x: hidden !important; /* Allow scrolling if needed */
    padding: 5px !important;
  }

  .responsive-button {
    width: 100% !important;
    max-width: 200px !important; /* Constrain button width */
    font-size: 12px !important; /* Smaller font for mobile */
    padding: 8px !important; /* Reduced padding */
    margin: 0 !important; /* Override Bootstrap margins */
    min-height: 44px !important; /* Touch-friendly */
    text-align: center !important;
  }

  /* Ensure no Bootstrap margin interference */
  .responsive-button.mb-3, .responsive-button.me-3 {
    margin-bottom: 0 !important;
    margin-right: 0 !important;
  }






  .responsive-button {
    width: auto;
    font-size: 14px;
    padding: 10px;
    min-height: 44px;
  }

/* Modal Container */
  #new_job_modal {
    width: 100% !important;
    max-width: 85vw !important;
    max-height: 60vh !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background-color: rgba(0, 0, 0, 0.5) !important; /* Semi-transparent overlay */
    z-index: 1000 !important;
  }

  /* Modal Content */
  .modal-content {
    width: 100% !important;
    max-width: 85vw !important;
    max-height: none !important; /* Remove height restriction to cover all content */
    padding: 10px !important; /* Reduced padding for mobile */
    background-color: #f6f6f6 !important; /* Ensure full background coverage */
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    box-sizing: border-box !important;
  }

  /* Modal Title */
  .responsive-h4 {
    font-size: 18px !important;
    margin-bottom: 20px !important;
    text-align: center !important;
  }

  /* Responsive Rows (e.g., Customer/Site, Contact/Type, Line Items) */
  .responsive-row {
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    margin-bottom: 10px !important;
  }

  .responsive-row > * {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 10px !important;
  }

  /* Buttons (Add Line Item, Confirm, Cancel) */
  .responsive-button {
    width: 100% !important;
    max-width: 150px !important;
    font-size: 12px !important;
    padding: 8px !important;
    min-height: 44px !important; /* Touch-friendly */
    margin: 0 !important;
    text-align: center !important;
    border: none !important;
    cursor: pointer !important;
  }

  /* Inputs, Dropdowns, Textarea */
  [id^='field-job-'], [id='dropdown-quote'], [id='dropdown-users'], [id='quote-special-note'] {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 10px !important;
    font-size: 14px !important;
  }

  /* Date Pickers */
  [id='po-date'], [id='quote-requested-date'] {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 14px !important;
  }

  /* File Upload */
  #upload-po-pdf {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px !important;
    font-size: 14px !important;
    border-width: 2px !important;
    border-style: dashed !important;
    border-radius: 8px !important;
    text-align: center !important;
    background-color: #f9f9f9 !important;
    margin-bottom: 10px !important;
  }

  /* Scope of Work Headers */
  #quote-line-items, #quote-line-items > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Line Item Inputs */
  #quote-line-items > div > input {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 10px !important;
    font-size: 14px !important;
  }

  /* Ensure Scope of Work header is centered */
  .modal-content > div:nth-child(5) {
    font-size: 16px !important;
    text-align: center !important;
    margin-bottom: 10px !important;
  }

  /* Line Item Headers (Description, Value, Qty) */
  .modal-content > div:nth-child(6) {
    flex-direction: column !important;
    gap: 5px !important;
  }

  .modal-content > div:nth-child(6) > div {
    width: 100% !important;
    text-align: left !important;
    font-size: 14px !important;
    line-height: 30px !important;
  }





}


