/* Base Styles & Festive Palette */
:root {
  --primary-glow: #ffab00; /* Amber/Cocktail gold */
  --accent-pink: #ff4081;  /* Neon cherry */
  --bg-dark: #121212;      /* Deep lounge black */
  --surface: #1e1e1e;      /* Card/Section background */
  --text-light: #f5f5f5;
  --border-color: #333;
}

body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
  padding: 15px;
}

/* Section Titles */
h1 {
  color: var(--primary-glow);
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 2px solid var(--primary-glow);
  padding-bottom: 10px;
}

h2 {
  color: var(--accent-pink);
  margin-top: 1.5rem;
}

/* Input Fields & Buttons */
input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: white;
  box-sizing: border-box; /* Ensures padding doesn't break width */
  font-size: 1rem;
}

button {
  background-color: var(--primary-glow);
  color: black;
  border: none;
  padding: 9px 20px;
  border-radius: 25px;
  /* font-weight: bold; */
  cursor: pointer;
  font-size: 1.3rem;
  width: 100%; /* Mobile first */
  transition: transform 0.1s, opacity 0.2s;
}

button:active {
  transform: scale(0.98);
  opacity: 0.8;
}

/* Festive Checkboxes */
/* Customizing the Inventory and Option Checkboxes */
input[type="checkbox"] {
  /* 1. Remove the default browser styling */
  appearance: none;
  -webkit-appearance: none;

  /* 2. Unchecked State: Dark & Subtle */
  background: rgba(255, 255, 255, 0.05); /* Very dark/transparent */
  border: 1px solid rgba(255, 255, 255, 0.2); /* Dim border */
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  accent-color: var(--primary-glow);
  filter: drop-shadow(0 0 2px var(--primary-glow));
}


/* 3. Hover State: Slight highlight so you know it's interactive */
input[type="checkbox"]:hover {
  border-color: rgba(255, 171, 0, 0.4);
  background: rgba(255, 171, 0, 0.05);
}

/* 4. Checked State: Your preferred "pop" color */
input[type="checkbox"]:checked {
  background: var(--primary-glow); /* Or your accent-pink */
  border-color: var(--primary-glow);
  box-shadow: 0 0 10px rgba(255, 171, 0, 0.4);
}


/* Checkbox at the start of the row */
.stock-checkbox {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-right: 4px;
}

/* Customizing the checkbox appearance for the row */
.stock-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  /* Amber glow for 'Base' products */
  /* accent-color: var(--primary-glow); */
  cursor: pointer;
}

/* Optional: Slight highlight for rows marked as Base */
.stock-row:has(input[type="checkbox"]:checked) {
  border-color: rgba(255, 171, 0, 0.4);
  background: linear-gradient(90deg, rgba(255,171,0,0.05) 0%, var(--surface) 100%);
}



/* 5. The "Check" Mark (using a pseudo-element) */
input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: black; /* High contrast against the glow */
  font-size: 12px;
  font-weight: bold;
}



/* Checkbox Row Styling */
.checkbox-item {
  display: flex;
  align-items: center;
  padding: 12px 0; /* Vertical padding for easier tapping */
  border-bottom: 1px solid #333;
  cursor: pointer;
}

.checkbox-item:last-child {
  border-bottom: none;
}

label.checkbox-item {
  margin-left: 12px;
  font-size: 1rem;
  flex-grow: 1; /* Makes the whole row clickable if you wrap it in a label */
  cursor: pointer;
}
label.checkbox-item span {
  margin-left: 16px;
}


/* Lists */
ul {
  list-style: none;
  padding: 0;
}

li {
  background: var(--surface);
  margin-bottom: 5px;
  padding: 10px;
  border-left: 4px solid var(--primary-glow);
  border-radius: 4px;
}

/* Responsive Table (The "Stack" Method) */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th {
  background: var(--surface);
  text-align: left;
  padding: 10px;
}

td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}

@media screen and (max-width: 600px) {
  /* Force table to not behave like a table anymore */
  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  tr { border: 1px solid var(--border-color); margin-bottom: 10px; border-radius: 8px; }

  td {
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: right;
  }

  td:before {
    position: absolute;
    left: 10px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
    color: var(--primary-glow);
    content: attr(data-label); /* Uses HTML attribute for headers */
  }
}

/* Gauge Container */
.gauge-container {
  display: flex;
  flex-direction: column;
  margin: 10px 0;
  max-width: 200px; /* Keep it compact */
}

.gauge-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 4px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}

/* The Battery Shell */
.gauge-bar {
  height: 12px;
  background: #333;
  border-radius: 6px;
  border: 1px solid #444;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

/* The Fill */
.gauge-fill {
  height: 100%;
  /* Gradient from Low (Red-ish) to High (Gold) */
  background: linear-gradient(90deg, var(--accent-pink) 0%, var(--primary-glow) 100%);
  width: var(--fill); /* Controlled by inline style */
  transition: width 0.5s ease-in-out;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Optional: Pulse effect for low levels */
.low-level {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}



/* Compact Table Gauge Styles */
.table-gauge {
  width: 100%;
  max-width: 120px; /* Smaller for table layout */
  display: inline-block;
  vertical-align: middle;
}

.table-gauge .gauge-bar {
  height: 8px; /* Slimmer for rows */
  margin-top: 4px;
}

.table-gauge .gauge-label {
  font-size: 0.7rem;
  margin-bottom: 0;
}

/* Status colors for the text labels */
.status-critical { color: var(--accent-pink); font-weight: bold; }
.status-good { color: var(--primary-glow); }

/* Mobile adjustment: make gauges full width when table stacks */
@media screen and (max-width: 600px) {
  .table-gauge {
    max-width: 100%;
    margin-top: 5px;
  }
}


/* Restock Card Styling */
.restock-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.restock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.restock-header h3 {
  margin: 0;
  color: var(--primary-glow);
  font-size: 1.1rem;
}

/* Volume Shortcut Grid */
.volume-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 15px;
}

.btn-shortcut {
  background: #2a2a2a;
  color: var(--text-light);
  border: 1px solid #444;
  padding: 8px 0;
  border-radius: 6px;
  font-size: 0.8rem;
  width: 100%; /* Override default button width */
}

.btn-shortcut:active {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
}

/* Flex row for Manual Input + Add */
.input-group-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-group-row input {
  flex: 2;
  margin: 0; /* Remove default margins for alignment */
}

/* Enhanced Input Styles */
.input-drink-name {
  border: none;
  border-bottom: 2px solid var(--border-color);
  background: transparent !important;
  border-radius: 0 !important;
  font-size: 1.2rem !important;
  font-weight: bold;
  color: var(--primary-glow) !important;
  margin-bottom: 15px !important;
  padding: 5px 0 !important;
}

.input-drink-name:focus {
  outline: none;
  border-bottom-color: var(--accent-pink);
  box-shadow: 0 4px 10px -5px var(--accent-pink);
}

.label-mini {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #888;
  display: block;
  margin-bottom: 2px;
}

/* Container for the Options sections */
.options-grid {
  display: grid;
  grid-template-columns: 1fr; /* Default: 1 column (Mobile) */
  gap: 20px; /* Space between the two lists */
  margin-top: 20px;
}

/* Tablet and Desktop View */
@media (min-width: 768px) {
  .options-grid {
    grid-template-columns: 1fr 1fr; /* Split into 2 equal columns */
    align-items: start; /* Prevents one box from stretching to match the other's height */
  }
}

/* Optional: Make the individual sections look like cohesive cards */
.option-section {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}


/* Checkbox Group Container */
.option-section {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
}

.option-section h3 {
  margin: 0 0 15px 0;
  font-size: 1rem;
  color: var(--primary-glow);
  text-transform: uppercase;
  letter-spacing: 1px;
}



/* Accordion / Expandable Section Styling */
details {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* The clickable header */
summary {
  padding: 15px;
  font-weight: bold;
  color: var(--primary-glow);
  cursor: pointer;
  list-style: none; /* Removes default arrow */
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Rotate arrow when open */
/* details[open] summary::after {
  content: '－';
  transform: rotate(180deg);
} */

/* Glow effect when open */
details[open] {
  border-color: var(--primary-glow);
  box-shadow: 0 0 15px rgba(255, 171, 0, 0.1);
}

/* Padding for the content inside */
details > div {
  padding: 0 15px 15px 15px;
}





/* Aligning the remove button cell */
.cell-action {
  width: 40px;
  text-align: right;
  vertical-align: middle;
}

/* Ensure mobile stacking still looks good */
@media screen and (max-width: 600px) {
  .cell-action {
    display: flex !important;
    justify-content: flex-end;
    padding-top: 5px;
  }
}





/* Responsive Row Layout (Replaces Table Stacking) */
.stock-list {
  width: 100%;
}
/* The Inventory Row Container */
.stock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

/* The Label: Clicking Name or Box toggles the check */
.stock-row-label {
  display: flex;
  align-items: center;
  flex: 1; /* Takes all available space to the left */
  cursor: pointer;
  min-width: 0; /* Vital for text-truncation inside flex */
}

/* The Drink Name: Now truly part of the label */
.stock-name {
  font-size: 0.95rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

/* The Gauge and Delete: Kept OUTSIDE the label */
.stock-meta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0; /* Keeps them from squishing */
}
.btn-row-remove {
  background: transparent;
  font-size: 1.1rem;
  padding: 5px; /* Bigger hit area for the X */
  cursor: pointer;

  color: var(--accent-pink);
  border: 1px solid rgba(255, 64, 129, 0.3);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-row-remove:active {
  background: var(--accent-pink);
  color: white;
  box-shadow: 0 0 10px var(--accent-pink);
}
/* Gauge: Fixed width so it doesn't squish */
.stock-status {
  width: 80px;
  flex-shrink: 0;
}

/* Delete Button: Compact and fixed */
.stock-action {
  flex-shrink: 0;
}

/* Make the checkbox easier to hit even if they miss slightly */
.stock-checkbox-ui {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  margin-right: 12px;
  flex-shrink: 0;
  position: relative;
  /* Secret Sauce: This invisible margin expands the tap area without changing the look */
  outline: 10px solid transparent;
}

/* Small adjustments for very narrow phones (<360px) */
@media screen and (max-width: 360px) {
  .stock-row { gap: 8px; padding: 10px; }
  .stock-status { width: 60px; }
}



/* The Hint Box in the Options Section */
.hint-box {
  background: rgba(255, 171, 0, 0.05);
  border: 1px dashed var(--primary-glow);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.hint-icon {
  font-size: 1.5rem;
  color: var(--primary-glow);
  animation: hint-bounce 2s infinite;
}

.hint-text {
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--text-light);
  font-style: italic;
}

/* Upward pointing bounce */
@keyframes hint-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  60% { transform: translateY(-3px); }
}












/* Results Section Container */
#results {
  margin-top: 20px;
}

/* Container Reset */
.cocktail-result {
  border-bottom: 1px solid var(--border-color);
}

.cocktail-summary {
  display: flex !important;
  flex-direction: column;
  /* padding: 12px 0; */
  gap: 8px;
  list-style: none;
}

/* ROW 1: Title & Plus Sign */
.title-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.cocktail-title {
  color: var(--primary-glow);
  font-weight: bold;
  font-size: 1rem;
  text-transform: uppercase;
  margin: 0;
}

/* The Rotating Plus Sign */
.plus-icon {
  font-size: 1.2rem;
  color: #555;
  transition: transform 0.3s ease;
  line-height: 1;
}

details[open] .plus-icon {
  transform: rotate(45deg);
  color: var(--accent-pink);
}

/* ROW 2: The Data Row */
.data-line {
  display: flex;
  align-items: flex-start; /* Keeps things at the top if desc is long */
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

/* Description: Multi-line, flexible width */
.cocktail-desc {
  flex: 1;
  font-size: 0.85rem;
  color: #888;
  margin: 0;
  line-height: 1.3;
  /* Allows up to 3 lines on mobile */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Star: Fixed width, no squishing */
.summary-favorite {
  flex-shrink: 0;
  width: 24px;
  display: flex;
  justify-content: center;
}

/* GAUGE BLOCK: Ultra Compact & Fixed */
.gauge-sidebar {
  flex-shrink: 0;
  width: 60px; /* Fixed narrow width */
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compact-gauge {
  width: 100%;
}

.compact-gauge .gauge-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.55rem;
  color: #666;
  line-height: 1;
  margin-bottom: 2px;
}

.compact-gauge .gauge-bar {
  height: 3px; /* Forced thinness */
  background: #222;
  border-radius: 2px;
  width: 100%;
}




/* EXPANDED RECIPE CONTENT */
.recipe-content {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: 8px;
  margin: 0px 0px 8px 10px;
  border-left: 3px solid var(--accent-pink);
}

.recipe-content h3 {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: var(--accent-pink);
  text-transform: uppercase;
}

.ingredient-list {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  margin-bottom: 15px;
  color: var(--text-light);
}

.ingredient-list div {
  padding: 2px 0;
}

.step-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: #ccc;
}

.step-list li {
  margin-bottom: 6px;
  background: transparent;
  border: none;
  padding: 0;
}


/* Profile Header inside the Expanded Recipe */
.recipe-profile-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.full-desc {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.4;
  margin-bottom: 15px;
  margin-top: 0;
}

/* Horizontal Gauges for Expanded View */
.expanded-gauges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.expanded-gauge-item .gauge-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 4px;
  display: block;
}

.expanded-gauge-item .gauge-bar {
  height: 6px;
  background: #333;
  border-radius: 3px;
}





/* Favorite Star Styling */
.btn-favorite {
  background: transparent;
  border: none;
  color: #444; /* Dim by default */
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform 0.2s, color 0.2s;
  text-align: right;
  width: 30px;
}

.btn-favorite.active {
  color: var(--primary-glow);
  filter: drop-shadow(0 0 5px var(--primary-glow));
}

.btn-favorite:active {
  transform: scale(1.2);
}
/* Position the star in the summary */
.summary-favorite {
  flex-shrink: 0;
  margin-right: -5px; /* Pull it slightly closer to the text */
}

/* Adjusting the star size for the compact view */
.summary-favorite .btn-favorite {
  font-size: 1.2rem; /* Slightly smaller for the list view */
  color: #333; /* Darker when inactive for better contrast */
}

.summary-favorite .btn-favorite.active {
  color: var(--primary-glow);
  text-shadow: 0 0 8px rgba(255, 171, 0, 0.6);
}

/* Ensure the info text doesn't hit the star */
.cocktail-info {
  margin-right: 5px;
}


/* Make/Production Bar at bottom of recipe */
.production-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 8px;
  margin-top: 20px;
  border: 1px solid rgba(255, 171, 0, 0.2);
}

.counter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  /* background: var(--bg-dark); */
  border-radius: 20px;
  padding: 2px 5px;
}

.btn-counter {
  background: var(--surface);
  color: white;
  border: 1px solid var(--border-color);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1rem;
  padding: 0px;
}

.count-display {
  font-weight: bold;
  min-width: 20px;
  text-align: center;
  color: var(--primary-glow);
}

.btn-confirm-make,
.btn-add {
  background: var(--primary-glow);
  color: black;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.8rem;
  text-transform: uppercase;
  width: auto;
}


.btn-add {
  flex: 1;
  background: var(--primary-glow);
  color: #000;
  white-space: nowrap;
  width: 140px;
}


/* The Loading Animation */
@keyframes pour-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.btn-search.loading,
.btn-add.loading {
  position: relative;
  color: transparent !important; /* Hide the text "Make & Deduct" */
  pointer-events: none; /* Prevent double clicks */
  background: linear-gradient(
    90deg,
    var(--primary-glow) 0%,
    #fffce0 50%,
    var(--primary-glow) 100%
  );
  background-size: 200% 100%;
  animation: pour-shimmer 1.5s infinite linear;
  overflow: hidden;
}

/* Adding a "Pouring" icon during load */
.btn-confirm-make.loading::after {
  content: 'SHAKING...';
}
.btn-search.loading::after {
  content: 'Preparing...';
}
.btn-add.loading::after {
  content: 'Updating...';
}
.btn-search.loading::after,
.btn-confirm-make.loading::after {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  font-size: 0.7rem;
  letter-spacing: 2px;
  font-weight: 900;
  animation: pulse-text 0.8s infinite alternate;
}



@keyframes pulse-text {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* Success State (Optional flash when done) */
.btn-search.success,
.btn-confirm-make.success {
  background: #4caf50; /* Green */
  color: white;
}


/* Updated Disclaimer Container */
.deduction-disclaimer {
  position: relative; /* Needed for absolute positioning of the X */
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 171, 0, 0.15);
  border-radius: 8px;
  padding: 12px 35px 12px 12px; /* Extra right padding so text doesn't hit the X */
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.disclaimer-text {
  font-size: 0.75rem;
  color: #aaa;
  line-height: 1.4;
}

.btn-close-disclaimer {
  position: absolute;
  top: 8px;
  right: 8px;

  /* 1. Force the dimensions */
  width: 24px;
  height: 24px;

  /* 2. Prevent the "Rugby Ball" squish */
  flex-shrink: 0;
  flex-basis: 24px;

  /* 3. Ensure the X stays centered */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1; /* Prevents the X from being pushed down */

  /* Rest of your styling */
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #888;
  font-size: 12px;
  cursor: pointer;
}
.btn-close-disclaimer:hover,
.btn-close-disclaimer:active {
  background: var(--accent-pink);
  color: white;
  transform: scale(1.1);
}

/* Animation for hiding */
.disclaimer-hidden {
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  margin-bottom: -50px; /* Gently collapses the layout */
}













/* Container for the Title and the Pill */
.section-header-inline {
  display: flex;
  justify-content: space-between; /* Title left, Pill right */
  align-items: center;           /* Vertical alignment fix */
  padding: 15px 15px 5px 0px;
  margin-bottom: 10px;
}

.section-header-inline h2 {
  margin: 0; /* Remove default margins that create gaps */
  font-size: 1.4rem;
}
/* Update your CSS to handle specific icon colors if needed */
.header-icon-inventory { color: var(--primary-glow); }
.header-icon-action { color: var(--accent-pink); }

/* Minimal adjustment to the pill for this layout */
.bar-id-pill {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2px 4px 2px 10px;
  gap: 6px;
  white-space: nowrap;
  transform: scale(0.9); /* Slightly smaller to fit the H2 height better */
  transform-origin: right;
}


.bar-id-label {
  font-size: 0.6rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: bold;
}

.bar-id-value {
  font-size: 0.7rem;
  color: #aaa;
  font-family: monospace; /* Makes IDs easier to read */
}

/* The Sync Button inside the pill */
.btn-sync {
  background: rgba(255, 171, 0, 0.15); /* Subtle glow background */
  border: none;
  color: var(--primary-glow);
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sync:hover {
  background: var(--primary-glow);
  color: black;
}
/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

/* Modal Box */
.sync-modal {
  background: var(--bg-dark);
  border: 1px solid var(--primary-glow);
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 0 30px rgba(255, 171, 0, 0.2);
}

.sync-modal h2 {
  font-size: 1.2rem;
  color: var(--primary-glow);
  margin-bottom: 15px;
}

.sync-modal p {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* Big ID Input */
.sync-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #444;
  color: white;
  padding: 12px;
  border-radius: 6px;
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 4px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.sync-input:focus {
  outline: none;
  border-color: var(--primary-glow);
}

.btn-modal-primary {
  background: var(--primary-glow);
  color: black;
  border: none;
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px;
}

.btn-modal-close {
  background: transparent;
  color: #666;
  border: none;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
}



.suggestion-rail {
  display: none; /* Hidden until search is focused */
  flex-wrap: nowrap;
  overflow-x: auto; /* Allow horizontal swiping */
  padding: 8px 15px;
  gap: 8px;
  margin-bottom: 15px;
  -webkit-overflow-scrolling: touch; /* Smooth swipe on iOS */
}

/* Hide scrollbar for a cleaner look */
.suggestion-rail::-webkit-scrollbar {
  display: none;
}

.suggestion-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #bbb;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-chip:active {
  background: var(--primary-glow);
  color: black;
  border-color: var(--primary-glow);
}

/* Optional: Different style for "Recent" vs "Popular" */
.chip-recent {
  border-color: rgba(255, 171, 0, 0.3);
}
