/* General Body Styling */
body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  background-color: #e0e2db;
  color: #333333;
  font-size: 16px;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Navigation Bar */
.nav-bar {
  width: 100%;
  max-width: 100%;
  background-color: #ffffff;
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1), -4px -4px 8px rgba(0, 0, 0, 0.05),
    4px 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  padding: 16px 5%; /* 5% left and right padding */
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
}

/* Logo Section */
.nav-bar .logo {
  width: 150px;
  height: 65px;
  background-image: url("logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 16px;
}

/* Navigation Links */
.nav-bar .nav-links {
  display: flex;
  gap: 20px;
  flex-grow: 1;
}

.nav-bar .nav-links a {
  text-decoration: none;
  color: #8b2635;
  font-weight: bold;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.nav-bar .nav-links a:hover {
  background-color: #f8f9fa;
  color: #8b2635;
}

/* Navigation Buttons */
.nav-bar .nav-buttons {
  display: flex;
  gap: 10px;
}

.nav-bar .nav-buttons button {
  padding: 8px 16px;
  background-color: #8b2635;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.nav-bar .nav-buttons button:hover {
  background-color: #8b2635;
}

/* Content Section */
.content {
  width: 70%; /* Shrink by 5% */
  margin-top: 20px; /* Adds spacing below the nav-bar */
  padding: 5px;
}

/* Dropdown Styling */
.dropdown-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px auto; /* Center it horizontally */
  text-align: center;
}

.dropdown-container label {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px; /* Add space between label and dropdown */
  color: #333333;
}

.dropdown-container select {
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #ffffff;
  transition: border-color 0.3s;
  text-align: center;
}

.dropdown-container select:focus {
  outline: none;
  border-color: #8b2635;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.5);
}

/* Sidebar */
.sidebar {
  width: 30%; /* Widen by 5% */
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1), -4px -4px 8px rgba(0, 0, 0, 0.05),
    4px 4px 8px rgba(0, 0, 0, 0.05);
  margin: 20px 10px 20px auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: auto;
  max-height: 100%;
  position: relative;
}

/* Sidebar Header */
.sidebar-header {
  font-size: 20px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 16px;
  text-align: center;
}

/* Sidebar Content */
.sidebar-content {
  flex-grow: 1;
  overflow: visible; /* Prevent scrolling issues */
}
/* Additional Styling for ASIN List */
.context .asin-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.asin-item {
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 16px;
  padding: 6px 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  color: #333333;
  transition: transform 0.2s, box-shadow 0.2s;
}

.asin-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.quick-questions button {
  display: block;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  margin: 5px 0; /* Adds spacing between buttons */
  transition: all 0.3s ease-in-out;
}

.quick-questions button:hover {
  background-color: #f8f9fa;
  border-color: #8b2635;
  transform: translateY(-2px);
}

.quick-questions button.selected {
  background-color: #8b2635;
  color: #ffffff;
}

/* Text Box */
.text-box {
  width: 100%;
  height: 150px;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid #ddd;
  padding: 12px;
  background-color: #ffffff;
  box-sizing: border-box;
  margin-top: 16px;
}

.text-box:focus {
  border-color: #8b2635;
  outline: none;
  box-shadow: 0px 0px 4px rgba(0, 123, 255, 0.5);
}

/* Footer Button */
.footer button {
  width: 100%;
  padding: 12px;
  background-color: #8b2635;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s, opacity 0.3s;
}

.footer button:hover:not(:disabled) {
  background-color: #8b2635;
}

.footer button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Flexbox Layout */
.layout-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;

  padding: 0 10px;
  background-color: #e0e2db;
}
#submit-button {
  background-color: #8b2635;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: not-allowed; /* Keeps the disabled look */
  transition: background-color 0.3s ease;
}

#submit-button:hover:enabled {
  background-color: #8b2635;
}

#submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Optional: Remove button from the footer if still present */
.footer #submit-button {
  display: none;
}

/* Fix main-table borders */
.main-table {
  width: 100%;
  border-collapse: collapse; /* Ensures clean cell merging */
  background-color: #ffffff; /* Maintains table background */
  border: 1px solid #ddd; /* Ensures outer table border */
}

.main-table th,
.main-table td {
  border: 1px solid #ddd; /* Ensures visible cell borders */
  padding: 10px; /* Adds spacing inside cells */
  text-align: left; /* Aligns text for consistency */
  vertical-align: middle; /* Keeps text centered vertically */
  font-size: 14px; /* Standard font size */
}

.main-table th {
  background-color: #f2f2f2; /* Light background for headers */
  font-weight: bold; /* Highlights table headers */
}

/* Help Icon */
.help-icon {
  width: 25px;
  height: 25px;
  margin-left: 8px;
  cursor: pointer;
  vertical-align: middle;
  transition: transform 0.2s;
}

.help-icon:hover {
  transform: scale(1.2);
}

/* Pop-up Overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 200;
}

/* Pop-up Content */
.popup-content {
  background-color: white;
  padding: 3%;
  border-radius: 12px;
  width: 70%;
  text-align: center;
  position: relative;
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.2);
}
.nav-buttons {
  display: flex;
  gap: 10px;
}

.button-link {
  display: inline-block;
  padding: 8px 16px;
  background-color: #8b2635;
  color: #ffffff;
  text-decoration: none;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  transition: background-color 0.3s;
}

.button-link:hover {
  background-color: #8b2635;
}

.popup-content h2 {
  font-size: 30px;
  color: black;
  margin-bottom: 20px;
}

.popup-content p {
  margin-bottom: 20px;
  font-size: 16px;
  color: #333;
}

.popup-content iframe {
  border-radius: 8px;
}
.popup-content video {
  border-radius: 8px;
  margin-top: 20px;
  display: block;
}
/* Ensure enough space at the bottom */
body {
  padding-bottom: 50px; /* Increase padding for more space */
}

.footer {
  margin-top: 50px; /* Increased spacing above the footer */
  padding: 40px 20px; /* More padding inside the footer */
  background-color: #8b2635; /* Keep background consistent */
  color: white;
  text-align: center;
  font-size: 16px;
}

/* Add extra margin to the bottom area */
#report-response-container {
  margin-bottom: 60px; /* Ensures extra space below the content */
}

#spinner-container {
  margin-bottom: 40px; /* Avoids spinner cutting into the footer */
}

.table-container {
  margin-bottom: 50px; /* Gives extra space under tables */
}

/* Close Button */
.close-popup {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  font-weight: bold;
  color: black;
  cursor: pointer;
  transition: color 0.2s;
}

.close-popup:hover {
  color: red;
}
.response-box {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1), -4px -4px 8px rgba(0, 0, 0, 0.05),
    4px 4px 8px rgba(0, 0, 0, 0.05);
  padding: 30px; /* Increased padding for breathing space */
  margin: 20px 0;
  display: none;
  width: 100%;
  max-width: 90%;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif; /* Modern font */
  line-height: 1.6; /* Better spacing between lines */
}

/* 🏷️ Style Headings */
.response-box h1,
.response-box h2,
.response-box h3 {
  font-weight: 700;
  margin-bottom: 25px;
  margin-top: 25px;
  color: #333;
  border-bottom: 2px solid #ddd; /* Subtle separation */
  padding-bottom: 5px;
}

/* 🏷️ Style Paragraphs */
.response-box p {
  font-size: 16px;
  color: #444;
  margin-bottom: 15px;
}

/* 🏷️ Style Lists */
.response-box ul,
.response-box ol {
  padding-left: 20px;
  margin-bottom: 15px;
}

/* 🏷️ Style Tables */
.response-box table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.response-box th,
.response-box td {
  border: 1px solid #ddd;
  padding: 12px; /* More padding inside table cells */
  text-align: left;
}

.response-box th {
  background-color: #f7f7f7;
  font-weight: bold;
  color: #333;
}

/* 🏷️ Improve Button Styling if Needed */
.response-box button {
  background-color: #007bff;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 15px;
}

.response-box button:hover {
  background-color: #0056b3;
}
#spinner-container {
  display: none; /* Ensure it's hidden on page load */
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #8b2635;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/*  Style the response container for better padding & spacing */
.response-box {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1), -4px -4px 8px rgba(0, 0, 0, 0.05),
    4px 4px 8px rgba(0, 0, 0, 0.05);
  padding: 30px; /* Increased padding for more breathing room */
  margin: 20px 0;
  display: none;
  width: 100%;
  max-width: 90%;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
  line-height: 1.8; /* Increased line height for better readability */
}

/* 🏷️ Style the Strong (Bold) Text */
.response-box strong {
  font-size: 1.1em; /* Slightly larger than normal text */
  font-weight: 700;
  color: #222; /* Darker text for emphasis */
}

/* 🏷️ Add Line Above H3 Tags */
.response-box h3 {
  font-weight: 700;
  color: #333;
  border-top: 0px solid #fff; /* Colored line above the H3 */
  padding-top: 20px; /* 20px padding between the line and the text */
  margin-bottom: 25px;
  margin-top: 25px;
}

/* 🏷️ Remove Lines from H4 Tags */
.response-box h4 {
  font-weight: 700;
  color: #333;
  border: none; /* No top or bottom line */
  padding-top: 0; /* Reset any padding */
  margin-top: 20px; /* Add spacing for consistency */
  margin-bottom: 10px; /* Minimal spacing below */
}

/* 🏷️ Paragraph Styling */
.response-box p {
  font-size: 16px;
  color: #444;
  margin-bottom: 15px;
}

/* 🏷️ Styling for Ordered and Unordered Lists */
.response-box ul,
.response-box ol {
  padding-left: 25px;
  margin-bottom: 20px;
}

/* 🏷️ Improve the Main Bullets */
.response-box ul > li {
  margin-bottom: 10px; /* More space between different bullet sections */
  font-weight: normal; /* Make top-level bullets bold */
}

/* 🏷️ Style Sub-Bullets for Better Grouping */
.response-box ul ul {
  padding-left: 15px; /* Indent sub-bullets */
  margin-top: 5px;
}

.response-box ul ul li {
  font-weight: normal; /* Lighter weight than parent bullet */
  margin-bottom: 5px; /* Less space than between top-level bullets */
}

/* 🏷️ Tables for Data Points */
.response-box table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.response-box th,
.response-box td {
  border: 1px solid #fff;
  padding: 12px;
  text-align: left;
}

.response-box th {
  background-color: #f2f2f2;
  font-weight: bold;
  color: #333;
}
/* General styling to remove excessive spacing */
.response-content h3,
.response-content h4,
.response-content p,
.response-content ul,
.response-content li,
.response-content table {
  margin-bottom: 25px;
  margin-top: 25px;
  padding: 0; /* Remove any padding */
  line-height: 1.5; /* Keep content closer together but readable */
}

/* Specific styling for tables */
.response-content table {
  width: 85%; /* Ensures tables don't exceed 85% of the container width */
  margin: 20px auto; /* Keeps tables centered and spaced appropriately */
  border-collapse: collapse; /* Clean table borders */
}

.response-content th,
.response-content td {
  padding: 8px; /* Minimal padding inside table cells */
  border-bottom: 0px solid #fff; /* Subtle border between rows */
  text-align: left; /* Align text to the left */
}

.response-content tbody tr:nth-child(even) {
  background-color: #f9f9f9; /* Alternating row background for readability */
}

/* Additional tweaks for list items */
.response-content ul {
  padding-left: 20px; /* Indent list items slightly */
  margin-top: 5px; /* Minimal margin for better grouping */
  margin-bottom: 10px; /* Reduced bottom margin */
}

.response-content li {
  margin-bottom: 5px; /* Reduce spacing between list items */
  line-height: 1.5; /* Compact line height */
}
/* Make HR lines invisible */
.response-box hr {
  border: none;
  background-color: #fff; /* White background so it blends */
  height: 1px; /* Keeps it from affecting spacing */
  margin: 0; /* No extra space */
}

/* Fix table borders while keeping HR hidden */
.response-box table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #ddd; /* Ensures table borders are visible */
}

.response-box th,
.response-box td {
  border: 1px solid #ddd; /* Restore table borders */
  padding: 12px;
  text-align: left;
}

.response-box th {
  background-color: #f2f2f2;
  font-weight: bold;
  color: #333;
}
/* Styling for Item Section */
.item-section {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* Styling for Sub-Table */
.sub-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.sub-table th,
.sub-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.sub-table th {
  background-color: #f2f2f2;
  font-weight: bold;
  color: #333;
}

/* Task Button Styling */
.task-button {
  background-color: #8b2635;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.task-button:hover {
  background-color: #a12e42;
}
/* Default button styling */
.add-to-queue-button {
  background-color: #8b2635; /* Dark red */
  color: white; /* Default checkmark color */
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.3s ease-in-out;
}

/* Style when the button is disabled (after submission) */
.add-to-queue-button:disabled {
  background-color: #8b2635; /* Keep same outer color */
  color: white; /* Checkmark stays white */
  opacity: 0.8; /* Slight transparency for disabled effect */
  cursor: not-allowed;
}
/* Style for the dropdown menu */
#report-type-dropdown {
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #8b2635; /* Matches brand color */
  background-color: #ffffff;
  color: #333;
  transition: border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

/* Hover and focus effect for dropdown */
#report-type-dropdown:hover,
#report-type-dropdown:focus {
  border-color: #a03d4b; /* Slightly lighter red */
  box-shadow: 0 0 4px rgba(139, 38, 53, 0.5);
  outline: none;
}

/* Button Styling - Matches the rest of your site */
#generate-report-btn,
#clear-list-btn {
  padding: 10px 18px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  background-color: #8b2635;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Hover effect for buttons */
#generate-report-btn:hover,
#clear-list-btn:hover {
  background-color: #a03d4b; /* Lighter shade */
  transform: translateY(-2px); /* Slight lift effect */
}

/* Disabled button style */
#generate-report-btn:disabled,
#clear-list-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Spinner container alignment */
#spinner-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px; /* Adjust spacing */
}

/* Spacing between buttons and the table */
.nav-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px; /* Adds space between buttons and the table */
}

/* --- Expandable content styles for grouped table rows --- */
.expandable-content {
  position: relative;
  overflow: hidden;
  max-height: 200px; /* Collapsed height (adjust as needed) */
  transition: max-height 0.3s ease;
}

/* When expanded, allow the content to grow */
.expandable-content.expanded {
  max-height: 1000px; /* A large value to simulate "unlimited" height */
}

/* Create the fade-out gradient at the bottom */
.expandable-content::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(transparent, #e0e2db);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Hide the fade-out when expanded */
.expandable-content.expanded::after {
  opacity: 0;
}

/* Style the Expand/Collapse button */
.expand-button {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #8b2635;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 6px 16px; /* Increased padding for height and width */
  cursor: pointer;
  z-index: 2;
  font-size: 12px;
  transition: background-color 0.3s ease;
}

.expand-button:hover {
  background-color: #a03d4b;
}
