/* OKKwork — боковая панель «Инструкция по работе в OKKwork» */

:root {
  --okkwork-instruction-slide-ms: var(--okkwork-profile-slide-ms, 0.4s);
  --okkwork-instruction-slide-ease: var(--okkwork-profile-slide-ease, ease-in-out);
}

#okkwork-instruction-panel,
#okkwork-instruction-panel .okkwork-instruction-panel__scroll {
  font-family: "Rubik", "Rubik-Medium", "Rubik-Light", system-ui, sans-serif;
  color: rgba(81, 95, 108, 1);
  -webkit-font-smoothing: antialiased;
}

#okkwork-instruction-panel {
  display: none !important;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#okkwork-instruction-panel.is-open {
  display: block !important;
  position: fixed !important;
  z-index: 101580 !important;
  inset: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none !important;
  transform: none !important;
  transition: none !important;
}

#okkwork-instruction-panel.is-open.is-profile-entering,
#okkwork-instruction-panel.is-open.is-slide-open {
  pointer-events: auto !important;
}

#okkwork-instruction-panel.is-open.is-profile-leaving {
  pointer-events: none !important;
}

.okkwork-instruction-panel__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(15, 23, 42, 0.22);
  opacity: 0;
  cursor: pointer;
  transition: opacity var(--okkwork-instruction-slide-ms) var(--okkwork-instruction-slide-ease);
}

#okkwork-instruction-panel.is-open.is-profile-entering .okkwork-instruction-panel__backdrop,
#okkwork-instruction-panel.is-open.is-slide-open .okkwork-instruction-panel__backdrop {
  opacity: 1;
}

#okkwork-instruction-panel.is-open.is-profile-leaving .okkwork-instruction-panel__backdrop {
  opacity: 0;
}

.okkwork-instruction-panel__shell {
  position: fixed;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: var(
    --okkwork-profile-panel-width,
    min(var(--okkwork-profile-panel-max-width, 920px), 100vw)
  );
  min-width: 0;
  max-width: min(var(--okkwork-profile-panel-max-width, 920px), 100vw);
  height: 100%;
  height: 100dvh;
  margin: 0;
  background: linear-gradient(180deg, #f7fafd 0%, #fff 120px);
  border-left: 1px solid rgba(6, 88, 162, 0.16);
  box-shadow: -8px 0 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  transform: translateX(100%);
  transform-origin: right center;
  transition: transform var(--okkwork-instruction-slide-ms) var(--okkwork-instruction-slide-ease);
  will-change: transform;
}

#okkwork-instruction-panel.is-open.is-slide-open .okkwork-instruction-panel__shell,
body.okkwork-instruction-panel-open #okkwork-instruction-panel.is-open.is-slide-open .okkwork-instruction-panel__shell {
  transform: translateX(0);
}

#okkwork-instruction-panel.is-open.is-profile-leaving .okkwork-instruction-panel__shell {
  transform: translateX(100%);
  pointer-events: none;
}

.okkwork-instruction-panel__close {
  position: absolute;
  top: 12px;
  right: 17px;
  z-index: 6;
}

#okkwork-instruction-panel.is-open .okkwork-instruction-panel__close .profile-panel__close-ico {
  transform: rotate(90deg);
}

.okkwork-instruction-panel__scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.okkwork-instruction-panel__header {
  flex-shrink: 0;
  padding: 16px 52px 10px 24px;
  border-bottom: 1px solid rgba(6, 88, 162, 0.1);
}

.okkwork-instruction-panel__title {
  margin: 0;
  font-family: "Rubik-Bold", "Rubik", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(6, 88, 162, 1);
}

.okkwork-instruction-panel__lead {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(81, 95, 108, 0.92);
}

.okkwork-instruction-panel__search-wrap {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 14px 24px 12px;
  background: rgba(247, 250, 253, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(6, 88, 162, 0.08);
}

.okkwork-instruction-panel__search-label {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(6, 88, 162, 0.75);
}

.okkwork-instruction-panel__search-row {
  position: relative;
  display: flex;
  align-items: center;
}

.okkwork-instruction-panel__search-input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 14px;
  border: 1px solid rgba(6, 88, 162, 0.22);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.92);
  outline: none;
  box-shadow: 0 1px 8px rgba(6, 88, 162, 0.06) inset;
}

.okkwork-instruction-panel__search-input:focus {
  border-color: rgba(6, 88, 162, 0.42);
  box-shadow: 0 0 0 2px rgba(6, 88, 162, 0.1), 0 1px 8px rgba(6, 88, 162, 0.06) inset;
}

.okkwork-instruction-panel__search-clear {
  position: absolute;
  right: 6px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(6, 88, 162, 0.75);
  cursor: pointer;
  font-size: 14px;
}

.okkwork-instruction-panel__search-clear:hover {
  background: rgba(6, 88, 162, 0.08);
}

.okkwork-instruction-panel__search-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(81, 95, 108, 0.9);
}

.okkwork-instruction-panel__toc {
  padding: 14px 24px 4px;
}

.okkwork-instruction-panel__toc-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(6, 88, 162, 0.8);
}

.okkwork-instruction-panel__toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.okkwork-instruction-panel__toc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(6, 88, 162, 0.16);
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  color: rgba(6, 88, 162, 1);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.okkwork-instruction-panel__toc-link:hover,
.okkwork-instruction-panel__toc-link:focus-visible {
  background: rgba(6, 88, 162, 0.08);
  border-color: rgba(6, 88, 162, 0.28);
}

.okkwork-instruction-panel__toc-link.is-hidden {
  display: none;
}

.okkwork-instruction-panel__content {
  padding: 8px 24px 24px;
}

.okkwork-instruction-panel__section {
  margin: 0 0 28px;
  scroll-margin-top: 88px;
}

.okkwork-instruction-panel__section.is-scroll-target {
  animation: okkwork-instruction-section-flash 1.2s ease;
}

@keyframes okkwork-instruction-section-flash {
  0%,
  100% {
    background: transparent;
  }
  25%,
  75% {
    background: rgba(75, 210, 130, 0.12);
  }
}

  display: none;
}

.okkwork-instruction-panel__section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 12px;
}

.okkwork-instruction-panel__section-badge {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 88, 162, 0.14), rgba(0, 184, 217, 0.12));
  font-size: 18px;
  line-height: 1;
}

.okkwork-instruction-panel__section-title {
  margin: 0;
  font-family: "Rubik-Medium", "Rubik", sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(6, 88, 162, 1);
}

.okkwork-instruction-panel__text {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.58;
  color: rgba(81, 95, 108, 1);
}

.okkwork-instruction-panel__list {
  margin: 0 0 12px;
  padding: 0 0 0 20px;
  list-style: none;
  font-size: 14px;
  line-height: 1.55;
}

.okkwork-instruction-panel__list li {
  position: relative;
  margin: 0 0 8px;
  padding-left: 16px;
}

.okkwork-instruction-panel__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(6, 88, 162, 1);
  transform: translateY(-50%);
}

.okkwork-instruction-panel__card {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(6, 88, 162, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(6, 88, 162, 0.06);
}

.okkwork-instruction-panel__card-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(6, 88, 162, 1);
}

.okkwork-instruction-panel__example {
  margin: 12px 0;
  padding: 12px 14px 12px 16px;
  border-radius: 12px;
  border-left: 4px solid rgba(75, 210, 130, 1);
  background: rgba(75, 210, 130, 0.08);
  font-size: 14px;
  line-height: 1.55;
}

.okkwork-instruction-panel__example strong {
  display: block;
  margin: 0 0 4px;
  color: rgba(6, 88, 162, 1);
}

.okkwork-instruction-panel__tip {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(243, 145, 8, 0.1);
  border: 1px solid rgba(243, 145, 8, 0.22);
  font-size: 13px;
  line-height: 1.55;
}

.okkwork-instruction-panel__tip::before {
  content: "💡 ";
}

.okkwork-instruction-panel__figure {
  margin: 14px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(6, 88, 162, 0.12);
  background: #fff;
  text-align: center;
}

.okkwork-instruction-panel__figure svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.okkwork-instruction-panel__figure-cap {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(81, 95, 108, 0.88);
}

.okkwork-instruction-panel__steps {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.okkwork-instruction-panel__step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(6, 88, 162, 0.05);
}

.okkwork-instruction-panel__step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(6, 88, 162, 1);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.okkwork-instruction-panel__faq {
  display: grid;
  gap: 8px;
}

.okkwork-instruction-panel__faq-item {
  border: 1px solid rgba(6, 88, 162, 0.14);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.okkwork-instruction-panel__faq-item summary {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(6, 88, 162, 1);
  cursor: pointer;
  list-style: none;
}

.okkwork-instruction-panel__faq-item summary::-webkit-details-marker {
  display: none;
}

.okkwork-instruction-panel__faq-item summary::after {
  content: "+";
  float: right;
  font-weight: 700;
}

.okkwork-instruction-panel__faq-item[open] summary::after {
  content: "−";
}

.okkwork-instruction-panel__faq-body {
  padding: 0 14px 12px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(81, 95, 108, 1);
}

.okkwork-instruction-panel__footer {
  margin: 0 24px 28px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(6, 88, 162, 0.08), rgba(0, 184, 217, 0.08));
  border: 1px solid rgba(6, 88, 162, 0.14);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(81, 95, 108, 1);
}

.okkwork-instruction-panel__footer strong {
  color: rgba(6, 88, 162, 1);
}

.okkwork-instruction-panel__search-mark {
  background: rgba(243, 145, 8, 0.35);
  border-radius: 2px;
  padding: 0 1px;
}

@media (prefers-reduced-motion: reduce) {
  .okkwork-instruction-panel__shell {
    transition: none !important;
  }

  #okkwork-instruction-panel.is-open.is-profile-entering .okkwork-instruction-panel__shell,
  #okkwork-instruction-panel.is-open.is-slide-open .okkwork-instruction-panel__shell {
    transform: translateX(0) !important;
  }
}

@media (max-width: 640px) {
  .okkwork-instruction-panel__shell {
    width: 100vw !important;
    max-width: 100vw !important;
  }
}
