body {
    background: url('../img/shattered.png');

    padding: 80px 20px 0;
}

body.edry {
    background: none !important;
    background-color: #253D51 !important;
}

body.edry div.dataTables_info, 
body.edry table.dataTable th,
body.edry div.dataTables_length label,
body.edry div.dataTables_filter label, 
body.edry a.paginate_button.previous, 
body.edry a.paginate_button.next,
body.edry div.dataTables_paginate .ellipsis,
body.edry h1.ui.header  {
    color: #FFF !important;
}

body.edry a.paginate_button.previous, 
body.edry a.paginate_button.next  {
    background-color: #253D51 !important;
    color: #FFF !important;
}

body.edry a.paginate_button  {
    background-color: #3cba54 !important;
    color: #000 !important;
}

body.edry a.paginate_button.current {
    color: #000 !important;
}

body.edry div.dataTables_length label select,
body.edry div.dataTables_filter label input,
body.edry a.paginate_button.current {
    color: #000 !important;
}

.new-lead-edry {
    background-color: #3cba54 !important;
    color: #000 !important;
}

.new { color: #21ba45; }
.open { color: #00b5ad; }
.booked { color: #1678c2; }
.booked_quote { color: #5829bb; }
.booked_email { color: #a333c8; }
.booked_upsell { color: #e03997; }
.inbound_booked { color: #fbbd08; }
.inbound_declined { color: #f2711c; }
.declined { color: #db2828; }
.closed { color: #a5673f; }
.invalid { color: #767676; }

/* Disposition cell styling with background colors */
.disposition-cell.green { 
  background-color: rgba(33, 186, 69, 0.1) !important; 
  color: #21ba45 !important; 
  font-weight: bold;
  border-left: 3px solid #21ba45 !important;
}
.disposition-cell.teal { 
  background-color: rgba(0, 181, 173, 0.1) !important; 
  color: #00b5ad !important; 
  font-weight: bold;
  border-left: 3px solid #00b5ad !important;
}
.disposition-cell.blue { 
  background-color: rgba(22, 120, 194, 0.1) !important; 
  color: #1678c2 !important; 
  font-weight: bold;
  border-left: 3px solid #1678c2 !important;
}
.disposition-cell.violet { 
  background-color: rgba(88, 41, 187, 0.1) !important; 
  color: #5829bb !important; 
  font-weight: bold;
  border-left: 3px solid #5829bb !important;
}
.disposition-cell.purple { 
  background-color: rgba(163, 51, 200, 0.1) !important; 
  color: #a333c8 !important; 
  font-weight: bold;
  border-left: 3px solid #a333c8 !important;
}
.disposition-cell.pink { 
  background-color: rgba(163, 51, 200, 0.1) !important; 
  color: #a333c8 !important; 
  font-weight: bold;
  border-left: 3px solid #a333c8 !important;
}

.disposition-cell.purple { 
  background-color: rgba(163, 51, 200, 0.1) !important; 
  color: #a333c8 !important; 
  font-weight: bold;
  border-left: 3px solid #a333c8 !important;
}
.disposition-cell.yellow { 
  background-color: rgba(251, 189, 8, 0.1) !important; 
  color: #fbbd08 !important; 
  font-weight: bold;
  border-left: 3px solid #fbbd08 !important;
}
.disposition-cell.orange { 
  background-color: rgba(242, 113, 28, 0.1) !important; 
  color: #f2711c !important; 
  font-weight: bold;
  border-left: 3px solid #f2711c !important;
}
.disposition-cell.red { 
  background-color: rgba(219, 40, 40, 0.1) !important; 
  color: #db2828 !important; 
  font-weight: bold;
  border-left: 3px solid #db2828 !important;
}
.disposition-cell.brown { 
  background-color: rgba(165, 103, 63, 0.1) !important; 
  color: #a5673f !important; 
  font-weight: bold;
  border-left: 3px solid #a5673f !important;
}
.disposition-cell.grey { 
  background-color: rgba(118, 118, 118, 0.1) !important; 
  color: #767676 !important; 
  font-weight: bold;
  border-left: 3px solid #767676 !important;
}

/* Fix DataTable overflow issues */
#leads_wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  cursor: grab !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  background-color: #ffffff !important;
  padding: 20px !important;
}

#leads_wrapper:active {
  cursor: grabbing !important;
}

/* Add scroll indicator */
#leads_wrapper::after {
  content: "← Drag to scroll →";
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

#leads_wrapper:hover::after {
  opacity: 1;
}

#leads {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

/* Table header styling */
#leads thead th {
  background-color: #f8f9fa !important;
  border-bottom: 2px solid #dee2e6 !important;
}

#leads th,
#leads td {
  word-wrap: break-word !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  padding: 8px 6px !important;
}

/* Specific column styling for better space utilization */
#leads th:nth-child(1),
#leads td:nth-child(1) { /* Date column */
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
}

#leads th:nth-child(2),
#leads td:nth-child(2) { /* Client column */
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
}

#leads th:nth-child(3),
#leads td:nth-child(3) { /* Email column */
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
}

#leads th:nth-child(4),
#leads td:nth-child(4) { /* Post code column */
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
}

#leads th:nth-child(5),
#leads td:nth-child(5) { /* Phone column */
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
}

#leads th:nth-child(6),
#leads td:nth-child(6) { /* Mobile column */
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
}

/* Ensure table fits within container */
.fourteen.wide.column {
  overflow-x: auto !important;
  max-width: 100% !important;
  padding: 1rem !important;
  flex: 1 !important;
}

/* Ensure proper grid layout */
.ui.grid {
  display: flex !important;
  flex-wrap: nowrap;
  margin: 0 !important;
  width: 100% !important;
}

.stackable {
  display: grid;
  flex-wrap: nowrap;
  grid-template-columns: clamp(50px, 18vw, 200px) 1fr; 
  margin: 0 !important;
  width: 100% !important;
}

.ui.centered.stackable > :first-child {
  grid-column: 1 / -1;
}

.ui.grid > .column {
  flex: 0 0 auto !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.ui.grid > .column:first-child {
  padding-left: 0 !important;
}

/* Container styling - only full width for dashboard content */
.ui.container:not(.ui.top.fixed.menu .ui.container) {
  max-width: 1300px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 1rem !important;
}

/* Navbar styling - full width background, contained content */
.ui.top.fixed.menu {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.ui.top.fixed.menu .ui.container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  width: 100% !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

/* Sidebar styling */
.two.wide.column {
  min-width: 200px !important;
  max-width: 220px !important;
  flex: 0 0 auto !important;
}



/* Services column styling - stack services vertically */
#leads td:nth-child(7) {
  white-space: normal !important;
  word-wrap: break-word !important;
  vertical-align: top !important;
  padding: 8px !important;
}

/* Style services as individual tags */
.services-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.services-container .service-items {
  display: block;
  margin: 1px 0;
}

.service-tag {
  background-color: #e1e5e9;
  color: #2c3e50;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  white-space: nowrap;
  margin: 1px 0;
  display: inline-block;
}

/* Ensure service items are styled properly */
.service-items {
  display: inline-block;
  margin: 1px 2px 1px 0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  white-space: nowrap;
}

/* Enhanced DataTable search bar styling */
.dataTables_wrapper .dataTables_filter {
  float: right;
  text-align: right;
  margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_filter input {
  margin-left: 0.5em;
  padding: 8px 12px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  height: 36px !important;
  transition: border-color 0.3s ease !important;
  background-color: #ffffff !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none !important;
  border-color: #007bff !important;
}

.dataTables_wrapper .dataTables_filter input::placeholder {
  color: #999 !important;
  font-style: normal !important;
}

/* Enhanced DataTable controls styling */
.dataTables_wrapper .dataTables_length {
  margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_length select {
  padding: 6px 10px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  background-color: #ffffff !important;
  height: 36px !important;
}

.dataTables_wrapper .dataTables_info {
  margin-top: 15px;
  font-size: 14px;
  color: #666;
}

/* Enhanced pagination styling */
.dataTables_wrapper .dataTables_paginate {
  margin-top: 15px;
  text-align: center;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 6px 10px !important;
  margin: 2px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  background-color: #ffffff !important;
  color: #007bff !important;
  font-size: 14px !important;
  transition: background-color 0.3s ease !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background-color: #f8f9fa !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background-color: #007bff !important;
  color: #ffffff !important;
}

/* Mobile responsiveness for DataTable */
@media screen and (max-width: 768px) {
  /* Make the table container responsive */
  .dataTables_wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Style the search box for mobile */
  .dataTables_filter {
    margin-bottom: 15px;
  }
  
  .dataTables_filter input {
    width: 100% !important;
    max-width: 300px;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
    height: 40px !important;
  }
  
  /* Style pagination for mobile */
  .dataTables_paginate {
    text-align: center;
    margin-top: 15px;
  }
  
  .dataTables_paginate .paginate_button {
    padding: 8px 12px;
    margin: 2px;
    font-size: 14px;
  }
  
  /* Style length menu for mobile */
  .dataTables_length {
    margin-bottom: 15px;
  }
  
  .dataTables_length select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
  }
  
  /* Style info text for mobile */
  .dataTables_info {
    text-align: center;
    margin: 10px 0;
    font-size: 14px;
  }
  
  /* Responsive table styling */
  #leads {
    font-size: 14px;
  }
  
  #leads th,
  #leads td {
    padding: 8px 4px;
    font-size: 13px;
  }
  
  /* Hide less important columns on very small screens */
  @media screen and (max-width: 480px) {
    #leads th:nth-child(2),
    #leads td:nth-child(2) { /* Email column */
      display: none;
    }
    #leads th:nth-child(3),
    #leads td:nth-child(3) { /* Post code column */
      display: none;
    }
  }
  
  /* Responsive details row styling */
  .dtr-details {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    margin: 5px 0;
  }
  
  .dtr-details li {
    list-style: none;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
  }
  
  .dtr-details li:last-child {
    border-bottom: none;
  }
  
  .dtr-title {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
    min-width: 100px;
    display: inline-block;
  }
  
  .dtr-data {
    color: #666;
  }
}

/* Larger, easier-to-click checkboxes for DataTables bulk selection */
#leads_wrapper input.row-select,
#leads_wrapper thead input.row-select-all {
  transform: scale(1.2);
  cursor: pointer;
}

/* Rugwash tables - larger checkboxes */
#rugwash-leads_wrapper input.row-select,
#rugwash-leads_wrapper thead input.row-select-all {
  transform: scale(1.2);
  cursor: pointer;
}


