/* v100, часть wizard: несколько жанров и галерей в мастере сайта, фильтр портфолио на сайте, приветствие.
   Подключается в кабинете (_head.html) и на сайте фотографа, если в портфолио есть фильтр (site/page.html). */

/* ---------- Общее: длинные названия в карточках — 2 строки и «…» */
.swz-clamp, .swz b.swz-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  overflow-wrap: anywhere; white-space: normal; text-overflow: ellipsis; }
.swz-d-t { min-width: 0; }
.swz-d-t b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.g-card h3 { overflow-wrap: anywhere; }

/* ---------- А. Жанры: множественный выбор */
.swz-gset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 10px; }
.swz-gset > legend { padding: 0; margin-bottom: 2px; }
.swz-ghint, .swz-gset .swz-pf-h { margin: 0; font-size: 14px; }
.swz-gw { position: relative; min-width: 0; }
.swz-gw .swz-g { height: 100%; box-sizing: border-box; grid-template-columns: auto minmax(0, 1fr); }
.swz-g-t { min-width: 0; display: block; }
.swz-g-h { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.swz-g-h b { flex: 1 1 auto; min-width: 0; }
.swz-prim { display: none; flex: 0 0 auto; white-space: nowrap; padding: 2px 9px; border-radius: 999px; background: var(--blue); color: #fff;
  font-size: 12px; font-weight: 600; line-height: 1.5; margin-top: 1px; }
.swz-gw.is-prim .swz-prim { display: inline-block; }
button.swz-mk { display: none; position: absolute; left: 74px; bottom: 4px; min-height: 44px; padding: 0 8px; font-size: 13.5px; color: var(--blue); }
.swz-gw.is-on:not(.is-prim) .swz-g { padding-bottom: 46px; }
.swz-gw.is-on:not(.is-prim) button.swz-mk { display: inline-flex; align-items: center; }
.swz-gw.is-dim .swz-g, .swz-gal.is-dim { opacity: .5; }
.swz-gw.is-dim .swz-g:hover, .swz-gal.is-dim:hover { opacity: .65; }
.swz-lim { margin: 0; min-height: 1.4em; color: #A15C00; font-size: 14px; font-weight: 500; }
.swz-lim:empty { min-height: 0; }

/* ---------- Б. Галереи портфолио в мастере */
.swz-gal { grid-template-columns: 56px minmax(0, 1fr) auto; }
.swz-gal-t { min-width: 0; display: block; }
.swz-gal b.swz-clamp { white-space: normal; line-height: 1.3; }
.swz-num { min-width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  color: #fff; background: var(--blue); }
.swz-num:empty { visibility: hidden; }
.swz-gal.is-on { border-color: var(--blue); }

/* ---------- Б. Редактор блока «Портфолио» (раздел «Сайт») */
.lbl-like { display: block; font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.pfg-h { display: block; margin-bottom: 8px; }
.pfg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-height: 360px; overflow-y: auto; overflow-x: hidden; min-width: 0; }
.pfg-i { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.pfg-i.is-on { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 5%, var(--surface)); }
.pfg-i.is-dim { opacity: .55; }
.pfg-i label { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.pfg-i input { flex: 0 0 auto; width: 18px; height: 18px; }
.pfg-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfg-i small { color: var(--graphite); flex: 0 0 auto; }
.pfg-mv { display: flex; gap: 4px; flex: 0 0 auto; }
.pfg-mv .btn { min-width: 40px; min-height: 40px; padding: 0; }
.pfg-i:not(.is-on) .pfg-mv { visibility: hidden; }
.pfg-lim { margin: 6px 0 0; color: #A15C00; font-size: 14px; }
.pfg-lim:empty { display: none; }

/* ---------- В. Связка мастеров: карточка «что дальше» */
.wlc-next { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 22px 0 4px; padding: 16px;
  border: 1.5px solid color-mix(in srgb, var(--blue) 35%, var(--line)); border-radius: var(--r-lg); background: color-mix(in srgb, var(--blue) 5%, var(--surface));
  color: var(--ink); text-decoration: none; }
.wlc-next:hover { border-color: var(--blue); }
.wlc-next.hl { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.wlc-next.off { opacity: .7; cursor: not-allowed; }
.wlc-next-i { font-size: 28px; line-height: 1; text-align: center; }
.wlc-next-t b { display: block; font-size: 16px; }
.wlc-next-t small { display: block; color: var(--graphite); font-size: 13.5px; margin-top: 2px; }
.wlc-next-go { font-size: 20px; color: var(--blue); }

/* ---------- В. Экран приветствия */
.wlc { max-width: 880px; margin: 8px auto 0; }
.wlc-h { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; margin: 0 0 8px; overflow-wrap: anywhere; }
.wlc-sub { color: var(--graphite); font-size: 17px; margin: 0 0 24px; }
.wlc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wlc-card { position: relative; display: grid; align-content: start; gap: 8px; min-height: 210px; padding: 24px 24px 56px; border: 1.5px solid var(--line);
  border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.wlc-card:hover { border-color: var(--blue); box-shadow: 0 6px 24px rgba(20, 40, 80, .08); transform: translateY(-1px); }
a.wlc-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.wlc-card-i { font-size: 40px; line-height: 1; }
.wlc-card-h { font-size: 21px; }
.wlc-card-t { color: var(--graphite); font-size: 15px; line-height: 1.5; }
.wlc-card-go { position: absolute; right: 22px; bottom: 18px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-size: 18px; }
.wlc-card.off { background: var(--paper); cursor: not-allowed; padding-bottom: 24px; }
.wlc-card.off .wlc-card-i, .wlc-card.off .wlc-card-h, .wlc-card.off .wlc-card-t { opacity: .55; }
.wlc-why { display: block; margin-top: 4px; padding: 10px 12px; border-radius: var(--r); background: color-mix(in srgb, #E8A33D 14%, var(--surface));
  border: 1px solid color-mix(in srgb, #E8A33D 45%, var(--line)); font-size: 14px; }
.wlc-card.is-done { border-color: color-mix(in srgb, #2E9E5B 45%, var(--line)); }
.wlc-ok { display: inline-block; font-size: 13px; font-weight: 600; color: #1F7A45; white-space: nowrap; }
.wlc-skip { text-align: center; margin: 24px 0 0; }
.wlc-skip a { display: inline-flex; align-items: center; min-height: 44px; color: var(--graphite); }

/* ---------- В. «С чего начать» на «Галереях» */
.wlc-list { margin: 0 0 20px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--line)); border-radius: var(--r-lg);
  background: linear-gradient(135deg, #F7FAFF, #EEF3FB); }
.wlc-list-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wlc-list-top h2 { font-size: 18px; margin: 0; }
.wlc-prog { font-size: 13px; font-weight: 600; color: var(--blue); background: var(--surface); border-radius: 999px; padding: 2px 10px; }
.wlc-list-top form { margin: 0 0 0 auto; }
.wlc-list-top .linkish { min-height: 44px; font-size: 14px; }
.wlc-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--blue) 14%, var(--surface)); overflow: hidden; margin: 6px 0 12px; }
.wlc-bar span { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.wlc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wlc-steps li > a, .wlc-steps li.done { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.wlc-steps li > a:hover { border-color: var(--blue); }
.wlc-st { flex: 1 1 auto; min-width: 0; }
.wlc-ck { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: 2px solid color-mix(in srgb, var(--blue) 45%, var(--line)); display: grid; place-items: center;
  font-size: 13px; font-weight: 700; }
.wlc-steps li.done { color: var(--graphite); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.wlc-steps li.done .wlc-st { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--graphite) 50%, transparent); }
.wlc-steps li.done .wlc-ck { background: #2E9E5B; border-color: #2E9E5B; color: #fff; }
.wlc-go { color: var(--blue); }

/* ---------- В. «С чего начать» в боковой панели */
.side-help { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px; color: var(--graphite); text-decoration: none; font-size: 14px; }
.side-help:hover, .side-help[aria-current] { color: var(--blue-deep, var(--blue)); }

@media (max-width: 860px) {
  .wlc-steps { grid-template-columns: 1fr 1fr; }
  .side-help { min-width: 44px; min-height: 44px; justify-content: center; font-size: 18px; }
  .side-help-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 600px) {
  .swz-genres { grid-template-columns: 1fr; }
  .wlc-cards { grid-template-columns: 1fr; }
  .wlc-card { min-height: 0; padding: 20px 20px 56px; }
  .wlc-card.off { padding-bottom: 20px; }
  .wlc-steps { grid-template-columns: 1fr; }
  .wlc-list { padding: 14px; }
}

/* ---------- Б. Сайт фотографа: кнопки фильтра портфолио (переменные темы сайта) */
.b-portfolio a[data-lb][hidden] { display: none !important; }
.pf-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 24px; }
.pf-filter[hidden] { display: none; }
.pf-filter.is-center { justify-content: center; }
.pf-filter button { flex: 0 0 auto; max-width: 22em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 500 14px/1 var(--text); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s; }
.pf-filter button:hover { border-color: var(--accent); }
.pf-filter button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
@media (max-width: 700px) {
  .pf-filter, .pf-filter.is-center { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .pf-filter::-webkit-scrollbar { display: none; }
  .pf-filter button { max-width: 70vw; }
}
