/* Иконка Реестра в шапке + оверлей поиска */
/* размер svg — в app.css (.app-topbar-square-btn > svg), чтобы не мигало при поздней загрузке */
.reestr-topbar-btn.is-active {
  color: var(--bs-body-color);
}

.reestr-overlay {
  position: fixed;
  inset: 0;
  z-index: 1040;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 60px 12px 24px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.reestr-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.reestr-overlay[hidden] {
  display: flex !important;
  pointer-events: none;
}
.reestr-overlay.is-open[hidden] {
  pointer-events: auto;
}

.reestr-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .22);
}

.reestr-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 24px));
  max-height: min(70vh, 640px);
  overflow: auto;
  margin-top: 0;
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .14);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
}
.reestr-overlay.is-open .reestr-overlay__panel {
  transform: translateY(0);
  opacity: 1;
}

.reestr-strip__form {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 12px 14px 8px;
}
.reestr-strip__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--bs-secondary-color);
}
.reestr-strip__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 400;
  outline: none;
}
.reestr-strip__input:focus {
  border-color: var(--bs-border-color);
  box-shadow: none;
  outline: none;
}
.reestr-strip__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  padding: 0 4px;
}
.reestr-strip__tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 10px;
}
.reestr-strip__tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: 13px;
  font-weight: 400;
  padding: 4px 10px;
  border-radius: 0;
  cursor: pointer;
}
.reestr-strip__tab--fav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.reestr-strip__fav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 3px;
  background: #f59f00;
  color: #fff;
  font-size: 9px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.reestr-strip__fav-badge[hidden] {
  display: none !important;
}
.reestr-strip__tab.is-active {
  color: var(--bs-body-color);
  background: transparent;
  font-weight: 400;
}
.reestr-strip__body {
  width: 100%;
  margin: 0;
  padding: 0 14px 14px;
}
.reestr-strip__meta {
  font-size: 12px;
  font-weight: 400;
  color: var(--bs-secondary-color);
  margin-bottom: 8px;
  min-height: 1.2em;
}
.reestr-strip__panel[hidden] {
  display: none !important;
}
.reestr-overlay .reestr-dash-item {
  width: 100%;
  text-align: left;
  background: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}
.reestr-overlay .reestr-dash-item:hover {
  background: var(--bs-tertiary-bg, #f6f7f9);
  border-color: var(--bs-border-color);
}
.reestr-overlay .reestr-dash-item__addr {
  font-weight: 400;
}
.reestr-strip__empty,
.reestr-strip__loading,
.reestr-strip__error {
  font-size: 13px;
  font-weight: 400;
  color: var(--bs-secondary-color);
  padding: 10px 2px;
}
.reestr-strip__error {
  color: var(--bs-danger);
}

html.reestr-overlay-open {
  overflow: hidden;
}

@media (max-width: 576px) {
  .reestr-overlay {
    padding: 56px 8px 16px;
    justify-content: center;
  }
  .reestr-overlay__panel {
    width: 100%;
    max-height: min(78vh, 640px);
  }
}
