/* «Добавить сайт»: закладка / на экран «Домой» — модалка + кнопка в меню */

.add-site-modal {
  position: fixed;
  inset: 0;
  z-index: 100080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 0) 16px env(safe-area-inset-bottom, 0);
  box-sizing: border-box;
}
.add-site-modal[hidden] {
  display: none !important;
}
.add-site-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 10, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.add-site-modal__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: min(88vh, 640px);
  overflow: auto;
  border-radius: 22px;
  padding: 22px 20px 18px;
  box-sizing: border-box;
  background: linear-gradient(155deg, rgba(28, 38, 34, 0.98) 0%, rgba(18, 24, 22, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(31, 168, 101, 0.12) inset;
  color: #e8eef2;
}
html[data-theme="light"] .add-site-modal__panel {
  background: linear-gradient(155deg, #f6faf7 0%, #eef5f0 100%);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1b1e1c;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}
.add-site-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.add-site-modal__close:hover {
  background: rgba(31, 168, 101, 0.25);
}
html[data-theme="light"] .add-site-modal__close {
  background: rgba(0, 0, 0, 0.05);
}
.add-site-modal__head {
  padding-right: 36px;
  margin-bottom: 14px;
}
.add-site-modal__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(31, 168, 101, 0.35), rgba(31, 168, 101, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 10px;
}
.add-site-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.add-site-modal__lead {
  margin: 6px 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.45;
}
.add-site-modal__section {
  margin-top: 16px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
html[data-theme="light"] .add-site-modal__section {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}
.add-site-modal__section[hidden] {
  display: none !important;
}
.add-site-modal__h {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3dd68c;
  opacity: 0.95;
}
html[data-theme="light"] .add-site-modal__h {
  color: #0f8a55;
}
.add-site-modal__steps {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.92rem;
  line-height: 1.55;
}
.add-site-modal__steps li {
  margin-bottom: 8px;
}
.add-site-modal__steps li:last-child {
  margin-bottom: 0;
}
.add-site-modal__kbd {
  display: inline-block;
  padding: 3px 8px;
  margin: 0 2px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
html[data-theme="light"] .add-site-modal__kbd {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
}
.add-site-modal__install {
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #1fa865, #0f8a55);
  color: #fff;
  box-shadow: 0 8px 28px rgba(31, 168, 101, 0.35);
}
.add-site-modal__install:hover {
  filter: brightness(1.05);
}
.add-site-modal__install[hidden] {
  display: none !important;
}
.add-site-modal__hint {
  margin: 10px 0 0;
  font-size: 0.82rem;
  opacity: 0.75;
  line-height: 1.4;
}

/* Кнопка в выезжающем меню */
.sitehdr__drawer-addsite {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 10px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 168, 101, 0.35);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(31, 168, 101, 0.18), rgba(31, 168, 101, 0.05));
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.sitehdr__drawer-addsite:hover {
  border-color: rgba(31, 168, 101, 0.55);
  background: linear-gradient(120deg, rgba(31, 168, 101, 0.28), rgba(31, 168, 101, 0.08));
}
.sitehdr__drawer-addsite-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(31, 168, 101, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.sitehdr__drawer-addsite-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sitehdr__drawer-addsite-title {
  font-size: 0.98rem;
  font-weight: 700;
}
.sitehdr__drawer-addsite-sub {
  font-size: 0.78rem;
  opacity: 0.75;
  line-height: 1.3;
}

.add-site-widget--standalone .sitehdr__drawer-addsite,
.add-site-widget--standalone .footer__addSiteBtn {
  display: none !important;
}

/* Классический футер: кнопка как текстовая ссылка в колонке */
.footer__nav-link--as-link {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  opacity: 0.92;
}
.footer__nav-link--as-link:hover {
  opacity: 1;
}

/* Десктоп: кнопка в шапке «В закладки» */
.sitehdr__bookmarkDesk {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(31, 168, 101, 0.45);
  background: rgba(31, 168, 101, 0.12);
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.sitehdr__bookmarkDesk:hover {
  background: rgba(31, 168, 101, 0.22);
  border-color: rgba(31, 168, 101, 0.65);
}
.sitehdr__bookmarkDesk-icon {
  font-size: 15px;
  line-height: 1;
  opacity: 0.95;
}
@media (min-width: 900px) {
  .sitehdr__bookmarkDesk {
    display: inline-flex;
  }
}
.add-site-widget--standalone .sitehdr__bookmarkDesk {
  display: none !important;
}

html.theme-bormash-industrial .sitehdr__bookmarkDesk {
  border-color: rgba(214, 181, 90, 0.42);
  background: rgba(214, 181, 90, 0.1);
}
html.theme-bormash-industrial .sitehdr__bookmarkDesk:hover {
  border-color: rgba(214, 181, 90, 0.65);
  background: rgba(214, 181, 90, 0.2);
}

/* Модалка: основная кнопка «Добавить в закладки» */
.add-site-modal__bookmark-btn {
  width: 100%;
  margin-top: 12px;
  padding: 13px 16px;
  border: none;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #1fa865, #0f8a55);
  color: #fff;
  box-shadow: 0 8px 24px rgba(31, 168, 101, 0.32);
}
.add-site-modal__bookmark-btn:hover {
  filter: brightness(1.06);
}
.add-site-modal__feedback {
  margin: 10px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #5ce3a0;
}
html[data-theme="light"] .add-site-modal__feedback {
  color: #0d7a45;
}
