body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* HEADER BAR */
.header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;   /* logo left, brand selector right */
  padding: 10px 20px 0 20px;
}

/* holds heading + menu icons */
.title-links-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;              /* center heading + menu */
}

.title-row {
  width: 100%;
  text-align: center;
}

.logo {
  max-height: 80px;
  width: auto;
  margin-right: 20px;
  position: relative;
  margin-top: 30px;
}

.logo img {
  height: 80px;
  width: auto;
  object-fit: contain;
  margin-top: 20px;
}

.title-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

h1 {
  font-size: 28px;
  margin: 0 0 5px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.black-text { color: black; }
.red-text { color: #d42d2b; }

/* MENU BAR */
.menu-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
}

.nav-link {
  padding: 6px 10px;
  border: 1px solid #000;
  text-decoration: none;
  color: black;
  font-size: 16px;

  display: flex;             /* icon + label vertical */
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.red-border {
  border: 3px solid #d42d2b;
}

/* BRAND SELECTOR - top right corner */
.brand-selector {
  margin-left: auto;   /* push far right */
  text-align: right;
  margin-top: 10px;
}

.brand-selector h2 {
  margin: 0 0 5px 0;
  font-size: 16px;
}

.brand-selector select {
  width: 180px;
  padding: 6px;
  background-color: white;
  border: 1px solid #ccc;
  text-transform: uppercase;
}

/* ICON + LABEL */
.menu-icon {
  height: 30px;             /* adjust as needed */
  width: auto;
  display: block;
  margin: 0 auto 4px auto;
}

.menu-label {
  font-size: 20px;
  line-height: 1;
  text-align: center;
  width: 100%;
}

/* RED LINE UNDER HEADER */
.red-line {
  height: 3px;
  background-color: #d42d2b;
  width: 100%;
  margin-top: 5px;
}

/* MAIN CONTENT */
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 15px 20px;
}

.panel {
  max-width: 250px;
  text-align: left;
}

input {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  text-transform: uppercase;
  box-sizing: border-box;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  height: 200px;
  overflow-y: auto;
  border: 1px solid #ccc;
  background-color: #fff;
  width: 100%;
  box-sizing: border-box;
  line-height: 1;
}

li {
  height: auto;
  padding: 2px 8px;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
  font-size: 14px;
}

li:hover {
  background-color: #f0f0f0;
}

#resultsSection {
  padding: 20px;
  text-align: center;
}

#resultsTable {
  width: auto;
  border-collapse: collapse;
  margin: 0 auto;
}

#resultsTable th,
#resultsTable td {
  border: 1px solid black;
  padding: 8px;
  text-align: center;
}

/* MOBILE */
@media (max-width: 768px) {
  h1 { font-size: 20px; }
  .nav-link { font-size: 14px; }
}

.results-table {
  display: flex;
  justify-content: center;
  padding: 20px;
}

#resultsTable thead th {
  background-color: #f2f2f2;
  color: black;
  font-size: 18px;
  font-weight: bold;
  padding: 10px;
}

#searchYear { width: 100%; }
#searchFuel { width: calc(100% + 3ch); }
#fuelList { width: calc(100% + 3ch); }

.results-table {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

#resultsTable {
  background-color: white;
  width: auto;
  border-collapse: collapse;
  margin: 0 auto;
  text-align: center;
}

#resultsTable th,
#resultsTable td {
  border: 1px solid black;
  padding: 8px;
}

#resultsTable th {
  background-color: #d42d2b;
  color: black;
  font-size: 16px;
}

#resultsTable td:nth-child(2) {
  text-align: left;
}

table, th, td {
  border-collapse: collapse;
  border-spacing: 0;
  padding: 0;
  margin: 0;
}

/* BACKGROUND */
body {
  background-image: url("Graphics/cbcfitment_bg_v1.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
}

/* KEEP SEARCH CENTERED */
.results-table {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

/* Convert page spacing */
.convert-page .results-table {
  padding: 0px 0 16px;
}

.results-wrap {
  display: block;
  width: max-content;
  margin: 0 auto;
}

/* Search layout */
.search-area {
  width: max-content;
  margin: 0 auto;
}

.search-area {
  display: grid;
  grid-template-columns: 250px 250px 250px;
  gap: 20px;
  justify-content: center;
}

.search-area .panel {
  width: 250px;
  max-width: 250px;
}

.fitment-notice {
  grid-column: 1 / span 3;
  align-self: start;
  margin-top: 6px;
  display: none;
  padding: 0;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 14px;
}

.bikes-search {
  display: grid;
  grid-template-columns: 250px 250px 250px;
  gap: 20px;
  width: max-content;
  margin: 0 auto;
}

.container.bikes-search {
  display: block;
  padding: 15px 20px;
}

.container.bikes-search .search-area {
  display: grid;
  grid-template-columns: 250px 250px 250px;
  gap: 20px;
  width: max-content;
  margin: 0 auto;
}

#fitmentNotice,
.fitment-notice {
  grid-column: 1 / -1;
  display: none;
  margin-top: 0px;
  padding: 0;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 14px;
}

#fuelList li.selected {
  background-color: #ffe8a6;
}

/* SEARCH WRAP */
.search-wrap {
  position: relative;
  width: max-content;
  margin: 0 auto;
}

.search-wrap .panels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* RESET BUTTON */
.reset-btn {
  position: absolute;
  left: -130px;
  top: 0px;
  width: 116px;
  height: 36px;
  border: 1px solid #000;
  background: #fff;
  color: gray;
  font-size: 12px;
  font-family: Arial, sans-serif;
  text-transform: none;
  cursor: pointer;
  line-height: 36px;
  text-align: center;
  box-sizing: border-box;
}

.reset-btn:hover {
  border: 2px solid #d42d2b;
}

@media (max-width: 900px) {
  .reset-btn {
    position: static;
    margin-bottom: 10px;
  }
}

/* TABLE HEADER ALIGNMENT */
#resultsTable th {
  vertical-align: top;
  line-height: 1.1;
  padding-top: 4px;
}

/* CARS PAGE NOTICE */
.search-wrap .fitment-notice {
  display: none;
  margin: 0 auto;
  text-align: center;
  padding: 0;
  background: transparent;
  border: none;
  max-width: 800px;
}

/* INFO BOX */
.info-box {
  display: none;
  margin: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 12px;
  box-sizing: border-box;
  text-align: left;
  font-size: 14px;
  width: 100%;
}

/* info icon */
.info-icon {
  border: 2px solid #d42d2b;
  border-radius: 50%;
  background-color: white;
  color: #d42d2b;
  font-weight: bold;
  width: 24px;
  height: 24px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}

.info-icon:hover {
  background-color: #d42d2b;
  color: white;
}

/* info box internal */
#infoBox {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 12px;
  box-sizing: border-box;
  text-align: left;
  font-size: 14px;
  width: 100%;
}

#infoBox .info-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid #d42d2b;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
  color: #d42d2b;
  background: #fff;
  margin-top: 2px;
  user-select: none;
}

#infoBox .info-text {
  display: inline-block;
  line-height: 1.3;
}

#infoBox .info-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Panel titles */
.panel-title {
  text-align: center;
  line-height: 1.15;
  min-height: 3.2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.convert-title { gap: 2px; }
.convert-title .convert-label,
.convert-title .convert-brand {
  display: block;
}

.convert-brand {
  font-weight: 600;
  word-break: break-word;
}

.convert-page .search-wrap {
  margin-top: -34px;
}

.convert-page .reset-btn {
  top: calc(3.2em + 46px);
}

/* Output labels */
.detail-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.footnote {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.3;
  color: #000;
  text-align: left;
  max-width: 100%;
  white-space: normal;
}

.convert-page .panel-title {
  height: 3.2em;
  min-height: 0;
  margin: 0 0 8px;
  line-height: 1.15;
  overflow: hidden;
}

.convert-page .convert-title .convert-brand {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ALL BRANDS row */
#brandList li.all-brands {
  font-weight: 700;
}

/* spacer */
#brandList li.gap,
#brandList li.gap:hover {
  background: transparent !important;
  height: 8px;
  cursor: default;
  pointer-events: none;
}

/* extra output */
.extra-output-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 0px;
}

.extra-output-label {
  font-size: 12px;
  line-height: 1.1;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 4px;
}

.extra-output-group .extra-output {
  margin: 0;
}

.extra-output-group .extra-output:last-child {
  margin-bottom: 0;
}

/* left-side labels */
.convert-page .output-labels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 0;
}

.convert-page .output-labels .label-row {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  line-height: 30px;
  text-transform: uppercase;
  white-space: nowrap;
}

.convert-page .extra-output-group .extra-output {
  height: 30px;
}

#efbOutput,
#agmOutput {
  margin-top: 0;
}

.convert-page .output-labels .label-row:nth-child(4),
.convert-page .output-labels .label-row:nth-child(5) {
  margin-top: 0;
}

/* input display box */
#convertDisplay {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

#convertDisplay:focus { outline: none !important; }

/* Camera icon */
.info-camera {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 2px;
}

.info-camera .camera-icon {
  width: 36px;
  height: 36px;
  display: block;
  cursor: pointer;
}

/* Cars page only */
.cars-page { --camera-offset-x: 110px; }
.cars-page .container { padding-bottom: 0; }
.cars-page .results-table { padding-top: 0; padding-bottom: 0; }
.cars-page .info-camera { margin: 2px 0 0 var(--camera-offset-x); justify-content: flex-start; }
.cars-page.has-notice .results-table { padding-top: 0; }
.cars-page.no-notice .results-table { padding-top: 8px; }

/* Disable stray brand flyout on Convert page */
.brand-flyout,
.brand-flyout-search,
.brand-flyout-list {
  display: none !important;
}
/* Extra space under table in Variant Lookup (Year 0) mode */
#resultsTable.variant-only {
  margin-bottom: 80px;  /* about a couple of cm on most screens */
}

#convertFeedbackBar {
  margin: 8px auto 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-bottom: 24px;     /* adds blank space under the button */
}


#convertFeedbackNotes {
  width: 100%;
  box-sizing: border-box;
  min-height: 80px;
  resize: vertical;
}

#convertFeedbackButton {
  margin-top: 6px;
  align-self: flex-end;
}
/* Convert feedback button – match Cars/Bikes height and style */
/* Convert feedback button – match Cars/Bikes */
#convertFeedbackButton {
  display: block;
  width: 100%;
  padding: 14px 0;
  font-size: 16px;
  font-weight: normal;
  cursor: pointer;
  text-align: center;

  /* Match Cars/Bikes style */
  border: 1px solid #000;   /* black border */
  background-color: #f0f0f0;
  color: #000;
}
/* Convert page: slightly taller scroll boxes for Search Brand and Part Number */
.convert-page #brandList,
.convert-page #partList {
  height: 230px;  /* was 200px globally */
}

/* Convert page – make Send Feedback button small and left aligned */
.convert-page #convertFeedbackNotesWrapper {
  text-align: left;              /* keep it hugging the left under Notes */
}

.convert-page #convertFeedbackSendButton {
  display: inline-block;
  width: 140px !important;       /* override inline width:100% */
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2;
  border: 1px solid #000;
  border-radius: 4px;
  background-color: #f5f5f5;
  cursor: pointer;
  margin-top: 6px;               /* keeps it just under the notes box */
}

.convert-page #convertFeedbackSendButton:hover {
  background-color: #e0e0e0;
}
