.content {
  padding-left: 20px; /* Adjust this value as needed */
  margin-bottom: 10px; /* Adjust this value as needed */
}

.content.collapsed {
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

.toggle-arrow {
  margin-right: 8px;
  cursor: pointer;
}

.toggle-group {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.toggle-group h2 {
  margin: 0;
}

.toggle-arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.toggle-arrow.open {
  transform: rotate(90deg);
}

.content.collapsible {
  display: none;
}

.content.collapsible.open {
  display: block;
}

h2 {
  font-size: 1.5rem; /* Adjust this value as needed */
  margin: 0;
  padding-left: 10px; /* Adjust this value as needed */
}

div[data-controller="collapsible"] {
  margin-bottom: 0px;
}

.content.collapsed + .toggle-group {
  margin-bottom: 0px;
}

.content.collapsed .collapsible {
  margin-bottom: -10px; /* Adjust this value as needed */
}

input[type="text"],
textarea,
select,
.recommendation-form /* .recommend-to-input, */
.recommendation-form /* .item-input */ {
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
  padding: 0.5em;
  margin: 0 auto; /* Center align the input elements */
}

.submit-button {
  width: 100%;
  max-width: 300px;
  padding: 0.75rem 1.5rem;
  background-color: #3182ce;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: block;
  margin: 20px auto 0 auto; /* Add margin-top to create space */
}

.submit-button:hover {
  background-color: #2c5282;
}

@media (max-width: 600px) {
  h1.recommendations-title {
    font-size: 1.4rem; /* Larger, more readable */
    white-space: normal; /* Allow wrapping */
    overflow: visible;
    padding: 0 20px; /* More breathing room */
    margin-bottom: 2rem; /* More space below heading */
    margin-top: 1rem;
  }

  /* Fix alignment for nested content on mobile with better spacing */
  .content {
    padding-left: 20px; /* More comfortable indentation */
    padding-right: 20px; /* Add right padding for balance */
    margin-bottom: 16px; /* More space between sections */
  }

  /* Reduce padding for nested content sections but keep readable */
  .content .content {
    padding-left: 16px; /* Less indentation but still clear hierarchy */
    padding-right: 20px;
  }

  /* Ensure recommendation items have comfortable spacing on mobile */
  .recommendation {
    padding: 16px 0; /* More vertical padding */
    max-width: 100%;
    box-sizing: border-box;
    align-items: flex-start; /* Align items to start on mobile for better wrapping */
    flex-wrap: wrap; /* Allow wrapping on mobile */
    gap: 0.75rem; /* More comfortable gap between elements */
    margin-bottom: 12px; /* More space between recommendations */
    line-height: 1.6; /* Better line height for readability */
  }

  /* Ensure recommendation text wraps properly */
  .recommendation .item-link,
  .recommendation .user-link {
    word-break: break-word;
    margin-right: 0.25rem; /* Small spacing after links */
  }

  /* Fix toggle group alignment on mobile with better spacing */
  .toggle-group {
    padding: 16px 12px; /* More comfortable padding */
    margin: 12px 0; /* More space between toggle groups */
    min-height: 48px; /* Ensure adequate touch target */
  }

  /* Ensure h2 headings have proper spacing */
  .toggle-group h2 {
    padding-left: 0;
    font-size: 1.4rem; /* Larger for mobile readability */
    margin: 0;
    font-weight: 500; /* Slightly bolder */
  }

  /* Fix recommendations container padding for better mobile experience */
  .recommendations-container {
    padding: 0 16px; /* Comfortable side padding - container already has minimal padding */
    margin-bottom: 2rem; /* Space at bottom */
  }

  /* Add spacing between main sections */
  .recommendations-section {
    margin-bottom: 2.5rem; /* More space between Received and Given sections */
  }

  /* Better spacing for the "Make a New Recommendation" link */
  .recommendations-container + div {
    padding: 0 20px 2rem 20px;
    text-align: center;
  }
}

/* Center align the title and the link */
.page-header,
.page-footer {
  text-align: center;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 1.5rem;
}

.page-footer a {
  color: #3182ce;
  text-decoration: none;
  transition: color 0.2s;
}

.page-footer a:hover {
  color: #2c5282;
  text-decoration: underline;
}

.recommendations-container {
  display: block;  /* Changed from flex to block */
}

.recommendations-section {
  margin-bottom: 2rem;  /* Add some spacing between sections */
}

.recommendation-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 10px;
  padding: 15px;
  width: calc(33% - 20px); /* Adjust width for three cards per row */
  transition: transform 0.2s;
}

.recommendation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.recommendation-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #1a202c;
  margin-bottom: 10px;
}

.recommendation-details {
  font-size: 0.9rem;
  color: #4a5568;
  margin-bottom: 10px;
}

.recommendation-actions {
  display: flex;
  justify-content: space-between;
}

.recommendation-button {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.recommendation-button:hover {
  background-color: #2563eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .recommendation-card {
    width: calc(50% - 20px); /* Two cards per row on smaller screens */
  }
}

@media (max-width: 480px) {
  .recommendation-card {
    width: 100%; /* One card per row on mobile */
  }
}

.bond-strength {
  color: #666;
  font-size: 0.9em;
  margin-left: 0.5em;
}

.recommendation {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.recommendation form {
  margin: 0;
  display: inline;
}

.recommendation button {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: 0.25rem;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

.recommendation button:hover {
  background-color: #e5e7eb;
}

.forward-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.35rem;
  margin-left: 0.5rem;
  font-size: 1rem;
  line-height: 1;
  border-radius: 0.25rem;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

.forward-button:hover {
  background-color: #e5e7eb;
}

/* Form Container */
.recommendation-form {
  display: flex;
  flex-direction: column;
  gap: 0; /* Remove gap to eliminate any visual line */
  width: 100%;
  position: relative;
  z-index: 1;
  margin-top: 0; /* Remove any top margin that could create extra line */
  padding-top: 0; /* Remove any top padding */
  border: none !important;
  border-top: none !important;
}

/* Remove gap before first child - this might be causing the visible line */
.recommendation-form > *:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
  margin-bottom: 0 !important; /* Also remove bottom margin that might create space */
}

/* Add spacing between form fields except before the first one */
.recommendation-form > *:not(:first-child) {
  margin-top: 1rem;
}

/* Ensure form element itself has no border */
form.recommendation-form {
  border: none !important;
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ensure page-header doesn't create extra spacing */
.page-header + form.recommendation-form,
.page-header + * form.recommendation-form {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
}

/* Ensure page-header h1 doesn't have a border-bottom creating a line */
.page-header h1 {
  border-bottom: none !important;
  margin-bottom: 1.5rem; /* Keep spacing but no border */
  padding-bottom: 0 !important;
}

/* Ensure first form field doesn't have extra top margin */
.recommendation-form > .form-field:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Top-level form fields */
.recommendation-form > .form-field,
.new-item-section .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  border: none !important;
  border-top: none !important; /* Ensure no top border creates a line */
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  margin-top: 0 !important; /* Explicitly remove top margin */
}

/* Form field container */
.form-field {
  position: relative;
  border: none !important;
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Form fields with search results should have higher z-index */
.form-field:has(.search-results[style*="display: block"]) {
  z-index: 10003;
  position: relative;
}

/* Ensure the first form-field in recommendation-form has no top spacing */
.recommendation-form > .form-field:first-of-type {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
}

/* Search container */
[data-controller="item-search"] {
  position: relative !important;
  z-index: 1000 !important;  /* High z-index for the container */
  border: none !important;
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Search results container for generic user search (search controller) */
[data-controller="search"] [data-search-target="results"] {
  position: absolute !important;
  top: calc(100% + 5px) !important;  /* Position below input with small gap */
  left: 0 !important;
  width: 100% !important;
  background-color: white !important;
  border: 1px solid #ced4da !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12) !important;
  max-height: 240px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  z-index: 1001 !important;  /* Higher than container */
  margin: 0 !important;
  padding: 0 !important;
}

/* Search result items (generic user search) */
[data-controller="search"] [data-search-target="results"] .search-result {
  padding: 8px 12px !important;
  cursor: pointer !important;
  background-color: white !important;
  position: relative !important;
  z-index: 1002 !important;  /* Higher than results container */
  border-bottom: 1px solid #eef2f7 !important;
}

/* Hover state for generic user search results */
[data-controller="search"] [data-search-target="results"] .search-result:hover {
  background-color: #f1f5f9 !important;
}

/* Last row shouldn't show a divider line */
[data-controller="search"] [data-search-target="results"] .search-result:last-child {
  border-bottom: none !important;
}

/* “No users found” / empty-state should not look clickable */
[data-controller="search"] [data-search-target="results"] .search-result-empty {
  padding: 10px 12px !important;
  cursor: default !important;
  background-color: #f8fafc !important;
  color: #64748b !important;
  font-style: italic !important;
  border-bottom: none !important;
}

/* Input styling */
.form-field input[type="text"],
.form-field input[type="url"],
.form-field input[type="number"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-top: 1px solid #ced4da; /* Explicitly set top border to match sides */
  border-radius: 4px;
  font-size: 1rem;
  position: relative;
  z-index: 999;  /* Below search results */
  background-color: white;
  margin-top: 0 !important; /* Ensure no top margin creates extra space */
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Error Messages */
.error-messages {
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
}

.error-messages h2 {
  font-size: 1.1em;
  margin-top: 0;
}

/* Form Fields */
.form-field label {
  font-weight: 500;
  color: #333;
  border: none !important;
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Required field indicator */
.required-field {
  color: #dc3545;
  font-weight: bold;
  margin-left: 2px;
}

/* Field hints */
.field-hint {
  display: block;
  color: #666;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  font-style: italic;
}

/* Extra Fields Sections */
.extra-fields {
  margin-top: 1rem;
  width: 100%;
  border: none !important;
  background: none !important;
  padding: 0 !important;
}

.extra-fields h4 {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Platform Links Section */
.platform-links-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

/* Reset all search-related elements */
[data-controller="item-search"],
[data-controller="search"] {
  position: relative;
}

/* Item search controller should have higher z-index when results are visible */
[data-controller="item-search"]:has(.search-results[style*="display: block"]) {
  z-index: 10003;
  position: relative;
}

/* Generic search controller (for user search) */
[data-controller="search"] {
  z-index: 100;  /* Higher than surrounding content */
}

/* ISBN Status */
.isbn-field {
  position: relative;
}

.isbn-status {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
}

/* Submit Button */
.submit-button {
  background-color: #0d6efd;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

.submit-button:hover {
  background-color: #0b5ed7;
}

.submit-button:focus {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Forward Button */
.forward-button {
  background: none;
  border: none;
  color: #0d6efd;
  cursor: pointer;
  padding: 2px 8px;
  font-size: 1.2rem;
  border-radius: 4px;
}

.forward-button:hover {
  background-color: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
  .recommendation-form {
    padding: 15px;
  }
  
  .form-field {
    margin-bottom: 1rem;
  }
  
  .extra-fields {
    padding: 10px;
  }
}

/* Toggle Groups */
.toggle-group {
  cursor: pointer;
  padding: 8px;
  margin: 4px 0;
  display: flex;
  align-items: center;
}

.toggle-arrow {
  margin-right: 8px;
  cursor: pointer;
}

.content.collapsible {
  display: none;
}

.content.collapsible.open {
  display: block;
}

/* User Links */
.user-link {
  color: #0d6efd;
  text-decoration: none;
}

.user-link:hover {
  text-decoration: underline;
}

/* Bond Strength Debug Info */
.bond-strength {
  color: #6c757d;
  margin-left: 8px;
}

.new-item-section {
  width: 100%;
  margin: 1rem 0;
  margin-bottom: 2rem;
  border: none !important;
  background: none !important;
}

/* Add spacing after new-item-section before user search field */
.new-item-section {
  margin-bottom: 2rem !important;
}

/* Add spacing between item-search section and user search section */
[data-controller="item-search"] {
  margin-bottom: 2rem;
}

[data-controller="search"] {
  margin-top: 1.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
}

/* Create Item and Update Item buttons */
.create-item-button,
.update-item-button {
  padding: 0.75rem 1.5rem;
  background-color: #3182ce;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.create-item-button:hover,
.update-item-button:hover {
  background-color: #2c5282;
}

.create-item-button:disabled,
.update-item-button:disabled {
  background-color: #cbd5e0;
  cursor: not-allowed;
}

/* Field error highlighting */
.field-error-highlight {
  border: 2px solid #dc3545 !important;
}

.field-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 4px;
}

/* Override any type-specific field styles from items.css */
.book-fields,
.album-fields,
.location-fields,
.amazon-url-field {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  border-radius: 0 !important;
}

/* Reset generic search-related elements; item-search uses search.css (from 83) */
[data-controller="search"],
[data-controller="search"] [data-search-target="results"] {
  border: none !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Additional reset for any potential border-related properties.
   From 84: do NOT add global `* { box-shadow: none }` here – it flattens
   overlays (e.g. external search "Help me find this" dropdown). */
/* Reset for generic search-specific elements (user search only) */
[data-controller="search"] .search-enabled,
[data-controller="search"] .search-results,
[data-controller="search"] .search-container {
  border: none !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}
h1.recommendations-title {
  font-weight: 400;  /* Normal weight instead of bold */
  color: #666;       /* Softer gray color */
  margin-bottom: 2rem;
}

.item-link {
  color: #2c5282;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.item-link:hover {
  color: #1a365d;
  text-decoration: underline;
}

/* Timestamp tooltip */
.timestamp-tooltip {
  position: relative;
  display: inline-block;
  margin-left: 4px;
}

.timestamp-icon {
  font-size: 0.85em;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.timestamp-tooltip:hover .timestamp-icon,
.timestamp-tooltip:focus-within .timestamp-icon {
  opacity: 1;
}

.timestamp-tooltip-text {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  background-color: #2d3748; /* dark slate */
  color: #f7fafc;            /* near-white */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.timestamp-tooltip:hover .timestamp-tooltip-text,
.timestamp-tooltip:focus-within .timestamp-tooltip-text {
  opacity: 1;
  visibility: visible;
}

@media (prefers-color-scheme: dark) {
  .timestamp-tooltip-text {
    background-color: #f7fafc;
    color: #1a202c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  }
}

/* Bond tooltip (development only) */
.bond-tooltip {
  position: relative;
  display: inline-block;
}

.bond-tooltip-text {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  background-color: #2d3748; /* dark slate */
  color: #f7fafc;            /* near-white */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.bond-tooltip:hover .bond-tooltip-text,
.bond-tooltip:focus-within .bond-tooltip-text {
  opacity: 1;
  visibility: visible;
}

@media (prefers-color-scheme: dark) {
  .bond-tooltip-text {
    background-color: #f7fafc;
    color: #1a202c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  }
}

@media (max-width: 600px) {
  .timestamp-tooltip {
    margin-left: 2px;
  }
  
  .timestamp-icon {
    font-size: 0.75em;
  }
  
  .timestamp-tooltip-text {
    font-size: 0.7rem;
    padding: 3px 6px;
  }
}

/* Similar recipes warning */
.similar-items-warning {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 1rem;
}

.similar-items-header {
  color: #856404;
  font-weight: 600;
  margin-bottom: 8px;
}

.similar-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.similar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.similar-item a {
  font-weight: 600;
  color: #856404;
  text-decoration: none;
}

.similar-item a:hover {
  text-decoration: underline;
}

.similar-item .btn {
  align-self: flex-start;
  margin-top: 4px;
}

/* -------------------------------------------------------------------------- */
/* Recommendations index: inbox layout                                        */
/* -------------------------------------------------------------------------- */

body.recommendations-index .recommendations-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

body.recommendations-index .recommendations-header-text {
  min-width: 0;
}

body.recommendations-index h1.recommendations-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: #1a202c;
}

body.recommendations-index .recommendations-subtitle {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.95rem;
}

body.recommendations-index .recommendations-header-actions {
  flex: 0 0 auto;
}

body.recommendations-index a.recommendations-cta {
  text-decoration: none;
  white-space: nowrap;
}

body.recommendations-index .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.5rem 0 0.5rem;
}

body.recommendations-index .section-title {
  margin: 0;
}

body.recommendations-index .section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #edf2f7;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.85rem;
}

body.recommendations-index .category-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  margin: 0.5rem 0 1rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

body.recommendations-index .category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1f2937;
  text-decoration: none;
  font-size: 0.95rem;
  scroll-snap-align: start;
}

body.recommendations-index .category-chip:hover {
  background: #f8fafc;
  text-decoration: none;
}

body.recommendations-index .category-chip.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

body.recommendations-index .category-chip.is-active .chip-count {
  background: #dbeafe;
}

body.recommendations-index .chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 600;
}

body.recommendations-index .recommendations-inbox {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.recommendations-index .inbox-section {
  scroll-margin-top: 90px;
}

body.recommendations-index .inbox-section[hidden] {
  display: none !important;
}

body.recommendations-index .inbox-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

body.recommendations-index .inbox-section-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
  color: #0f172a;
}

body.recommendations-index .inbox-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.85rem;
}

body.recommendations-index .inbox-list {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

body.recommendations-index .recommendation.inbox-row {
  margin: 0;
  padding: 0.8rem 0.9rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid #eef2f7;
}

body.recommendations-index .recommendation.inbox-row:last-child {
  border-bottom: none;
}

body.recommendations-index .inbox-row-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

body.recommendations-index .inbox-row-actions {
  flex: 0 0 auto;
}

body.recommendations-index .inbox-row-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.92rem;
}

body.recommendations-index .meta-label {
  color: #94a3b8;
}

body.recommendations-index .empty-state {
  border: 1px dashed #cbd5e0;
  border-radius: 12px;
  background: #ffffff;
  padding: 1.25rem;
  text-align: center;
}

body.recommendations-index .empty-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

body.recommendations-index .empty-subtitle {
  color: #64748b;
  margin-bottom: 1rem;
}

body.recommendations-index .given-details {
  margin-top: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

body.recommendations-index .given-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  user-select: none;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

body.recommendations-index .given-summary::-webkit-details-marker {
  display: none;
}

body.recommendations-index .given-summary-title {
  font-weight: 650;
  color: #0f172a;
}

body.recommendations-index .given-summary-count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: #edf2f7;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.85rem;
}

body.recommendations-index .given-summary-hint {
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Show "Tap to open" when details is closed, hide "Tap to close" */
body.recommendations-index .given-details:not([open]) .given-summary-hint-open {
  display: inline;
}

body.recommendations-index .given-details:not([open]) .given-summary-hint-close {
  display: none;
}

/* Show "Tap to close" when details is open, hide "Tap to open" */
body.recommendations-index .given-details[open] .given-summary-hint-open {
  display: none;
}

body.recommendations-index .given-details[open] .given-summary-hint-close {
  display: inline;
}

body.recommendations-index .given-body {
  padding: 0.9rem;
}

@media (max-width: 600px) {
  body.recommendations-index .recommendations-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  body.recommendations-index .recommendations-header-actions a.recommendations-cta {
    width: 100%;
    text-align: center;
    display: block;
  }

  body.recommendations-index .category-chip {
    font-size: 0.9rem;
  }
}