/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  font-size: 14px;
  font-family: Arial, sans-serif;
}

#app {
  display: flex;
  height: 100%;
  width: 100%;
}

/* Left Container */
.left-container {
  width: 18%;
  padding: 5px; /* Reduced padding */
  background-color: #f4f4f4;
  overflow-y: auto;
}

.search-container {
  display: flex;
  flex-direction: column;
  gap: 5px; /* Reduced gap */
  margin-bottom: 15px; /* Reduced margin */
}

.search-container input {
  padding: 8px; /* Reduced padding */
  font-size: 14px;
  width: 100%;
}

.photo-container {
  flex: 1;
  margin-bottom: 15px; /* Reduced margin */
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ddd;
}

.product-header {
  margin-bottom: 8px; /* Reduced margin */
  padding: 8px; /* Reduced padding */
  background-color: #ccc;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.product-info-container {
  flex: 2;
  overflow-y: auto;
}

/* Right Container */
.right-container {
  width: 75%;
  padding: 5px; /* Reduced padding */
  background-color: #ffffff;
  overflow-y: auto;
  display: flex;
  flex-direction: row;
  gap: 15px; /* Reduced gap */
  position: relative;
}

/* Routes and Profits Section */
#routes_and_profits {
  width: 25%; /* Adjusted width */
  padding: 8px; /* Reduced padding */
  background-color: #e4e4e4;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px; /* Reduced gap */
}

/* Scanned Value Route Box */
#scannedval_route {
  width: 100%;
  height: 100px;
  background-color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  color: white;
}

/* Profits Box */
#profits {
  width: 100%;
  background-color: #fff;
  padding: 8px; /* Reduced padding */
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

/* Current Stats Box */
#currentstats {
  width: 100%;
  background-color: #fff;
  padding: 8px; /* Reduced padding */
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-top: 8px; /* Reduced margin */
}

/* Table Styling */
.stats-table-container {
  width: 100%;
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table th, .stats-table td {
  padding: 10px 12px; /* Reduced padding */
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.stats-table th {
  background-color: #f4f4f4;
  font-weight: bold;
}

.stats-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.stats-table tr:hover {
  background-color: #f1f1f1;
}

#pricechartingdata {
  width: 100%;
  background-color: #fff;
  padding: 8px; /* Reduced padding */
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

/* Container for the two tables inside #pricechartingdata */
.pricecharting-tables-container {
  display: flex;
  gap: 8px; /* Reduced gap */
}

/* Each table container inside pricechartingdata */
.pricecharting-tables-container .stats-table-container {
  flex: 1;
  overflow-x: auto;
}

/* Table Styling */
.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table th, .stats-table td {
  padding: 10px 12px; /* Reduced padding */
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.stats-table th {
  background-color: #f4f4f4;
  font-weight: bold;
}

.stats-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.stats-table tr:hover {
  background-color: #f1f1f1;
}

/* Historical Data Section */
#historical_data_section {
  width: 70%; /* Adjusted width */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Radar Chart Container */
#radar_chart_container {
  width: 100%;
  min-width: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px; /* Reduced padding */
  background-color: #f9f9f9; 
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* Radar Chart */
#radar_chart {
  width: 100%;
  height: 400px; /* Set a height for the chart */
}

/* Historical Data Table */
#historical_data_table {
  width: 100%;
  margin-top: 15px; /* Reduced margin */
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  padding: 8px; /* Reduced padding */
}

#pricecharts_container {
  width: 100%;
  margin-top: 15px;
  padding: 8px;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

#pricecharts {
  width: 100%;
  height: 400px; /* Adjust as needed */
}

#offers {
  width: 100%;
  margin-top: 15px; /* Space above the offers table */
  padding: 8px; /* Padding inside the offers section */
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

#offers table {
  width: 100%;
  border-collapse: collapse;
}

#offers th, #offers td {
  padding: 10px 12px; /* Padding inside table cells */
  text-align: left;
  border-bottom: 1px solid #ddd;
}

#offers th {
  background-color: #f4f4f4;
  font-weight: bold;
}

#offers tr:nth-child(even) {
  background-color: #f9f9f9;
}

#offers tr:hover {
  background-color: #f1f1f1;
}

#historical_data_table table {
  width: 100%;
  border-collapse: collapse;
}

#historical_data_table th, #historical_data_table td {
  padding: 10px 12px; /* Reduced padding */
  text-align: left;
  border-bottom: 1px solid #ddd;
}

#historical_data_table th {
  background-color: #f4f4f4;
  font-weight: bold;
}

#historical_data_table tr:nth-child(even) {
  background-color: #f9f9f9;
}

#historical_data_table tr:hover {
  background-color: #f1f1f1;
}

#historical_data_table td:first-child {
  font-weight: bold;
}

/* Stats Table Styles */
.stats-table-container {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 15px; /* Reduced margin */
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table th, .stats-table td {
  padding: 10px 12px; /* Reduced padding */
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.stats-table th {
  background-color: #f4f4f4;
  font-weight: bold;
}

.stats-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.stats-table tr:hover {
  background-color: #f1f1f1;
}

/* Offers Table Styles */
#offers {
  width: 100%;
  overflow-x: auto;
}

#offers table {
  width: 100%;
  border-collapse: collapse;
}

#offers th, #offers td {
  padding: 10px 12px; /* Reduced padding */
  text-align: left;
  border-bottom: 1px solid #ddd;
}

#offers th {
  background-color: #f4f4f4;
  font-weight: bold;
}

#offers tr:nth-child(even) {
  background-color: #f9f9f9;
}

#offers tr:hover {
  background-color: #f1f1f1;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  #app {
      flex-direction: column; /* Stack left and right containers vertically */
  }

  .left-container, .right-container {
      width: 100%;
  }

  .right-container {
      flex-direction: column; /* Stack sections vertically */
      align-items: center;
  }

  #routes_and_profits,
  #historical_data_section {
      width: 100%; /* Full width on small screens */
  }

  #radar_chart_container {
      min-width: unset; /* Allow to shrink on small screens */
  }
}