/* SH Vacancy CTA
   Фон/рамка/тінь/скло кнопки й вікна навмисно НЕ визначаються тут — вони
   отримують класи теми (.sh-card, .sh-glass) і виглядають так само, як інші
   картки на сторінці. Нижче — тільки layout (рядок: іконка + текст +
   стрілка), розміри й поведінка модального вікна. Значення у var() мають
   фолбек і спрацюють навіть без цієї конкретної теми — просто не так гарно. */

/* ---------- Кнопка-тригер (картка на кшталт "Встановити додаток") ---------- */
.sh-vcta-trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px !important; /* компактніше за стандартний .sh-card */
  text-align: left;
  cursor: pointer;
  appearance: none;
  font: inherit;
  color: var(--text-primary, var(--sh-text, #1c2733));
  transition: transform 150ms ease, filter 150ms ease;
}
.sh-vcta-trigger:hover { transform: translateY(-1px); }
.sh-vcta-trigger:active { transform: translateY(0); filter: brightness(0.97); }

.sh-vcta-trigger-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary, #287FF0);
  color: #fff;
}

.sh-vcta-trigger-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sh-vcta-trigger-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary, var(--sh-text, #1c2733));
}

.sh-vcta-trigger-sub {
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--text-secondary, var(--sh-menu-text, #6b7684));
}

.sh-vcta-chevron {
  flex: none;
  color: var(--text-secondary, var(--sh-menu-text, #6b7684));
  opacity: 0.55;
}

/* ---------- Плаваюча кнопка ---------- */
.sh-vcta-fab.sh-vcta-trigger {
  position: fixed;
  z-index: 480;
  width: auto;
  max-width: min(280px, calc(100vw - 32px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-4, 16px) + var(--bottom-nav-height, 48px) + (var(--bottom-nav-pad, 5px) * 2) + 14px);
}
.sh-vcta-fab--right { right: var(--space-4, 16px); }
.sh-vcta-fab--left  { left: var(--space-4, 16px); }

@media (min-width: 768px) {
  .sh-vcta-fab.sh-vcta-trigger {
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-5, 20px) + var(--bottom-nav-height-md, 52px) + (var(--bottom-nav-pad-md, 6px) * 2) + 14px);
  }
}

/* ---------- Оверлей ---------- */
.sh-vcta-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4, 16px);
  background: rgba(10, 14, 22, 0.45);
  opacity: 0;
  transition: opacity 200ms ease;
}
.sh-vcta-overlay[hidden] { display: none; }
.sh-vcta-overlay.is-open { opacity: 1; }

/* ---------- Вікно ---------- */
.sh-vcta-modal {
  position: relative;
  width: min(360px, 100%);
  padding: 26px 20px 18px;
  border-radius: var(--sh-ui-card-radius, var(--radius-lg, 16px));
  /* рядки-контакти навмисно "виїдають" в край (margin: 0 -20px), тож
     обрізаємо все по заокругленим кутам вікна */
  overflow: hidden;
  text-align: center;
  transform: translateY(8px) scale(0.98);
  transition: transform 200ms ease;
  outline: none;
  /* фолбек, якщо .sh-glass у поточній темі не визначено */
  background: var(--lg-bg, var(--glass-bg, rgba(255, 255, 255, 0.94)));
  border: 1px solid var(--lg-border, var(--glass-border, rgba(0, 0, 0, 0.08)));
  box-shadow: var(--lg-shadow, 0 10px 30px -5px rgba(0, 0, 0, 0.22));
}
.sh-vcta-overlay.is-open .sh-vcta-modal {
  transform: translateY(0) scale(1);
}

.sh-vcta-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, var(--sh-text, #1c2733));
}

.sh-vcta-text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary, var(--sh-menu-text, #6b7684));
}

/* ---------- Рядки-контакти (як на прикладі "Калькулятор дат / Резюме / ...") ---------- */
.sh-vcta-msg-list {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.sh-vcta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  /* від'ємні поля "виїдають" внутрішній відступ модалки (20px), щоб лінія
     між рядками йшла в край картки, а не обривалась біля іконки */
  margin: 0 -20px;
  padding: 15px 20px;
  text-decoration: none;
  color: inherit;
  transition: background-color 150ms ease;
}
.sh-vcta-row:hover {
  background-color: rgba(127, 127, 127, 0.08);
}
.sh-vcta-row + .sh-vcta-row {
  /* саме той сірий роздільник теми (--lg-border — це білий скляний край,
     він губився на світлому фоні модалки й рядки зливались) */
  border-top: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.1));
}

.sh-vcta-row-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.sh-vcta-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sh-vcta-row-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary, var(--sh-text, #1c2733));
}

.sh-vcta-row-sub {
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--text-secondary, var(--sh-menu-text, #6b7684));
}

@media (prefers-reduced-motion: reduce) {
  .sh-vcta-overlay,
  .sh-vcta-modal,
  .sh-vcta-trigger {
    transition: none;
  }
}
