/* ==========================================================================
   The Salted Pepper — Custom Overrides
   Breadcrumbs + Left Sidebar + Floating Help Widget
   ========================================================================== */


/* --------------------------------------------------------------------------
   BREADCRUMBS
   -------------------------------------------------------------------------- */

.tsp-breadcrumbs {
  width: 100%;
  padding: 10px 0;
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.tsp-breadcrumbs__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.tsp-breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tsp-breadcrumbs__item {
  display: flex;
  align-items: center;
}

.tsp-breadcrumbs__separator {
  margin: 0 8px;
  font-size: 14px;
  opacity: 0.6;
  user-select: none;
}

.tsp-breadcrumbs__link {
  text-decoration: none;
  transition: color 0.2s ease;
}

.tsp-breadcrumbs__link:hover {
  text-decoration: underline;
}

.tsp-breadcrumbs__text--current {
  font-weight: 600;
}

@media (max-width: 767px) {
  .tsp-breadcrumbs {
    font-size: 12px;
    padding: 8px 0;
  }
  .tsp-breadcrumbs__container {
    padding: 0 15px;
  }
  .tsp-breadcrumbs__separator {
    margin: 0 5px;
  }
}


/* --------------------------------------------------------------------------
   LEFT SIDEBAR
   -------------------------------------------------------------------------- */

.tsp-sidebar {
  position: fixed;
  z-index: 9980;
  top: 50%;
  transform: translateY(-50%);
  left: calc((100vw - 1200px) / 2 - 260px);
  width: 230px;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  font-family: 'Lora', Georgia, serif;
}

/* Sticky behavior: re-anchors on scroll */
.tsp-sidebar__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual block cards */
.tsp-sidebar__block {
  padding: 16px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Empty state in editor */
.tsp-sidebar__empty-state {
  border: 2px dashed #ccc;
  background: #fafafa;
}

.tsp-sidebar__placeholder-text {
  font-size: 12px;
  color: #999;
  text-align: center;
  line-height: 1.4;
  margin: 0;
}


/* --- Recipe Pairings Block --- */

.tsp-pairings__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.tsp-pairings__subtitle {
  font-size: 12px;
  color: #728194;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.tsp-pairings__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tsp-pairings__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0ede8;
}

.tsp-pairings__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tsp-pairings__item:first-child {
  padding-top: 0;
}

.tsp-pairings__thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
}

.tsp-pairings__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tsp-pairings__thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.tsp-pairings__info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.tsp-pairings__item-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  line-height: 1;
}

.tsp-pairings__item-name {
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

a.tsp-pairings__item-name:hover {
  text-decoration: underline;
}


/* --- Custom Code Block --- */

.tsp-sidebar-code__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #161E2A;
}


/* --- Text Block --- */

.tsp-sidebar-text {
  font-size: 13px;
  line-height: 1.5;
  color: #4A4A4A;
}

.tsp-sidebar-text h1,
.tsp-sidebar-text h2,
.tsp-sidebar-text h3,
.tsp-sidebar-text h4,
.tsp-sidebar-text h5,
.tsp-sidebar-text h6 {
  font-family: 'Playfair Display', Georgia, serif;
  margin-top: 0;
}

.tsp-sidebar-text p:first-child {
  margin-top: 0;
}

.tsp-sidebar-text p:last-child {
  margin-bottom: 0;
}


/* --- Image Block --- */

.tsp-sidebar-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.tsp-sidebar-image__caption {
  font-size: 11px;
  color: #728194;
  margin: 6px 0 0;
  line-height: 1.3;
  text-align: center;
}


/* --- CTA Block --- */

.tsp-sidebar-cta__heading {
  font-size: 13px;
  font-weight: 600;
  color: #161E2A;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.tsp-sidebar-cta__btn {
  display: inline-block;
  padding: 10px 20px;
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s ease, transform 0.1s ease;
  border: none;
  cursor: pointer;
  line-height: 1.3;
}

.tsp-sidebar-cta__btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.tsp-sidebar-cta__subtext {
  font-size: 11px;
  color: #728194;
  margin: 8px 0 0;
  line-height: 1.3;
}


/* --- Sidebar Scrollbar Styling --- */

.tsp-sidebar::-webkit-scrollbar {
  width: 4px;
}

.tsp-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.tsp-sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(114, 129, 148, 0.3);
  border-radius: 4px;
}


/* --- Sidebar Responsive --- */

/* Extra-wide screens */
@media (min-width: 1700px) {
  .tsp-sidebar {
    left: calc((100vw - 1200px) / 2 - 270px);
    width: 240px;
  }
}

/* Large screens: snug to the left of content */
@media (max-width: 1699px) and (min-width: 1500px) {
  .tsp-sidebar {
    left: calc((100vw - 1200px) / 2 - 255px);
    width: 225px;
  }
}

/* When the sidebar would overlap the content area */
@media (max-width: 1499px) and (min-width: 1300px) {
  .tsp-sidebar {
    left: 12px;
    width: 200px;
  }
}

/* Tablet: collapse to a narrower sidebar */
@media (max-width: 1299px) and (min-width: 1024px) {
  .tsp-sidebar {
    left: 8px;
    width: 180px;
  }
  .tsp-pairings__thumb {
    width: 40px;
    height: 40px;
  }
  .tsp-pairings__title {
    font-size: 14px;
  }
  .tsp-pairings__item-name {
    font-size: 12px;
  }
}

/* Below 1024px: hide sidebar (too narrow to coexist with content) */
@media (max-width: 1023px) {
  .tsp-sidebar {
    display: none !important;
  }
}

/* Mobile hide class (from section settings) */
.tsp-sidebar--hide-mobile {
  /* Already hidden via the 1023px breakpoint above,
     but this class allows toggling via the editor */
}

@media (max-width: 767px) {
  .tsp-sidebar--hide-mobile {
    display: none !important;
  }
}


/* --------------------------------------------------------------------------
   FLOATING HELP WIDGET (Right Side)
   -------------------------------------------------------------------------- */

.tsp-floating-widget {
  position: fixed;
  z-index: 9990;
  top: 50%;
  transform: translateY(-50%);
  right: calc((100vw - 1200px) / 2 - 80px);
  width: auto;
  max-width: 60px;
  pointer-events: auto;
}

.tsp-floating-widget__inner {
  position: relative;
}

.tsp-floating-widget__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 60px;
  padding: 12px 8px;
  background-color: #728194;
  color: #ffffff;
  border-radius: 8px;
  font-family: 'Lora', Georgia, serif;
  font-size: 10px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.tsp-floating-widget__placeholder svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
}

.tsp-floating-widget__placeholder small {
  font-size: 8px;
  opacity: 0.75;
  line-height: 1.2;
}

@media (min-width: 1441px) {
  .tsp-floating-widget {
    right: calc((100vw - 1200px) / 2 - 90px);
  }
}

@media (max-width: 1440px) and (min-width: 1301px) {
  .tsp-floating-widget {
    right: 20px;
  }
}

@media (max-width: 1300px) and (min-width: 768px) {
  .tsp-floating-widget {
    right: 12px;
    max-width: 50px;
  }
}

@media (max-width: 767px) {
  .tsp-floating-widget {
    top: auto;
    bottom: 20px;
    right: 16px;
    transform: none;
    max-width: 56px;
  }
}
