/* ============================================================
   SIP PRICES — «Стоимость услуги» (страница ЦОД/Colocation)
   Шапка: заголовок слева, описание справа.
   Список позиций: label слева, значение справа; строки склеены
   в единую карточку (радиусы у первой/последней).
   У 4 позиций — иконка «?» с CSS-тултипом:
   ПК (1025+) — оранжевая плашка снизу (по макету),
   моб (≤1024) — тёмная сверху, по центру.
   Показ: hover / focus-within (клавиатура и тап). JS не требуется
   ============================================================ */

.sip-prices {
  /* тематические переменные (переопределяются в dark) */
  --sp-row-bg: var(--color-white);
  --sp-label: var(--color-gray);
  --sp-value: var(--color-dark);
  --sp-text: var(--color-gray);
  --sp-hint-bg: var(--color-dark);
  --sp-hint-text: var(--color-white);
  --sp-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);

  margin-top: 120px;
}

body.dark .sip-prices {
  --sp-row-bg: #272b33;
  --sp-label: #b4bac2;
  --sp-value: var(--color-white);
  --sp-text: #b4bac2;
  --sp-hint-bg: var(--color-accent);
  --sp-shadow: none;
}

/* ---------- Шапка ---------- */
.sip-prices__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
}


.sip-prices__title span { display: block; }
.sip-prices__title-accent { color: var(--color-accent); }

.sip-prices__intro p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--sp-text);
}

.sip-prices__intro p + p { margin-top: 16px; }

.sip-prices__btn { margin-top: 40px; }

/* ---------- Список позиций ---------- */
.sip-prices__list {
  display: grid;
  gap: 3px;
  margin-top: 60px;
}

.sip-prices__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  background-color: var(--sp-row-bg);
  box-shadow: var(--sp-shadow);
}

.sip-prices__row:first-of-type {
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.sip-prices__row:last-of-type {
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.sip-prices__label {
  font-size: 20px;
  line-height: 1.4;
  color: var(--sp-label);
}

.sip-prices__value {
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 600;
  text-align: left;
  color: var(--sp-value);
  width: 50%;
}

/* ---------- Тултип «?» ----------
   база (моб, ≤1024px): тёмная плашка НАД иконкой, по центру */
.sip-prices__hint {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
}

/* цвет иконки зашит в SVG (fill=#EF7F1A), управляем размером */
.sip-prices__hint-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sip-prices__hint-btn svg {
  width: 24px;
  height: 24px;
}

.sip-prices__hint-text {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  z-index: 20;
  width: max-content;
  max-width: 420px;
  padding: 15px;
  border-radius: 10px;
  background-color: var(--sp-hint-bg);
  color: var(--sp-hint-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  pointer-events: none;
}

/* показ на hover и при фокусе с клавиатуры / тапе (focus-within) */
.sip-prices__hint:hover .sip-prices__hint-text,
.sip-prices__hint:focus-within .sip-prices__hint-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ---------- ПК (1025+): тултип по макету —
   оранжевая плашка справа от иконки, по её вертикальному центру ---------- */
@media (min-width: 1025px) {
  .sip-prices__hint-text {
    bottom: auto;
    top: 50%;
    left: calc(100% + 12px);
    transform: translateY(-50%) translateX(-4px);
    max-width: 480px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  }

  .sip-prices__hint-text::before{
    content:'';
    position:absolute;
    background: url('data:image/svg+xml,<svg width="9" height="14" viewBox="0 0 9 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M-3.02841e-07 6.92727L9 -0.000938809L9 13.8555L-3.02841e-07 6.92727Z" fill="%23EF7F1A"/></svg>') center / contain no-repeat;
    width:14px;
    height:14px;
    top:calc(50% - 7px);
    left:-9px;
  }

  .sip-prices__hint:hover .sip-prices__hint-text,
  .sip-prices__hint:focus-within .sip-prices__hint-text {
    transform: translateY(-50%) translateX(0);
  }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .sip-prices { margin-top: 60px; }

  .sip-prices__head {
    grid-template-columns: minmax(0, 1fr);
  }

  .sip-prices__title { font-size: 28px; }
  .sip-prices__title-accent { display: inline; }
  .sip-prices__intro p { font-size: 15px; }

  .sip-prices__btn { margin-top: 20px; }

  .sip-prices__list {
    margin-top: 40px;
  }

  .sip-prices__row {
    padding: 15px 20px;
  }

  .sip-prices__label,
  .sip-prices__value { font-size: 15px; width: auto; }
}

@media (max-width: 640px) {
  /* по моб. макету: название сверху, значение под ним */
  .sip-prices__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .sip-prices__value { text-align: left; font-size: 17px; }

  .sip-prices__label,
  .sip-prices__value { font-size: 18px; }

  .sip-prices__hint-text{
    max-width:300px;
  }
}