@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

body {
  padding-top: 70px;
  /* ensure content sits below fixed navbar */
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: url(images/loginbg.jpg) no-repeat center center fixed;
  background-size: cover;
  color: #333;
  /* Darker text for better readability on light backgrounds */
  margin: 0;
  min-height: 100vh;
  display: flex;
  /* Added for sticky footer */
  flex-direction: column;
  /* Added for sticky footer */
}

/* Ensure main content area pushes footer down */
.main-content {
  flex: 1;
  padding-bottom: 60px;
  /* Add padding to prevent content overlap with footer */
}

h1, h2, h3 {
  font-size: 2.5rem;
  margin-bottom: 24px;
  color: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%);
  text-shadow: 0 4px 8px rgba(8, 8, 8, 0.863);
  letter-spacing: 1px;
  font-weight: 600;
}

/* === General Container Styling === */
.container,
.scancontainer,
.card,
.well,
.modal-content,
.dataTables_wrapper,
.instructions-content {
  background: #ffffff81 !important;
  /* Transparent white background */
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.815);
  padding: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  border: none;
}

/* Specific adjustments */
.modal-content {
  padding: 0;
  /* Modals usually handle padding internally */
  overflow: hidden;
  /* Prevent content spillover */
}

.modal-header,
.modal-body,
.modal-footer {
  background: transparent;
  /* Ensure modal sections don't override */
  padding: 1rem;
  /* Restore Bootstrap padding */
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
}

.card {
  border-left: 3px solid #36d1c4;
  overflow: hidden;
  /* Prevent content spillover */
}

.card-header,
.card-body,
.card-footer {
  border-left: 3px solid #36d1c4;
  background: transparent;
}

.dataTables_wrapper {
  padding: 15px;
  /* Adjust padding for DataTables */
}

#flowchart-container {
  width: 100%;
  max-width: 1100px;
  height: 600px;
  background: rgba(255, 255, 255, 0.253);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.815);
  margin: 20px auto;
  border: none;
  transition: box-shadow 0.2s;
}

#route-selector-container {
  margin: 32px auto 0 auto;
  padding: 24px 32px;
  width: 340px;
  background: rgba(255, 255, 255, 0.267);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.808);
  text-align: left;
  max-height: 300px;
  /* Added: Limit height */
  overflow-y: auto;
  /* Added: Enable vertical scroll */
}

#route-selector-container h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #2b5876;
  font-weight: 600;
  letter-spacing: 0.5px;
}

#route-selector-container label {
  display: flex;
  align-items: center;
  margin: 10px 0;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s;
}

#route-selector-container label:hover {
  background: #e3f0fa;
}

#route-selector-container input[type="checkbox"] {
  accent-color: #2b5876;
  margin-right: 14px;
  width: 18px;
  height: 18px;
}

.button-container {
  margin: 24px 0 16px 0;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.button-container label {
  margin: 0 8px 0 0;
  font-weight: 500;
}

.button-container select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #b0c4de;
  font-size: 1rem;
  background: #f7fafc;
  transition: border 0.2s;
}

.button-container select:focus {
  border: 1.5px solid #2b5876;
  outline: none;
}

/* === General Button & Tab Styling === */
/* Apply gradient to general buttons, Bootstrap buttons, specific tabs */
button,
input[type="button"],
input[type="submit"],
.btn,
#infoTab,
#backTab {
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(90deg, #36d1c4 0%, #2b5876 100%) !important;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.15);
  margin: 5px;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  vertical-align: middle;
}

/* Hover effect for general buttons */
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
.btn:hover,
#infoTab:hover,
#backTab:hover {
  background: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
  color: #fff !important;
}

/* Active/Focus state */
button:active,
button:focus,
input[type="button"]:active,
input[type="button"]:focus,
input[type="submit"]:active,
input[type="submit"]:focus,
.btn:active,
.btn:focus,
#infoTab:active,
#infoTab:focus,
#backTab:active,
#backTab:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(54, 209, 196, 0.5);
  /* Focus ring using gradient color */
}

/* Specific button styles (like remove) should override the general ones */
.remove-btn,
.btn-danger

/* Style Bootstrap danger buttons */
  {
  background: linear-gradient(90deg, #ff5858 0%, #f09819 100%) !important;
  /* Use !important to override general .btn */
}

.remove-btn:hover,
.btn-danger:hover {
  background: linear-gradient(90deg, #f09819 0%, #ff5858 100%) !important;
}

/* Style other Bootstrap button variants if needed */
.btn-secondary {
  background: linear-gradient(90deg, #6c757d 0%, #495057 100%) !important;
  color: #fff !important;
}

.btn-secondary:hover {
  background: linear-gradient(90deg, #495057 0%, #6c757d 100%) !important;
  color: #fff !important;
}

/* Adjust modal footer button alignment if needed */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  /* Align buttons to the right */
  gap: 10px;
  /* Add space between buttons */
}

.modal-footer .btn {
  margin: 0;
  /* Remove default margin if set above */
}

.modal,
#reparentChildModal,
#connectChildrenModal,
#spliceCaseModal,
#addChildModal,
#removeChildModal {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(44, 62, 80, 0.15);
  padding: 32px 28px;
  z-index: 2000;
  min-width: 320px;
  max-width: 95vw;
  max-height: 80vh;
  /* Added: Limit modal height */
  overflow-y: auto;
  /* Added: Enable vertical scroll for modal content */
}

#addChildModal label,
#spliceCaseModal label,
#connectChildrenModal label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
}

#addChildModal input[type="text"],
#addChildModal input[type="number"],
#addChildModal select,
#spliceCaseModal input,
#connectChildrenModal input,
#connectChildrenModal select,
#reparentChildModal select,
/* Added: Target reparent modal selects */
#removeChildModal select

/* Added: Target remove child modal select */
  {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #b0c4de;
  font-size: 1rem;
  background: #f7fafc;
  transition: border 0.2s;
  box-sizing: border-box;
  /* Added: Ensure padding doesn't increase width */
  /* max-height: 150px; */
  /* Optional: Limit dropdown height directly if needed */
  /* overflow-y: auto; */
  /* Optional: Enable scroll on dropdown if needed */
}

#addChildModal input:focus,
#addChildModal select:focus,
#spliceCaseModal input:focus,
#connectChildrenModal input:focus,
#connectChildrenModal select:focus,
#reparentChildModal select:focus,
/* Added */
#removeChildModal select:focus

/* Added */
  {
  border: 1.5px solid #36d1c4;
  outline: none;
}

/* Add specific styles for the instructions page if needed */
.instructions-content {
  background: rgba(255, 255, 255, 0.795);
  padding: 30px;
  margin: 30px auto;
  max-width: 900px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.301);
}

.instructions-content h1 {
  margin-top: 0;
  color: #2b5876;
}

.instructions-content h2 {
  color: #36d1c4;
  margin-top: 25px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.instructions-content p,
.instructions-content ul,
.instructions-content ol {
  line-height: 1.6;
  margin-bottom: 15px;
}

.instructions-content code {
  background-color: #ffffffbe;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.164);
  padding: 2px 5px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
  background: #e0eafc;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: #b0c4de;
  border-radius: 8px;
}

/* Custom Footer Styling */
#custom-footer {
  /* background: #212529; */
  /* Override semi-transparent background */
  background: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%) !important;
  margin-top: auto;
  /* Stick to bottom with flexbox */
  margin-bottom: 0;
  border-radius: 0;
  /* Remove radius if full width */
  padding-left: 0;
  /* Remove padding if full width */
  padding-right: 0;
  /* Remove padding if full width */
  padding-top: 1rem;
  /* Adjust padding if py-3 isn't enough/too much */
  padding-bottom: 1rem;
  /* Adjust padding */
  border-top: 3px solid #36d1c4;
  /* Example: Add a top border */
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.795);
  /* Example: Add a top shadow */
  color: #adb5bd;
  /* Set default text color for the footer */
}

.login-container {
  width: 35%;
  height: auto;
  margin: 20px auto;
  padding: 20px;
  box-sizing: border-box;
  background-color: rgba(248, 249, 250, 0.41);
  box-shadow: rgba(255, 255, 255, 0.73) 0px 0px 10px 0px;
  border: solid 1px rgba(0, 0, 0, 0);
  border-radius: 10px;

  /* Center content */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.custom-container {
  width: 75%;
  height: auto;
  margin: 20px auto;
  padding: 20px;
  box-sizing: border-box;
  background-color: rgba(248, 249, 250, 0.41);
  box-shadow: rgba(255, 255, 255, 0.73) 0px 0px 10px 0px;
  border: solid 1px rgba(0, 0, 0, 0);
  border-radius: 10px;

  /* Center content */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.custom-container-1 {
  width: 100%;
  max-width: 1200px;
  /* Adjust as needed */
  margin: 0 auto;
  padding: 15px;
  overflow-x: auto;
}

.custom-panel {
  background-color: #007bff;
  color: white;
  border-radius: 10px;
}

.custom-table {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
}

.custom-table thead {
  background-color: #343a40;
  color: white;
}

.custom-btn {
  border-radius: 5px;
}

/* Style DataTables pagination when using .paginate_button */
.dataTables_paginate .pagination {
  display: flex;
  justify-content: center;
  margin: 16px 0;
  flex-wrap: wrap;
}

.dataTables_paginate .paginate_button {
  display: inline-block;
  margin: 0 2px;
  border-radius: 0.375rem;
  font-weight: 600;
  overflow: hidden;
}

.dataTables_paginate .paginate_button a {
  display: block;
  padding: 8px 16px;
  color: #2b5876;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
}

.dataTables_paginate .paginate_button:hover a,
.dataTables_paginate .paginate_button:focus a {
  background: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%);
  color: #fff;
  border-color: #2b5876;
}

.dataTables_paginate .paginate_button.active a,
.dataTables_paginate .paginate_button.active:hover a,
.dataTables_paginate .paginate_button.active:focus a {
  background: linear-gradient(90deg, #36d1c4 0%, #2b5876 100%);
  color: #fff !important;
  border-color: #2b5876;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.15);
}

.dataTables_paginate .paginate_button.disabled a,
.dataTables_paginate .paginate_button.disabled {
  color: #6c757d !important;
  background: #e9ecef !important;
  border-color: #dee2e6 !important;
  pointer-events: none;
  cursor: default;
  opacity: 0.65;
}

#custom-footer .container {
  background: #ffffff00 !important;
  box-shadow: none;
  padding: 1rem;
  margin-top: 0;
  margin-bottom: 0;
}

#custom-footer p {
  font-size: 0.9rem;
  /* Example: Slightly smaller font size */
  margin-bottom: 0.25rem;
  /* Adjust spacing between paragraphs if needed */
}

#custom-footer a {
  color: #6c757d;
  /* Example: Even lighter grey for the link */
  text-decoration: none;
  /* Remove underline */
  transition: color 0.2s;
}

#custom-footer a:hover {
  color: #f8f9fa;
  /* Example: Make link white on hover */
  text-decoration: underline;
  /* Add underline on hover */
}

#map {
  min-height: 400px;
  height: 60vh;
  width: 100%;
}

/* === Pagination Styling === */
.pagination .page-item .page-link {
  color: #2b5876;
  /* Use a theme color for text */
  background-color: #fff;
  /* White background for non-active */
  border: 1px solid #dee2e6;
  /* Standard Bootstrap border color */
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  margin: 0 2px;
  /* Add small horizontal margin */
  border-radius: 0.375rem;
  /* Standard Bootstrap radius */
  padding: 0.375rem 0.75rem;
  /* Standard Bootstrap padding */
}

.pagination .page-item .page-link:hover {
  color: #fff;
  background: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%);
  /* Hover gradient */
  border-color: #2b5876;
  /* Match gradient start */
}

.pagination .page-item.active .page-link {
  z-index: 3;
  color: #fff !important;
  /* White text for active */
  background: linear-gradient(90deg, #36d1c4 0%, #2b5876 100%);
  /* Active gradient */
  border-color: #2b5876;
  /* Match gradient end */
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.15);
  /* Add shadow like buttons */
}

.pagination .page-item.disabled .page-link {
  color: #6c757d;
  /* Muted color */
  pointer-events: none;
  background-color: #e9ecef;
  /* Lighter grey background */
  border-color: #dee2e6;
}

/* Adjust focus style to match active state */
.pagination .page-link:focus {
  color: #fff;
  background: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%);
  border-color: #2b5876;
  box-shadow: 0 0 0 0.2rem rgba(54, 209, 196, 0.5);
  /* Focus ring like buttons */
  outline: 0;
}

/* Ensure active focus doesn't revert background */
.pagination .page-item.active .page-link:focus {
  background: linear-gradient(90deg, #36d1c4 0%, #2b5876 100%);
  box-shadow: 0 0 0 0.2rem rgba(54, 209, 196, 0.5);
}

/* Themed Bootstrap Tabs */
.themed-tabs .nav-link {
  background: rgba(255, 255, 255, 0.24);
  color: #2b5876;
  font-weight: 600;
  border: none;
  border-radius: 8px 8px 0 0;
  margin-right: 2px;
  transition: background 0.2s, color 0.2s;
}

.themed-tabs .nav-link.active,
.themed-tabs .nav-link:focus {
  background: linear-gradient(90deg, #36d1c4 0%, #2b5876 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
}

.themed-tabs .nav-link:hover {
  background: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%);
  color: #fff;
}

.themed-tab-content .tab-pane {
  background: rgba(255, 255, 255, 0.24);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
  border-top: none;
}

.card.custom-panel,
.custom-panel {
  background: #ffffff50 !important;
  color: #fff !important;
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(44, 62, 80, 0.15);
  margin-bottom: 20px;
}

.card.custom-panel .card-header,
.custom-panel .card-header {
  background: transparent;
  color: #fff;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.card.custom-panel .card-body,
.custom-panel .card-body {
  border-left: 3px solid #36d1c4;
  background: transparent;
  color: #fff;
}

.card.custom-panel .btn,
.custom-panel .btn {
  background: linear-gradient(90deg, #36d1c4 0%, #2b5876 100%) !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.card.custom-panel .btn:hover,
.custom-panel .btn:hover {
  background: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%) !important;
  color: #fff !important;
}

/* Styles for the D3 charts container */
#charts-container {
  overflow-x: auto;
  /* Allow horizontal scrolling if content overflows */
  padding: 1rem;
  /* Add some padding inside the container */
  border: 1px solid #dee2e6;
  /* Add a light border similar to Bootstrap */
  margin-bottom: 1.5rem;
  /* Add space below the container */
  background-color: #f8f9fa49;
  /* Optional: Light background */
  /* Add other styles as needed */
}

/* Style for individual chart containers within the main container */
.chart-container {
  margin-bottom: 1.5rem;
  /* Space between multiple charts */
  padding-bottom: 1rem;
  /* Space below each chart */
  border-bottom: 1px dashed #ccc;
  /* Separator line */
}

.chart-container:last-child {
  margin-bottom: 0;
  /* Remove margin from the last chart */
  padding-bottom: 0;
  /* Remove padding from the last chart */
  border-bottom: none;
  /* Remove separator from the last chart */
}

#chart1 {
  margin-left: 0;
}

#chart2 {
  margin-left: 0;
}

#chart3 {
  margin-left: 0;
}

#chart4 {
  margin-left: 0;
}

#chart5 {
  margin-left: 0;
  /* Adjust margin to align with other charts */
}

#chart {
  width: 900px;
  height: 200px;
  /* Increase the height to fit more content */
  padding: 30px;
  /* Add padding to ensure text is not cut off */
}

/* Style for the editable route title */
.route-title {
  cursor: text;
  /* Indicate it's editable */
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.5rem;
  border: 1px dashed transparent;
  /* Show border only on hover/focus */

  font-size: 18px;
  font-weight: bold;
}

.route-title:hover,
.route-title:focus {
  border-color: #adb5bd;
  background-color: #e9ecef;
  outline: none;
}

/* D3 Link Styling */
.link {
  fill: none;
  stroke: #555;
  stroke-opacity: 0.4;
  stroke-width: 1.5px;
}

.node text {
  font: 12px sans-serif;
  pointer-events: none;
}


/* D3 Node Styling */
.node rect {
  fill: #fff;
  stroke: steelblue;
  stroke-width: 1.5px;
}

.node--internal rect {
  fill: #555;
  /* Different fill for internal nodes if desired */
}

/* Ensure foreignObject content doesn't prevent interaction with SVG */
.node foreignObject {
  pointer-events: all;
  /* Allow clicks/edits on inputs */
}

.node foreignObject div {
  pointer-events: all;
}

.node foreignObject input {
  pointer-events: all;
}

/* Style for node-name input fields */
.node-name {
  font-size: 0.9rem;
  /* Adjust font size */
  padding: 4px 6px;
  /* Add padding for better spacing */
  border: 1px solid #ced4da;
  /* Match Bootstrap's default border */
  border-radius: 4px;
  /* Add rounded corners */
  box-shadow: none;
  /* Remove any unwanted shadows */
  transition: border-color 0.2s, box-shadow 0.2s;
  /* Smooth transition for focus */
}

/* Focus state for input fields */
.node-name:focus {
  border-color: #80bdff;
  /* Highlight border on focus */
  outline: none;
  /* Remove default outline */
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  /* Add Bootstrap-like focus shadow */
}

/* Style for node-distance input fields */
.node-distance {
  font-size: 0.9rem;
  padding: 4px 6px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.node-distance:focus {
  border-color: #80bdff;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Custom map marker styles */
.custom-marker {
  background: none;
  border: none;
}

.marker-psu {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-align: center;
  color: white;
  font-weight: bold;
  line-height: 36px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

.marker-node {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  text-align: center;
  color: white;
  font-weight: bold;
  line-height: 36px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
  transform: rotate(45deg);
}

.marker-node span {
  display: inline-block;
  transform: rotate(-45deg);
}

.marker-status-active {
  background-color: #4caf50;
}

.marker-status-inactive {
  background-color: #f44336;
}

.marker-status-maintenance {
  background-color: #ff9800;
}

.marker-status-unknown {
  background-color: #9e9e9e;
}

/* === Tech Assistant Chat Styling === */
#chat-container {
  background: rgba(255, 255, 255, 0.15) !important;
  /* More subtle transparency */
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  /* Consistent shadow */
  border: 1px solid rgba(255, 255, 255, 0.2);
  /* Subtle border */
  /* height, display, flex-direction already set in tech_assistant.php style block */
}

#chat-messages {
  background: rgba(255, 255, 255, 0.1);
  /* Even more subtle for message area */
  /* padding, flex-grow, overflow-y already set */
}

.message {
  /* General message styling from tech_assistant.php is good */
  /* Ensure max-width allows for good readability */
  max-width: 85%;
}

.user-message {
  background: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%);
  /* Theme gradient */
  color: white;
  /* Other styles from tech_assistant.php are fine */
}

.user-message .message-time {
  color: rgba(255, 255, 255, 0.7);
}

.bot-message {
  background: rgba(255, 255, 255, 0.9) !important;
  /* Lighter, more opaque for bot */
  color: #333;
  /* Other styles from tech_assistant.php are fine */
}

.bot-message .message-time {
  color: rgba(0, 0, 0, 0.5);
}

/* Styling for code blocks within bot messages */
.bot-message pre {
  background-color: #282c34;
  /* Dark background for code */
  color: #abb2bf;
  /* Light text for code */
  padding: 1em;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.bot-message pre code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}


#chat-form {
  background: rgba(255, 255, 255, 0.2);
  /* Slightly transparent */
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  /* padding, display:flex already set */
}

#user-input {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ced4da;
  /* Standard Bootstrap border */
  border-radius: 24px;
  /* Pill shape */
  /* padding, flex-grow, margin-right, outline, font-size, box-shadow already set */
}

#user-input:focus {
  border-color: #36d1c4;
  /* Theme color focus */
  box-shadow: 0 0 0 0.2rem rgba(54, 209, 196, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

#send-button {
  /* Uses general button styling from custom.css if .btn class is added */
  /* If not, ensure it matches: */
  background: linear-gradient(90deg, #36d1c4 0%, #2b5876 100%) !important;
  color: #fff !important;
  border: none;
  border-radius: 24px;
  /* Pill shape */
  padding: 10px 20px;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

#send-button:hover {
  background: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(43, 88, 118, 0.3);
}

.typing-indicator-container .typing-indicator span {
  background-color: #2b5876;
  /* Match theme */
}

/* Quick Commands & Questions Styling */
#quick-commands {
  padding: 5px 15px 10px 15px;
  /* Adjusted padding */
  background: rgba(255, 255, 255, 0.1);
  /* Subtle background */
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

#quick-commands .tag-title {
  color: #e0e0e0;
  /* Lighter text for title */
  font-weight: 500;
}

.quick-command {
  background: rgba(255, 255, 255, 0.7);
  color: #2b5876;
  /* Darker text for commands */
  border: 1px solid rgba(43, 88, 118, 0.3);
  /* Subtle border */
  /* padding, border-radius, font-size, cursor, transition already set */
}

.quick-command:hover {
  background: rgba(54, 209, 196, 0.3);
  /* Theme color on hover */
  color: #2b5876;
}

#quick-questions-widget {
  /* Uses styles from tech_assistant.php, ensure they align or override here */
  background: rgba(255, 255, 255, 0.98);
  /* More opaque */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.quick-questions-header {
  background: linear-gradient(90deg, #36d1c4 0%, #2b5876 100%);
  /* Theme gradient */
}

.quick-question:hover {
  background: rgba(54, 209, 196, 0.15);
  /* Theme color hover */
  color: #2b5876;
  /* Ensure text is readable */
}

/* Ensure dropdowns and other elements match the theme */
.dropdown-menu {
  background-color: rgba(255, 255, 255, 0.9);
  /* Semi-transparent background */
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
  color: #2b5876;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(54, 209, 196, 0.2);
  color: #2b5876;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: #36d1c4;
  color: #fff;
}

/* Assistant Modes Styling */
.mode-transitioning {
  transition: all 0.3s ease;
  opacity: 0.8;
}

.mode-standard {
  background: rgba(255, 255, 255, 0.05) !important;
  border-left: 3px solid transparent;
}

.mode-advanced {
  background: linear-gradient(to bottom, rgba(43, 88, 118, 0.1), rgba(54, 209, 196, 0.1)) !important;
}

.mode-advanced .bot-message {
  border-left: 3px solid #2b5876;
}

.mode-troubleshooting {
  background: linear-gradient(to bottom, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.05)) !important;
}

.mode-troubleshooting .bot-message {
  border-left: 3px solid #ff9800;
}

.mode-search {
  background: linear-gradient(to bottom, rgba(54, 209, 196, 0.1), rgba(43, 88, 118, 0.05)) !important;
}

.mode-search .bot-message {
  border-left: 3px solid #36d1c4;
}

.system-message {
  background: rgba(108, 117, 125, 0.2);
  color: #495057;
  padding: 12px 18px;
  border-radius: 8px;
  margin: 10px auto;
  max-width: 90%;
  text-align: center;
  font-size: 0.9em;
  border-left: 3px solid #6c757d;
}

/* Search Results Styling */
.search-results-list {
  max-height: 400px;
  overflow-y: auto;
  margin: 10px 0;
  padding: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.search-result {
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  border-left: 3px solid #36d1c4;
  transition: all 0.2s ease;
}

.search-result:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-result h6 {
  color: #2b5876;
  margin-bottom: 5px;
}

.result-path {
  font-size: 0.7rem;
  color: #6c757d;
  margin-top: 5px;
}

/* Sign-up button styling - Updated for theme consistency */
.signup-btn {
  display: inline-block;
  padding: 10px 24px;
  margin-left: 10px;
  background: linear-gradient(90deg, #36d1c4 0%, #2b5876 100%) !important;
  color: #fff !important;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.15);
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  border: none;
  text-align: center;
  line-height: 1.5;
}

.signup-btn:hover {
  background: linear-gradient(90deg, #2b5876 0%, #36d1c4 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
  color: #fff !important;
  text-decoration: none;
}

.signup-btn:active,
.signup-btn:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(54, 209, 196, 0.5);
}

.signup-btn i,
.signup-btn .bi {
  margin-right: 5px;
}

/* For tablets and below */
@media (max-width: 991.98px) {

  .container,
  .card,
  .well,
  .modal-content,
  .dataTables_wrapper,
  .instructions-content {
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
  }

  .main-content {
    padding-bottom: 40px;
  }

  .navbar .navbar-brand {
    font-size: 1.1rem;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .navbar .navbar-nav>.nav-item>.nav-link {
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 1rem;
  }
}

/* For mobile phones */
@media (max-width: 767.98px) {
  body {
    font-size: 14px;
    padding-top: 55px;
  }

  h2 {
    font-size: 1.4rem;
  }

  .container,
  .card,
  .well,
  .modal-content,
  .dataTables_wrapper,
  .instructions-content {
    padding: 6px;
    margin-top: 6px;
    margin-bottom: 6px;
    border-radius: 6px;
  }

  .navbar .navbar-brand {
    font-size: 1rem;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .navbar .navbar-nav>.nav-item>.nav-link {
    font-size: 0.95rem;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .main-content {
    padding-bottom: 20px;
  }

  .btn,
  button,
  input[type="button"],
  input[type="submit"] {
    padding: 8px 14px;
    font-size: 0.95rem;
  }

  .pagination .page-link {
    padding: 6px 10px;
    font-size: 0.95rem;
  }
}

/* For extra small screens */
@media (max-width: 575.98px) {
  h2 {
    font-size: 1.1rem;
  }

  .navbar .navbar-brand {
    font-size: 0.95rem;
  }

  .main-content {
    padding-bottom: 10px;
  }
}

/* @media screen and (orientation: landscape) {
  body { background-color: lightblue; }
}

@media screen and (orientation: portrait) {
  body { background-color: lightcoral; }
} */

/* Temporary Orientation Test - Apply to Navbar */
/* @media screen and (orientation: landscape) {
  .navbar { background: lightblue !important; } 
}

@media screen and (orientation: portrait) {
  .navbar { background: lightcoral !important; } 
} */

/* Style for search result rows */
.search-result-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  /* Adjust minmax value as needed */
  gap: 5px;
  margin-bottom: 10px;
  border: 1px solid #000000cb;
  padding: 5px;
}