/* ================================================================
   The Salted Pepper – Custom Styles
   Brand Colors: Orange #DF7500 | Slate Blue #728194
   Fonts: Playfair Display (headings) | Lora (body)
   ================================================================ */


/* ================================================================
   1. BREADCRUMB NAVIGATION (Pill Tag Style)
   ================================================================ */

.tsp-breadcrumbs {
  padding: 12px 0;
  background: #ffffff;
  border-bottom: 1px solid #eee;
  font-family: 'Lora', Georgia, serif;
}

.tsp-breadcrumbs__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tsp-crumb {
  background: #eef0f3;
  color: #728194;
  padding: 5px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
  transition: all 0.2s ease;
  display: inline-block;
}

a.tsp-crumb:hover {
  background: #dce0e6;
  color: #556270;
  text-decoration: none;
}

.tsp-crumb--current {
  background: #728194;
  color: #ffffff;
}

.tsp-crumb-arrow {
  color: #bbb;
  font-size: 11px;
  line-height: 1;
}

@media (max-width: 767px) {
  .tsp-breadcrumbs__inner {
    padding: 0 16px;
  }
  .tsp-crumb {
    font-size: 11px;
    padding: 4px 10px;
  }
}


/* ================================================================
   2. PAGE LAYOUT (Sidebar + Main Content)
   ================================================================ */

.tsp-page-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 200px);
  position: relative;
}

.tsp-main-content {
  flex: 1;
  min-width: 0;
}

/* When no sidebar pairings data exists, go full width */
.tsp-page-layout.tsp-no-sidebar {
  display: block;
}

.tsp-page-layout.tsp-no-sidebar .tsp-main-content {
  width: 100%;
}

/* Tablet portrait and mobile: sidebar collapses */
@media (max-width: 1023px) {
  .tsp-page-layout {
    display: block;
  }
}


/* ================================================================
   3. LEFT SIDEBAR – Recipe Pairings (Desktop)
   ================================================================ */

.tsp-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow-y: auto;
  position: sticky;
  top: 24px;
  align-self: flex-start;
  z-index: 50;
  margin: 24px 0 24px 20px;
}

.tsp-sidebar__header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
}

.tsp-sidebar__title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tsp-sidebar__title-icon {
  font-size: 18px;
}

/* Close button only shows on mobile */
.tsp-sidebar__close {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.tsp-sidebar__close:hover {
  color: #333;
}

.tsp-sidebar__content {
  padding: 14px 18px;
}

/* Custom code sections inside sidebar */
.tsp-sidebar__custom {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

/* Pairing cards */
.tsp-pairing-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: #333;
  transition: color 0.15s ease;
}

.tsp-pairing-card:last-child {
  border-bottom: none;
}

a.tsp-pairing-card:hover {
  color: #728194;
  text-decoration: none;
}

.tsp-pairing-card__img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #eee;
}

.tsp-pairing-card__emoji {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.tsp-pairing-card__arrow {
  color: #ccc;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-left: auto;
}

.tsp-sidebar__empty {
  padding: 20px 0;
  text-align: center;
  color: #999;
  font-size: 13px;
  font-family: 'Lora', Georgia, serif;
}

.tsp-pairing-card__info {
  min-width: 0;
}

.tsp-pairing-card__name {
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.tsp-pairing-card__type {
  font-family: 'Lora', Georgia, serif;
  font-size: 10px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

/* Mobile pairings toggle button (plate icon) */
.tsp-pairings-toggle {
  display: none;
  position: fixed;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  z-index: 100;
  background: #728194;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(114,129,148,0.35);
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tsp-pairings-toggle:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 16px rgba(114,129,148,0.45);
}

.tsp-pairings-toggle__label {
  font-family: 'Lora', Georgia, serif;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Mobile overlay backdrop */
.tsp-pairings-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 140;
}

.tsp-pairings-overlay--active {
  display: block;
}

/* Prevent body scroll when sidebar open on mobile */
body.tsp-sidebar-open {
  overflow: hidden;
}

/* Tablet/Mobile: sidebar becomes slide-out drawer from left */
@media (max-width: 1023px) {
  .tsp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 300px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 150;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    box-shadow: 4px 0 20px rgba(0,0,0,0.08);
  }

  .tsp-sidebar--open {
    transform: translateX(0);
  }

  .tsp-sidebar__close {
    display: block;
  }

  .tsp-pairings-toggle {
    display: flex;
  }
}

@media (max-width: 480px) {
  .tsp-sidebar {
    width: 85vw;
    max-width: 320px;
  }

  .tsp-pairings-toggle {
    left: 8px;
    padding: 8px;
  }

  .tsp-pairings-toggle__label {
    font-size: 7px;
  }
}


/* ================================================================
   4. HELP WIDGET (Sticky, Right Side, Content-Anchored)
   ================================================================ */

.tsp-help-anchor {
  position: fixed;
  z-index: 100;
  right: max(16px, calc((100vw - 1200px) / 2 - 60px));
  top: 50%;
  transform: translateY(-50%);
}

.tsp-help-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: #728194;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(114,129,148,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tsp-help-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(114,129,148,0.45);
}

.tsp-help-btn--active {
  background: #5f6e7f;
}

.tsp-help-btn__icon {
  display: block;
}

.tsp-help-btn__text {
  font-family: 'Lora', Georgia, serif;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Help panel */
.tsp-help-panel {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) scale(0.95);
  width: 240px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border: 1px solid #eee;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.tsp-help-panel--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

.tsp-help-panel__header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tsp-help-panel__title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: #2c2c2c;
  margin: 0;
}

.tsp-help-panel__close {
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.tsp-help-panel__close:hover {
  color: #333;
}

.tsp-help-panel__body {
  padding: 12px 16px 16px;
}

.tsp-help-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  text-decoration: none;
  color: #555;
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  border-bottom: 1px solid #f5f5f5;
  transition: color 0.15s ease;
}

.tsp-help-link:last-of-type {
  border-bottom: none;
}

.tsp-help-link:hover {
  color: #728194;
  text-decoration: none;
}

.tsp-help-link__icon {
  font-size: 16px;
  flex-shrink: 0;
}

.tsp-help-divider {
  height: 1px;
  background: #eee;
  margin: 10px 0;
}

.tsp-help-cta {
  display: block;
  width: 100%;
  padding: 10px;
  background: #728194;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease;
}

.tsp-help-cta:hover {
  background: #5f6e7f;
  color: #fff;
  text-decoration: none;
}

@media (max-width: 1023px) {
  .tsp-help-anchor {
    right: 12px;
    top: 45%;
  }

  .tsp-help-panel {
    width: 220px;
    right: calc(100% + 8px);
  }
}

@media (max-width: 480px) {
  .tsp-help-anchor {
    right: 8px;
  }

  .tsp-help-btn {
    padding: 8px 10px;
  }

  .tsp-help-btn__icon svg {
    width: 18px;
    height: 18px;
  }

  .tsp-help-panel {
    width: 200px;
    right: calc(100% + 6px);
  }

  .tsp-help-link {
    font-size: 12px;
    padding: 8px 0;
  }
}


/* ================================================================
   5. SEARCH OVERLAY (Header Magnifying Glass)
   ================================================================ */

.tsp-header-search {
  display: flex;
  align-items: center;
  margin-left: 8px;
}

.tsp-header-search__btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tsp-header-search__btn:hover {
  opacity: 1;
}

.tsp-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 10000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.tsp-search-overlay--open {
  transform: translateY(0);
}

.tsp-search-overlay__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 30px;
  position: relative;
}

.tsp-search-overlay__input {
  width: 100%;
  padding: 14px 50px 14px 20px;
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  color: #333;
  background: #f8f8f8;
  border: 2px solid #eef0f3;
  border-radius: 30px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tsp-search-overlay__input:focus {
  border-color: #728194;
  background: #fff;
}

.tsp-search-overlay__input::placeholder {
  color: #aaa;
}

.tsp-search-overlay__close {
  position: absolute;
  right: 46px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.tsp-search-overlay__close:hover {
  color: #333;
}

.tsp-search-overlay__results {
  display: none;
  margin-top: 8px;
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.tsp-search-overlay__results.active {
  display: block;
}

.tsp-search-overlay__result {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: #333;
  font-family: 'Lora', Georgia, serif;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s ease;
}

.tsp-search-overlay__result:hover {
  background: #f8f9fa;
  text-decoration: none;
  color: #333;
}

.tsp-search-overlay__result:last-child {
  border-bottom: none;
}

.tsp-search-overlay__result-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.tsp-search-overlay__result-cat {
  font-size: 11px;
  color: #728194;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.tsp-search-overlay__no-results {
  padding: 16px 20px;
  text-align: center;
  color: #999;
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
}

@media (max-width: 767px) {
  .tsp-search-overlay__inner {
    padding: 14px 16px;
  }

  .tsp-search-overlay__input {
    font-size: 14px;
    padding: 12px 44px 12px 16px;
  }

  .tsp-search-overlay__close {
    right: 28px;
  }

  .tsp-search-overlay__result {
    padding: 10px 16px;
  }

  .tsp-search-overlay__result-title {
    font-size: 13px;
  }
}


/* ================================================================
   6. CATEGORY NAVIGATION (for hub/category pages via Custom Code)
   ================================================================ */

.tsp-categories {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 30px;
}

.tsp-categories__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tsp-category-tag {
  display: inline-block;
  padding: 6px 16px;
  background: #f8f8f8;
  color: #555;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  text-decoration: none;
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  font-weight: 400;
  transition: all 0.2s ease;
}

.tsp-category-tag:hover {
  background: #eef0f3;
  color: #728194;
  border-color: #728194;
  text-decoration: none;
}

.tsp-category-tag.active {
  background: #728194;
  color: #ffffff;
  border-color: #728194;
}

.tsp-categories__title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: #2c2c2c;
  text-align: center;
  margin-bottom: 14px;
}

.tsp-category-group {
  margin-bottom: 12px;
}

.tsp-category-group__title {
  font-family: 'Lora', Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  color: #728194;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eef0f3;
}

@media (max-width: 767px) {
  .tsp-categories {
    padding: 12px 16px;
  }
  .tsp-category-tag {
    font-size: 12px;
    padding: 5px 12px;
  }
  .tsp-categories__grid {
    gap: 6px;
  }
}


/* ================================================================
   7. RECIPE CARD GRID (for category/hub pages)
   ================================================================ */

.tsp-recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 30px;
}

.tsp-recipe-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: #333;
  display: block;
}

.tsp-recipe-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: #333;
}

.tsp-recipe-card__image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.tsp-recipe-card__body {
  padding: 16px;
}

.tsp-recipe-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: #2c2c2c;
  margin-bottom: 6px;
  line-height: 1.3;
}

.tsp-recipe-card__meta {
  font-family: 'Lora', Georgia, serif;
  font-size: 12px;
  color: #999;
}

.tsp-recipe-card__category {
  display: inline-block;
  font-family: 'Lora', Georgia, serif;
  font-size: 11px;
  color: #728194;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

@media (max-width: 767px) {
  .tsp-recipe-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .tsp-recipe-card__image {
    height: 140px;
  }
  .tsp-recipe-card__body {
    padding: 12px;
  }
  .tsp-recipe-card__title {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .tsp-recipe-grid {
    grid-template-columns: 1fr;
  }
}