/* ==========================================================================
   Live Search – light panel
   ========================================================================== */

.rn-search {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(4.5rem, 12vh, 7rem) 16px 24px;
  visibility: hidden;
  pointer-events: none;
}

.rn-search.is-open {
  visibility: visible;
  pointer-events: auto;
}

.rn-search__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.rn-search.is-open .rn-search__backdrop {
  opacity: 1;
}

.rn-search__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  max-height: min(78vh, 720px);
  overflow: auto;
  color: #0a0a0a;
  background-color: #fff;
  border: 1px solid var(--rn-line, #e7e5e0);
  border-radius: var(--rn-radius-card);
  padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.rn-search.is-open .rn-search__panel {
  opacity: 1;
}

body.rn-search-open {
  overflow: hidden;
}

.rn-search__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--rn-radius-control);
  background: rgba(10, 10, 10, 0.06);
  color: #0a0a0a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rn-search__close:hover {
  background: rgba(10, 10, 10, 0.12);
}

.rn-search__eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 40px 12px 0;
  font-size: var(--rn-eyebrow-size);
  font-weight: 700;
  letter-spacing: var(--rn-eyebrow-track);
  text-transform: uppercase;
  color: var(--rn-accent-dark, #8a6a3b);
}

.rn-search__form {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid rgba(10, 10, 10, 0.25);
  border-radius: var(--rn-radius-control);
  padding: 0.35rem 0.45rem 0.35rem 0.85rem;
  background: #fff;
}

.rn-search__form:focus-within {
  border-color: #0a0a0a;
  background: #fff;
}

.rn-search__icon {
  color: var(--rn-text-mute, #5c5c5c);
  font-size: 1.35rem;
}

.rn-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  height: 44px;
  font-size: 1.05rem;
  font-family: inherit;
  color: #0a0a0a;
  outline: none;
}

.rn-search__input::placeholder {
  color: var(--rn-text-mute, #5c5c5c);
}

.rn-search__go {
  border: 0;
  border-radius: var(--rn-radius-control);
  height: auto;
  padding: 0 1.1rem;
  background: #0a0a0a;
  color: #fff;
  font-size: var(--rn-btn-size);
  font-weight: 700;
  letter-spacing: var(--rn-btn-track);
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  min-height: var(--rn-btn-height);
}

.rn-search__go:hover {
  background: var(--rn-accent-dark, #8a6a3b);
}

.rn-search__status {
  position: relative;
  z-index: 1;
  min-height: 1.25rem;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.9375rem;
  color: var(--rn-text-mute, #5c5c5c);
}

.rn-search__results,
.rn-search__hints {
  position: relative;
  z-index: 1;
}

.rn-search__group {
  margin: 1rem 0 0.25rem;
}

.rn-search__group-label {
  margin: 0 0 0.45rem;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rn-accent-dark, #8a6a3b);
}

.rn-search__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.35rem;
  border-radius: var(--rn-radius-card);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.rn-search__item:hover,
.rn-search__item.is-active {
  background: var(--rn-sand, #f6f4ef);
}

.rn-search__thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--rn-radius-card);
  object-fit: cover;
  background: var(--rn-sand, #f6f4ef);
  flex: none;
}

.rn-search__thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rn-accent-dark, #8a6a3b);
  font-size: 1.25rem;
}

.rn-search__item-body {
  min-width: 0;
  flex: 1;
}

.rn-search__item-title {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
  color: #0a0a0a;
}

.rn-search__item-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9375rem;
  color: var(--rn-text-mute, #5c5c5c);
}

.rn-search__more {
  display: inline-flex;
  margin-top: 0.85rem;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--rn-accent-dark, #8a6a3b);
}

.rn-search__more:hover {
  color: #0a0a0a;
}

.rn-search__hints-label {
  margin: 1.25rem 0 0.55rem;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rn-text-mute, #5c5c5c);
}

.rn-search__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.rn-search__chips a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 0.85rem;
  border: 1px solid rgba(10, 10, 10, 0.25);
  border-radius: var(--rn-radius-control);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #0a0a0a;
  background: transparent;
}

.rn-search__chips a:hover {
  border-color: #0a0a0a;
  background: #0a0a0a;
  color: #fff;
}

.rn-search__empty {
  padding: 1.25rem 0.25rem;
  font-size: 0.9375rem;
  color: var(--rn-text-mute, #5c5c5c);
}

@media (max-width: 640px) {
  .rn-search {
    padding: 0;
    align-items: stretch;
  }

  .rn-search__panel {
    max-width: none;
    max-height: none;
    height: 100%;
    border-radius: 0;
    padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    background-color: #fff;
  }

  .rn-search__go {
    display: none;
  }
}
