
/* /recepti/ + /recipes/ — apron / kecelja look */

:root {
  --apron: #c9b7a4;
  --apron-deep: #b39d87;
  --apron-light: #e4d7c8;
  --piping: #fffdf8;
  --ink: #3d2818;
  --ink-soft: #5c5046;
  --brown: #5a3d28;
  --yellow: #5a3d28;
  --yellow-deep: #3d2818;
  --blue: #5a3d28; /* alias brown */
  --blue-deep: #3d2818;
  --navy: #3d2818;
  --shadow: rgba(42, 34, 28, 0.18);
  --line: rgba(42, 34, 28, 0.12);
  --panel: rgba(255, 253, 248, 0.72);
  --font-display: "Montserrat", sans-serif;
  --font-body: "Montserrat", sans-serif;
}

* { box-sizing: border-box; }

body.rx-page {
  /* surface from apron.css */
}

.rx-wrap {
  padding: 2rem;
}

.rx-empty,
.rx-empty-filter {
  color: var(--ink-soft);
  padding: 0.75rem 0.25rem;
  font-weight: 700;
}

.rx-search-hero {
  padding: 1rem clamp(1rem, 3vw, 2rem) 0.85rem;
  border-bottom: 3px solid var(--brown);
  background: rgba(255, 253, 248, 0.35);
}

.rx-search-panel {
  position: relative;
  max-width: 720px;
}

.rx-search-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
}

.rx-search-row {
  position: relative;
  display: flex;
  align-items: center;
}

.rx-search {
  width: 100%;
  border: 3px solid var(--brown, #5a3d28);
  background: rgba(255, 253, 248, 0.88);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.85rem 2.6rem 0.85rem 1.05rem;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 8px 22px var(--shadow);
  transition: box-shadow 0.15s ease;
}

.rx-search::placeholder {
  color: rgba(92, 80, 70, 0.55);
}

.rx-search:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(90, 61, 40, 0.28),
    0 10px 24px var(--shadow);
}

.rx-search-clear {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(42, 34, 28, 0.08);
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
}

.rx-search-clear:hover {
  background: rgba(90, 61, 40, 0.18);
}

.rx-search-meta {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.rx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.2s ease, margin 0.2s ease;
  margin-top: 0;
}

.rx-chips.is-in {
  max-height: 120px;
  opacity: 1;
  margin-top: 0.7rem;
}

.rx-chips[hidden] {
  display: none !important;
}

.rx-chip {
  border: 2px solid var(--piping);
  background: rgba(255, 253, 248, 0.75);
  color: var(--navy);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.rx-chip:hover {
  background: rgba(90, 61, 40, 0.12);
  transform: translateY(-1px);
}

.rx-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  border-radius: 18px;
  border: 3px solid var(--brown, #5a3d28);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 18px 48px var(--shadow);
  overflow: hidden;
  transform-origin: top center;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.rx-suggest.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.rx-suggest[hidden] {
  display: none !important;
}

.rx-suggest-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  max-height: min(420px, 55vh);
  overflow: auto;
}

.rx-suggest-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  animation: rxPopIn 0.22s ease both;
}

.rx-suggest-item:nth-child(1) { animation-delay: 0.01s; }
.rx-suggest-item:nth-child(2) { animation-delay: 0.03s; }
.rx-suggest-item:nth-child(3) { animation-delay: 0.05s; }
.rx-suggest-item:nth-child(4) { animation-delay: 0.07s; }
.rx-suggest-item:nth-child(5) { animation-delay: 0.09s; }
.rx-suggest-item:nth-child(6) { animation-delay: 0.11s; }
.rx-suggest-item:nth-child(7) { animation-delay: 0.13s; }
.rx-suggest-item:nth-child(8) { animation-delay: 0.15s; }

@keyframes rxPopIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.rx-suggest-item:hover,
.rx-suggest-item.is-active {
  background: rgba(240, 204, 46, 0.22);
  border-color: rgba(90, 61, 40, 0.2);
}

.rx-suggest-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
  color: var(--navy);
}

.rx-suggest-meta {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
}

.rx-suggest-meta em {
  font-style: normal;
  color: var(--blue-deep);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rx-suggest-empty,
.rx-suggest-more {
  padding: 0.85rem 1rem;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
}

.rx-suggest-more {
  text-align: center;
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
  margin-top: 0.15rem;
  list-style: none;
}

.rx-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 0;
  min-height: calc(100vh - 11rem);
}

.rx-sidebar {
  border-right: 3px solid var(--brown);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 11rem);
  background: rgba(255, 253, 248, 0.4);
}

.rx-sidebar-head {
  padding: 0.75rem 0.9rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-deep);
  font-family: var(--font-display);
}

.rx-list {
  overflow: auto;
  padding: 0.35rem 0.75rem 1rem;
  flex: 1;
}

.rx-list-item {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.35rem;
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  background: rgba(255, 253, 248, 0.45);
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.rx-list-item strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
  color: var(--navy);
}

.rx-list-item span {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.rx-list-item:hover {
  background: rgba(240, 204, 46, 0.18);
  border-color: rgba(255, 253, 248, 0.9);
}

.rx-list-item.is-active {
  background: rgba(90, 61, 40, 0.14);
  border-color: var(--piping);
  box-shadow: 0 6px 16px var(--shadow);
}

.rx-detail {
  padding: clamp(1.4rem, 3.5vw, 2.6rem);
  max-width: 760px;
  overflow: auto;
  max-height: calc(100vh - 11rem);
}

.rx-detail-inner {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  padding: 1.25rem 1.35rem;
  background: rgba(255, 253, 248, 0.78);
  border: 3px solid var(--brown, #5a3d28);
  border-radius: 24px;
  box-shadow: 0 14px 36px var(--shadow);
}

.rx-detail-inner.is-in {
  opacity: 1;
  transform: translateY(0);
}

.rx-ep {
  margin: 0 0 0.35rem;
  color: var(--blue-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-display);
}

.rx-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.08;
  color: var(--navy);
}

.rx-meta {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-weight: 700;
  line-height: 1.4;
}

.rx-units {
  display: inline-flex;
  gap: 0;
  margin: -0.5rem 0 1.35rem;
  border: 1px solid color-mix(in srgb, var(--navy) 18%, transparent);
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--cream, #fff8ef) 80%, white);
}

.rx-units-btn {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0.4rem 0.95rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}

.rx-units-btn.is-active {
  color: #fff;
  background: var(--navy);
}

.rx-units-btn:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 2px;
  z-index: 1;
}

.rx-section {
  margin-bottom: 1.75rem;
}

.rx-section h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--blue-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rx-section ul,
.rx-section ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
  font-size: 1.08rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--ink);
}

.rx-section li::marker {
  color: var(--brown);
}

.rx-yt {
  margin: 1.25rem 0 0;
}

.rx-video {
  display: block;
  margin: 1.75rem 0 0.35rem;
  text-decoration: none;
  color: inherit;
}

.rx-video-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  border: 3px solid var(--brown);
  background: var(--apron-deep);
  box-shadow: 0 12px 28px var(--shadow, rgba(61, 40, 24, 0.16));
  aspect-ratio: 16 / 9;
}

.rx-video-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rx-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4.1rem;
  height: 4.1rem;
  margin: -2.05rem 0 0 -2.05rem;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.92);
  border: 3px solid var(--brown);
  box-shadow: 0 8px 20px rgba(61, 40, 24, 0.28);
}

.rx-video-play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -0.55rem 0 0 -0.25rem;
  border-style: solid;
  border-width: 0.6rem 0 0.6rem 1rem;
  border-color: transparent transparent transparent var(--brown-deep);
}

.rx-video:hover .rx-video-frame {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(61, 40, 24, 0.22);
}

.rx-video-frame {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rx-video-cap {
  display: block;
  margin: 0.55rem 0.15rem 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brown-deep);
}

.rx-yt-btn {
  display: none; /* replaced by .rx-video card */
}

@media (max-width: 820px) {
  .rx-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .rx-sidebar {
    max-height: none;
    border-right: 0;
    border-bottom: 3px solid var(--piping);
  }

  .rx-list {
    max-height: 220px;
  }

  .rx-detail {
    max-height: none;
  }

  .rx-suggest {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: auto;
    max-height: 50vh;
  }
}
