/* assets/css/help_overlay.css */

html.karmet-help-overlay-open,
html.karmet-help-overlay-open body {
  overflow: hidden !important;
  overflow-x: hidden !important;
}

html.has-app-shell.karmet-help-overlay-open #app-content {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.karmet-help-overlay[hidden] {
  display: none !important;
}

.karmet-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
  pointer-events: none;
  overflow: hidden;
  overscroll-behavior-x: none;
}

.karmet-help-overlay__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(16, 14, 12, 0.1), rgba(16, 14, 12, 0.24)),
    radial-gradient(130% 78% at 50% -8%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.04) 72%);
  transition: opacity 0.42s ease;
  touch-action: none;
}

.karmet-help-overlay__sheet,
.karmet-help-overlay__topics-panel {
  position: absolute;
  inset-inline: 0;
  top: calc(env(safe-area-inset-top, 0px) + 50px);
  bottom: 0;
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(42, 38, 33, 0.12);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.74), 0 -10px 34px rgba(24, 21, 17, 0.16);
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.karmet-help-overlay__sheet {
  z-index: 1;
  padding: 0 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
  transform: translateY(84px);
  opacity: 0;
  filter: blur(1.1px) saturate(98%);
  transition:
    transform 0.56s cubic-bezier(0.18, 0.9, 0.28, 1),
    opacity 0.44s ease,
    filter 0.44s ease;
}

.karmet-help-overlay.is-entered {
  pointer-events: auto;
}

.karmet-help-overlay.is-entered .karmet-help-overlay__backdrop {
  opacity: 1;
}

.karmet-help-overlay.is-entered .karmet-help-overlay__sheet {
  transform: translateY(0);
  opacity: 1;
  filter: none;
}

.karmet-help-overlay.is-exiting {
  pointer-events: none;
}

.karmet-help-overlay.is-exiting .karmet-help-overlay__backdrop {
  opacity: 0;
  transition: opacity 0.28s ease;
}

.karmet-help-overlay.is-exiting .karmet-help-overlay__sheet {
  transform: translateY(92px);
  opacity: 0;
  filter: blur(1.2px) saturate(96%);
  transition:
    transform 0.32s cubic-bezier(0.34, 1, 0.64, 1),
    opacity 0.28s ease,
    filter 0.28s ease;
}

.karmet-help-overlay__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 -14px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid rgba(42, 38, 33, 0.1);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px) saturate(110%);
  backdrop-filter: blur(8px) saturate(110%);
  box-shadow: none;
  overflow: visible;
  touch-action: pan-x;
}

.karmet-help-overlay__head::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -40px;
  height: 44px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.9) 28%,
    rgba(255, 255, 255, 0.72) 56%,
    rgba(255, 255, 255, 0.38) 82%,
    rgba(255, 255, 255, 0) 100%
  );
}

.karmet-help-overlay__menu-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(42, 38, 33, 0.86);
}

.karmet-help-overlay__menu-btn.btn--ghost,
.karmet-help-overlay__done-btn.btn--ghost,
.karmet-help-overlay__topics-menu-btn.btn--ghost,
.karmet-help-overlay__topics-done.btn--ghost {
  border: 0;
  background: transparent;
}

.karmet-help-overlay__menu-btn.btn--ghost:hover,
.karmet-help-overlay__menu-btn.btn--ghost:focus-visible,
.karmet-help-overlay__done-btn.btn--ghost:hover,
.karmet-help-overlay__done-btn.btn--ghost:focus-visible,
.karmet-help-overlay__topics-menu-btn.btn--ghost:hover,
.karmet-help-overlay__topics-menu-btn.btn--ghost:focus-visible,
.karmet-help-overlay__topics-done.btn--ghost:hover,
.karmet-help-overlay__topics-done.btn--ghost:focus-visible {
  background: transparent;
  box-shadow: none;
}

.karmet-help-overlay__menu-btn svg,
.karmet-help-overlay__topics-menu-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.karmet-help-overlay__head-title {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: rgba(42, 38, 33, 0.9);
  letter-spacing: -0.01em;
}

.karmet-help-overlay__done-btn {
  height: 34px;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #0b78e3;
  font-size: 14px;
  font-weight: 700;
}

.karmet-help-overlay__content {
  margin-top: 10px;
  overflow-x: hidden;
}

.karmet-help-overlay__title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.38;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.karmet-help-overlay__lead {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(42, 38, 33, 0.78);
}

.karmet-help-overlay__sections {
  margin-top: 12px;
  display: block;
  overflow-x: hidden;
}

.karmet-help-overlay__section {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  scroll-margin-top: 84px;
}

.karmet-help-overlay__section + .karmet-help-overlay__section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(42, 38, 33, 0.1);
}

.karmet-help-overlay__section-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.5;
  color: rgba(42, 38, 33, 0.96);
}

.karmet-help-overlay__section-lead {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.9;
  font-weight: 400;
  color: rgba(42, 38, 33, 0.76);
}

.karmet-help-overlay__section-steps {
  margin: 8px 0 0;
  padding: 0 20px 0 0;
  display: grid;
  gap: 7px;
  font-size: 15px;
  line-height: 1.92;
  font-weight: 400;
  color: var(--text-main);
}

.karmet-help-overlay__section.is-focus {
  animation: karmetHelpSectionFocus 1.45s ease;
  border-radius: 10px;
}

.karmet-help-overlay__section.is-current {
  box-shadow: none;
}

.karmet-help-overlay__section.is-current .karmet-help-overlay__section-title {
  color: #0b78e3;
}

.karmet-help-overlay__topics {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
}

.karmet-help-overlay__topics.is-open {
  display: block;
}

.karmet-help-overlay__topics-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(16, 14, 12, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.karmet-help-overlay__topics-panel {
  z-index: 3;
  padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
  transform: translateY(34px);
  opacity: 0;
  filter: blur(0.8px);
  transition:
    transform 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease,
    filter 0.32s ease;
}

.karmet-help-overlay__topics.is-open .karmet-help-overlay__topics-backdrop {
  opacity: 1;
}

.karmet-help-overlay__topics.is-open .karmet-help-overlay__topics-panel {
  transform: translateY(0);
  opacity: 1;
  filter: none;
}

.karmet-help-overlay__topics-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 -12px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(42, 38, 33, 0.1);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px) saturate(110%);
  backdrop-filter: blur(8px) saturate(110%);
  overflow: visible;
  touch-action: pan-x;
}

.karmet-help-overlay__topics-head::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -18px;
  height: 20px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.66) 66%,
    rgba(255, 255, 255, 0) 100%
  );
}

.karmet-help-overlay__topics-menu-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(42, 38, 33, 0.86);
}

.karmet-help-overlay__topics-title {
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.karmet-help-overlay__topics-done {
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #0b78e3;
  font-size: 14px;
  font-weight: 700;
}

.karmet-help-overlay__topics-search-wrap {
  position: sticky;
  top: 53px;
  z-index: 8;
  margin: 0 -12px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid rgba(42, 38, 33, 0.08);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px) saturate(110%);
  backdrop-filter: blur(8px) saturate(110%);
  overflow: visible;
}

.karmet-help-overlay__topics-search-wrap::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -28px;
  height: 32px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(255, 255, 255, 0.78) 40%,
    rgba(255, 255, 255, 0.52) 72%,
    rgba(255, 255, 255, 0) 100%
  );
}

.karmet-help-overlay__topics-search.input {
  height: 40px;
  border-radius: 12px;
  font-size: 14px;
  border-color: rgba(42, 38, 33, 0.14);
  background: rgba(250, 250, 250, 0.95);
  position: relative;
  z-index: 1;
}

.karmet-help-overlay__topics-items {
  margin-top: 0;
  border-top: 0;
  overflow-x: hidden;
}

.karmet-help-overlay__topics-group {
  border-top: 1px solid rgba(42, 38, 33, 0.08);
}

.karmet-help-overlay__topics-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 2px;
  border: 0;
  background: transparent;
  color: var(--text-main);
  text-align: right;
}

.karmet-help-overlay__topics-group-title {
  font-size: 15px;
  line-height: 1.65;
  font-weight: 800;
}

.karmet-help-overlay__topics-group-arrow {
  font-size: 21px;
  line-height: 1;
  color: rgba(42, 38, 33, 0.4);
  transform: rotate(-90deg);
  transition: transform 0.24s ease;
}

.karmet-help-overlay__topics-group.is-open .karmet-help-overlay__topics-group-arrow {
  transform: rotate(-180deg);
}

.karmet-help-overlay__topics-group-sections {
  display: none;
  padding: 0 8px 8px 0;
}

.karmet-help-overlay__topics-group.is-open .karmet-help-overlay__topics-group-sections {
  display: block;
}

.karmet-help-overlay__topics-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 4px;
  border: 0;
  border-radius: 10px;
  text-align: right;
  background: transparent;
  color: var(--text-main);
}

.karmet-help-overlay__topics-item + .karmet-help-overlay__topics-item {
  margin-top: 2px;
}

.karmet-help-overlay__topics-item-text {
  font-size: 14px;
  line-height: 1.7;
  font-weight: 700;
}

.karmet-help-overlay__topics-item.is-active {
  background: rgba(12, 120, 227, 0.09);
}

.karmet-help-overlay__topics-item.is-active .karmet-help-overlay__topics-item-text,
.karmet-help-overlay__topics-group.is-open > .karmet-help-overlay__topics-group-toggle .karmet-help-overlay__topics-group-title {
  color: #0b78e3;
}

.karmet-help-overlay__topics-empty {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(42, 38, 33, 0.64);
  text-align: center;
}

@media (max-width: 640px) {
  .karmet-help-overlay__sheet,
  .karmet-help-overlay__topics-panel {
    top: calc(env(safe-area-inset-top, 0px) + 46px);
    border-radius: 18px 18px 0 0;
  }

  .karmet-help-overlay__sheet {
    padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  }

  .karmet-help-overlay__title {
    font-size: 21px;
  }

  .karmet-help-overlay__lead {
    font-size: 14px;
  }

  .karmet-help-overlay__section-title {
    font-size: 17px;
  }

  .karmet-help-overlay__section-lead {
    font-size: 13px;
  }

  .karmet-help-overlay__section-steps {
    font-size: 13.5px;
    gap: 7px;
  }

  .karmet-help-overlay__topics-title {
    font-size: 17px;
  }

  .karmet-help-overlay__topics-group-title {
    font-size: 14px;
  }

  .karmet-help-overlay__topics-item-text {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .karmet-help-overlay__backdrop,
  .karmet-help-overlay__sheet,
  .karmet-help-overlay__topics-backdrop,
  .karmet-help-overlay__topics-panel {
    transition: none;
    transform: translateY(0);
    opacity: 1;
    filter: none;
  }
}

@keyframes karmetHelpSectionFocus {
  0% {
    background: rgba(12, 120, 227, 0.14);
    box-shadow: inset 0 0 0 1px rgba(12, 120, 227, 0.24);
  }
  100% {
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(12, 120, 227, 0);
  }
}
