/* Страница-гайд «Менять цену только в купленных городах» (/ru/purchased-cities-price).
   Секции, контейнер, заголовки, кнопки и бейдж — из guide.css. Хедер и футер —
   из style.css языковой папки. Здесь только блоки этой страницы. */

.purchased-cities{
  --pc-main: var(--g-blue);
  --pc-main-soft: #007aff0d;
  --pc-bought: var(--g-violet);
  --pc-other: #a6a6b3;
  --pc-on: var(--g-green);
}

/* Появление блоков при скролле — как на остальных гайдах */
@keyframes pcRise{
  from{ opacity: 0; transform: translateY(18px); }
  to{ opacity: 1; transform: none; }
}

.purchased-cities [data-reveal]{
  animation: pcRise .7s cubic-bezier(.2, .7, .2, 1) both;
}

@supports (animation-timeline: view()){
  .purchased-cities [data-reveal]{
    animation: pcRise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}

/* Подзаголовок под h2 секции */
.pc__lead{
  margin: 12px 0 0;
  max-width: 44em;
  font-size: 17px;
  line-height: 1.55;
  color: var(--g-muted);
  text-wrap: pretty;
}

.pc__center{
  text-align: center;
}

.pc__lead.pc__center{
  margin-inline: auto;
}

.pc__note{
  margin: 20px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--g-muted);
}

/* Цена — всегда в одну строку */
.pc__price{
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------- */
/* 1. Первый экран: текст слева, карточка городов справа */

.pc-hero{
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.pc-hero__text{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
}

.pc-hero__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.pc-card{
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius-block);
  background: #ffffff;
  box-shadow: 0 30px 70px -30px #18181840;
}

.pc-card__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--g-line);
}

.pc-card__title{
  font-size: 15px;
  font-weight: 600;
}

.pc-card__meta{
  font-size: 13px;
  color: var(--g-muted);
}

.pc-card__switch{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--g-line);
  background: var(--g-bg-soft);
}

.pc-card__switch-label{
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

/* Переключатель как в кабинете */
.purchased-cities .pc-switch{
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--g-radius-pill);
  background: #d9d9e0;
  transition: background .25s;
}

.pc-switch__knob{
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px #18181833;
  transition: transform .25s;
}

.purchased-cities .pc-switch[aria-checked="true"]{
  background: var(--pc-on);
}

.pc-switch[aria-checked="true"] .pc-switch__knob{
  transform: translateX(20px);
}

.pc-switch:focus-visible{
  outline: 2px solid var(--g-blue);
  outline-offset: 2px;
}

.pc-cities{
  margin: 0;
  padding: 6px 22px;
  list-style: none;
}

.pc-city{
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
}

.pc-city + .pc-city{
  border-top: 1px solid var(--g-line-3);
}

.pc-city__dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pc-other);
}

.pc-city--main .pc-city__dot{
  background: var(--pc-main);
}

.pc-city--bought .pc-city__dot{
  background: var(--pc-bought);
}

.pc-city__info{
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pc-city__name{
  font-size: 15px;
  font-weight: 600;
}

.pc-city__tag{
  font-size: 13px;
  color: var(--g-muted);
  transition: color .3s;
}

.pc-city__price{
  font-family: var(--g-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--g-ink);
  transition: color .3s;
}

.pc-city--main .pc-city__price{
  color: var(--pc-main);
}

/* Выключено: некупленные города получают цену главного */
.pc-card[data-mode="off"] .pc-city--other .pc-city__price{
  color: var(--pc-main);
}

/* Включено: цена своя, бот её не трогает */
.pc-card[data-mode="on"] .pc-city--other .pc-city__tag{
  color: var(--g-green-text);
}

.pc-card__caption{
  margin: 0;
  padding: 16px 22px 18px;
  border-top: 1px solid var(--g-line);
  background: var(--g-bg-soft);
  font-size: 13px;
  line-height: 1.5;
  color: var(--g-muted);
}

/* ---------------------------------------------------------------------------- */
/* 2. Сравнение: выключено / включено */

.pc-compare{
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius-block);
  background: #ffffff;
}

.pc-compare__row{
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 18px 24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--g-text);
}

.pc-compare__row + .pc-compare__row{
  border-top: 1px solid var(--g-line);
}

.pc-compare__row--head{
  font-size: 13px;
  font-weight: 600;
  color: var(--g-faint);
  background: var(--g-bg-soft);
}

.pc-compare__row--head .pc-compare__on{
  color: var(--g-green-text);
}

.pc-compare__row--key{
  background: var(--g-green-soft);
}

.pc-compare__row--key .pc-compare__on{
  color: var(--g-green-text);
}

.pc-compare__city{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--g-ink);
}

.pc-compare__dot{
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pc-other);
}

.pc-compare__dot--main{
  background: var(--pc-main);
}

.pc-compare__dot--bought{
  background: var(--pc-bought);
}

/* ---------------------------------------------------------------------------- */
/* 3. Когда нужно */

.pc-cases{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.pc-case{
  padding: 26px;
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius-card);
  background: #ffffff;
}

.pc-case__num{
  margin: 0 0 18px;
  font-family: var(--g-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--pc-main);
}

.pc-case__title{
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.pc-case__text{
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--g-muted);
}

/* ---------------------------------------------------------------------------- */
/* 4. Как включить */

.pc-steps{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.pc-step{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius-card);
  background: #ffffff;
}

.pc-step__num{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--pc-main-soft);
  font-family: var(--g-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--pc-main);
}

.pc-step__title{
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.pc-step__text{
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--g-muted);
}

/* ---------------------------------------------------------------------------- */
/* 5. FAQ — стили общие, в guide.css (.guide-faq) */

/* ---------------------------------------------------------------------------- */
/* 6. Финальный блок */

.pc-final-section{
  border-top: 1px solid var(--g-line);
}

.pc-final{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.pc-final__title{
  flex: 1 1 420px;
  max-width: 22em;
  text-wrap: balance;
}

/* ---------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce){
  .purchased-cities *,
  .purchased-cities *::before,
  .purchased-cities *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media screen and (max-width: 1280px){
  .pc-steps{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 1024px){
  .pc-hero{
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .pc-cases{
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
  }
}

/* Таблица сравнения на телефоне — карточками, подпись колонки над ячейкой */
@media screen and (max-width: 768px){
  .pc-compare__row--head{
    display: none;
  }
  .pc-compare__row{
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 16px 18px;
  }
  .pc-compare__row > [data-label]::before{
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--g-faint);
    content: attr(data-label);
  }
}

@media screen and (max-width: 600px){
  .pc-hero__actions{
    width: 100%;
  }
  .pc-hero__actions .guide__cta{
    width: 100%;
  }
  .pc-card__head,
  .pc-card__switch,
  .pc-cities,
  .pc-card__caption{
    padding-inline: 16px;
  }
  .pc-city{
    gap: 10px;
  }
  .pc-city__price{
    font-size: 16px;
  }
  .pc-steps{
    grid-template-columns: minmax(0, 1fr);
  }
}
