/* Figma screen 136:3295 — layout shell overrides for v2 */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.viscomms-v2 {
  margin: 0;
  background: var(--white-main);
  font-family: var(--font-text);
  line-height: 1;
}

/* Main UI hidden until map session starts (sticky tabs had z-index above startup) */
body.viscomms-v2:not(.viscomms-map-active) #app {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.viscomms-v2.viscomms-map-active,
body.viscomms-v2.viscomms-map-active html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.viscomms-v2.viscomms-map-active #app {
  display: flex !important;
  align-items: stretch;
  justify-content: stretch;
  visibility: visible;
  pointer-events: auto;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: var(--white-main);
  overflow: hidden;
  font-family: var(--font-text);
}

body.viscomms-v2 #app {
  display: none;
}

body.viscomms-v2 .app-scale-slot,
body.viscomms-v2 .app-scale-root {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

body.viscomms-v2 .app-scale-root {
  position: relative;
  transform: none;
}

body.viscomms-v2 .app-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 24px 0 24px 24px;
  min-width: 0;
  min-height: 0;
}

body.viscomms-v2 .canvas-main {
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  padding: 24px;
  box-sizing: border-box;
  background: var(--grey-bg-1);
}

body.viscomms-v2 #canvas-wrap {
  position: relative;
  left: auto;
  top: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: size;
}

body.viscomms-v2 #canvas-aspect {
  position: relative;
  left: auto;
  top: auto;
  right: auto;
  bottom: auto;
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  margin: 0 auto;
  background: var(--white-main);
  border: 0.5px solid var(--grey-bg-2);
  box-sizing: border-box;
}

@supports not (width: 1cqw) {
  body.viscomms-v2 #canvas-aspect {
    width: 100%;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
  }
}

body.viscomms-v2 #canvas-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

body.viscomms-v2 #map-svg {
  display: block;
  width: 100%;
  height: 100%;
}

body.viscomms-v2 #slide-zone-caption {
  display: none;
}

body.viscomms-v2 .panel-shell {
  position: relative;
  flex: 0 0 356px;
  width: 356px;
  min-width: 356px;
  max-width: 356px;
  height: auto;
  align-self: stretch;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding-left: 24px;
}

body.viscomms-v2 #panel {
  position: relative;
  left: auto;
  flex: 1 1 auto;
  width: 284px;
  min-width: 284px;
  max-width: 284px;
  height: auto;
  min-height: 0;
  align-self: stretch;
  margin-right: 24px;
  padding: 0 0 24px;
  box-sizing: border-box;
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  justify-items: stretch;
  gap: 32px;
  background: var(--white-main);
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.viscomms-v2 #panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body.viscomms-v2 .panel-scrollbar {
  position: relative;
  right: auto;
  flex: 0 0 24px;
  width: 24px;
  height: auto;
  align-self: stretch;
  padding: 4px;
  box-sizing: border-box;
}

body.viscomms-v2 .panel-scrollbar.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

body.viscomms-v2 .panel-scrollbar-track {
  position: relative;
  width: 12px;
  height: calc(100% - 8px);
  margin: 0 auto;
  border-radius: 4px;
  touch-action: none;
}

body.viscomms-v2 .panel-scrollbar-thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  min-height: 48px;
  border-radius: 4px;
  background: var(--grey-bg-2);
  cursor: grab;
  will-change: transform;
  touch-action: none;
}

body.viscomms-v2 .panel-scrollbar-thumb.is-dragging {
  cursor: grabbing;
  background: var(--grey-bg-4);
}

body.viscomms-v2 .canvas-main #floating-tools {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 10020;
  display: none;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

/* ── Panel tabs (Создать / Фильтр) ── */

body.viscomms-v2 .panel-page-carousel-wrap {
  position: sticky;
  top: 0;
  z-index: 12000;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--white-main);
}

body.viscomms-v2 .panel-tabs-v2 {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 0;
  box-sizing: border-box;
}

body.viscomms-v2 .panel-tab-v2 {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  color: var(--grey-bg-3);
  padding: 0;
  white-space: nowrap;
}

body.viscomms-v2 .panel-subtitle,
body.viscomms-v2 #service-search,
body.viscomms-v2 #country-search,
body.viscomms-v2 .panel-h2,
body.viscomms-v2 .service-group .panel-h2 {
  font-family: var(--font-text);
}

body.viscomms-v2 .panel-tab-v2.is-active {
  color: var(--black-main);
}

body.viscomms-v2 .panel-tab-v2:hover {
  opacity: 0.85;
}

body.viscomms-v2 .panel-tab-v2:focus-visible {
  outline: 2px solid var(--black-main);
  outline-offset: 2px;
}

/* ── Section typography ── */

body.viscomms-v2 .panel-h1 {
  font-family: var(--font-text);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  color: var(--black-main);
  min-height: 0;
  margin: 0;
}

body.viscomms-v2 .panel-h2,
body.viscomms-v2 .settings-row-title.panel-h2 {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: var(--black-main);
}

body.viscomms-v2 .panel-subtitle {
  margin: 0;
  padding: 0;
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: var(--black-main);
}

body.viscomms-v2 .countries-added-block {
  display: flex;
  flex-direction: column;
  width: 100%;
}

body.viscomms-v2 #countries-added-label {
  padding-bottom: 16px;
}

body.viscomms-v2 .panel-section {
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

body.viscomms-v2 #countries-section,
body.viscomms-v2 #services-section,
body.viscomms-v2 #settings-section,
body.viscomms-v2 #design-section,
body.viscomms-v2 #config-section-new {
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 24px;
}

body.viscomms-v2 #design-section {
  width: 100%;
}

body.viscomms-v2 .service-group {
  gap: 16px;
}

body.viscomms-v2 .panel-divider {
  width: 100%;
  margin: 0;
  border: none;
  height: 0;
  background: transparent;
  position: relative;
}

body.viscomms-v2 .panel-divider::before {
  content: '';
  display: block;
  height: 1px;
  background: url('../assets/figma/divider.svg') center / 284px 1px no-repeat;
  opacity: 1;
}

body.viscomms-v2 .panel-divider--inset,
body.viscomms-v2 .panel-divider--section-top {
  display: none;
}

body.viscomms-v2 #panel.panel-mode-statistics .panel-divider {
  display: none !important;
}

/* ── Search fields (Paste Small) ── */

body.viscomms-v2 #country-search,
body.viscomms-v2 #service-search {
  padding: 8px 12px;
  border: 1px solid var(--grey-bg-2);
  border-radius: var(--radius-md);
  background: var(--white-main);
  color: var(--dark-grey);
  font-size: 12px;
  line-height: 1;
}

body.viscomms-v2 #country-search::placeholder,
body.viscomms-v2 #service-search::placeholder {
  color: var(--dark-grey);
  font-size: 12px;
}

body.viscomms-v2 #country-search:not(:disabled):hover,
body.viscomms-v2 #service-search:not(:disabled):hover {
  border-color: var(--grey-bg-4);
  color: var(--black-main);
}

body.viscomms-v2 #country-search:disabled,
body.viscomms-v2 #service-search:disabled {
  background: var(--white-main);
  border-color: var(--grey-bg-1);
  color: var(--grey-bg-4);
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: var(--grey-bg-4);
}

body.viscomms-v2 #country-search:disabled::placeholder,
body.viscomms-v2 #service-search:disabled::placeholder {
  color: var(--grey-bg-4);
}

/* ── Country list rows ── */

body.viscomms-v2 #active-countries-list {
  gap: 0;
}

/* Figma 208:2160 — row 284×36, gap 8, py 6 */
body.viscomms-v2 .country-item {
  display: flex;
  width: 100%;
  max-width: 284px;
  min-height: 36px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  box-sizing: border-box;
  overflow: visible;
  background: var(--white-main);
}

body.viscomms-v2 .country-item-count {
  display: none;
}

body.viscomms-v2 .country-item-name-text {
  flex: 1 1 132px;
  max-width: 132px;
  min-width: 0;
  color: var(--black-main);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  word-break: break-word;
  cursor: pointer;
}

/* Keep flag slot strictly equal to action buttons (24x24) */
body.viscomms-v2 .country-item-flag-slot {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  max-width: 24px;
  max-height: 24px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--grey-bg-1);
  box-shadow: none;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.viscomms-v2 .country-item-flag-slot .country-item-flag {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

body.viscomms-v2 .country-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

body.viscomms-v2 .country-action-group {
  display: flex;
  align-items: center;
  width: 48px;
  height: 24px;
  flex-shrink: 0;
  background: var(--white-main);
  border-radius: 6px;
  position: relative;
}

body.viscomms-v2 .country-action-group::after {
  content: '';
  position: absolute;
  left: 24px;
  top: 4px;
  width: 0;
  height: 16px;
  border-left: 0.5px solid var(--grey-bg-2);
  pointer-events: none;
}

/* Figma 188:2315 / 133:485 — Default / Hover / Active (24×24, radius 6) */
body.viscomms-v2 .country-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  max-width: 24px;
  max-height: 24px;
  padding: 6px;
  box-sizing: border-box;
  border: none;
  border-radius: 6px;
  background: var(--white-main);
  color: var(--grey-bg-6);
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* Hard guard against legacy app.css sizes in v2 */
body.viscomms-v2 .country-item .country-item-flag-slot,
body.viscomms-v2 .country-item .country-action-btn {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
}

body.viscomms-v2 .country-action-btn:hover {
  background: var(--grey-bg-2);
  color: var(--black-main);
}

body.viscomms-v2 .country-action-btn:active {
  background: var(--grey-bg-2);
  color: var(--black-main);
  box-shadow: inset 0 0 0 1px var(--white-main);
}

body.viscomms-v2 .country-action-group .country-action-btn {
  background: transparent;
}

body.viscomms-v2 .country-action-group .country-action-btn:hover {
  background: var(--grey-bg-2);
  color: var(--black-main);
}

body.viscomms-v2 .country-action-group .country-action-btn:active {
  background: var(--grey-bg-2);
  color: var(--black-main);
  box-shadow: inset 0 0 0 1px var(--white-main);
}

body.viscomms-v2 .country-action-btn svg,
body.viscomms-v2 .country-action-btn .country-action-icon {
  width: 12px;
  height: 12px;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
  transition: filter 0.15s ease;
}

body.viscomms-v2 .country-action-btn svg path,
body.viscomms-v2 .country-action-btn svg g {
  fill: currentColor;
}

body.viscomms-v2 .country-action-btn svg [stroke] {
  stroke: currentColor;
}

body.viscomms-v2 .country-action-btn:hover .country-action-icon,
body.viscomms-v2 .country-action-btn:active .country-action-icon,
body.viscomms-v2 .country-action-btn:hover svg,
body.viscomms-v2 .country-action-btn:active svg {
  filter: brightness(0);
}

/* Figma 138:1824 — accent on: hover-like bg persists until toggle off */
body.viscomms-v2 .country-action-btn.accent-toggle.is-accent {
  background: var(--grey-bg-2);
  color: var(--black-main);
}

body.viscomms-v2 .country-action-btn.accent-toggle.is-accent .country-action-icon,
body.viscomms-v2 .country-action-btn.accent-toggle.is-accent svg {
  filter: brightness(0);
}

body.viscomms-v2 .country-action-btn.accent-toggle.is-accent:hover {
  background: var(--grey-bg-2);
  color: var(--black-main);
}

body.viscomms-v2 .country-action-btn.accent-toggle.is-accent:active {
  background: var(--grey-bg-2);
  color: var(--black-main);
  box-shadow: inset 0 0 0 1px var(--white-main);
}

body.viscomms-v2 .country-action-btn.remove:active,
body.viscomms-v2 .country-action-btn.accent-toggle:active {
  background: var(--grey-bg-2);
  color: var(--black-main);
  box-shadow: inset 0 0 0 1px var(--white-main);
}

body.viscomms-v2 .country-action-group .country-action-btn.edit {
  border-radius: 6px 0 0 6px;
}

body.viscomms-v2 .country-action-group .country-action-btn.reset {
  border-radius: 0 6px 6px 0;
}

body.viscomms-v2 #no-countries {
  font-size: 12px;
  color: var(--grey-bg-6);
}

/* ── Service palette 6×2 grid ── */

body.viscomms-v2 #service-palette,
body.viscomms-v2 #custom-palette {
  gap: 4px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: auto;
}

body.viscomms-v2 #custom-palette {
  grid-template-rows: auto;
}

body.viscomms-v2 .svc-btn {
  aspect-ratio: 1;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--grey-bg-1);
  border: 1px solid transparent;
  min-height: 40px;
  box-sizing: border-box;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.viscomms-v2 .svc-btn img,
body.viscomms-v2 .svc-btn svg,
body.viscomms-v2 .svc-btn .svc-btn-icon {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px;
  max-height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}

body.viscomms-v2 .svc-btn:hover {
  background: var(--grey-bg-2);
}

body.viscomms-v2 .svc-btn:active {
  background: var(--grey-bg-2);
  border-color: var(--grey-bg-6);
}

body.viscomms-v2 .svc-btn.active {
  background: var(--grey-bg-2);
  border: 1px solid var(--grey-bg-6);
  box-shadow: none;
}

body.viscomms-v2 #custom-palette .svc-btn:first-child {
  background: var(--grey-bg-1);
  cursor: pointer;
}

body.viscomms-v2 #custom-palette .svc-btn:first-child:hover {
  background: var(--grey-bg-1);
}

body.viscomms-v2 #custom-palette .svc-btn:first-child:hover .svc-add-tile-inner {
  background: var(--grey-bg-4);
}

body.viscomms-v2 #custom-palette .svc-btn:first-child:active .svc-add-tile-inner {
  background: var(--grey-bg-5);
}

body.viscomms-v2 #custom-palette .svc-btn:first-child .svc-add-icon,
body.viscomms-v2 #custom-palette .svc-btn:first-child > img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px;
  max-height: 20px;
}

body.viscomms-v2 .svc-add-tile {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

body.viscomms-v2 .svc-add-tile-inner {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--grey-bg-3);
  padding: 8px;
  box-sizing: border-box;
}

body.viscomms-v2 #custom-services-block {
  margin-bottom: 0;
}

/* ── Selectors (134px columns, 2-col grid like Figma) ── */

body.viscomms-v2 #settings-only-grid,
body.viscomms-v2 #design-controls-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 284px;
}

body.viscomms-v2 .annotation-options-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  max-width: 284px;
}

body.viscomms-v2 .option-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 134px;
  max-width: 134px;
  flex: 0 0 134px;
  gap: 0;
  position: relative;
}

body.viscomms-v2 .option-block-wide {
  width: 284px;
  max-width: 284px;
  flex: 0 0 284px;
}

body.viscomms-v2 .option-block .panel-h2 {
  width: 100%;
  margin: 0 0 16px;
  line-height: 1.2;
  flex-shrink: 0;
}

body.viscomms-v2 .option-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--grey-bg-2);
  border-radius: var(--radius-md);
  background: var(--white-main);
  color: var(--dark-grey);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  min-height: 30px;
  box-sizing: border-box;
  cursor: pointer;
  margin-top: auto;
  flex-shrink: 0;
}

body.viscomms-v2 .option-control span:first-child {
  flex: 1;
  text-align: left;
}

body.viscomms-v2 .option-arrow {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

body.viscomms-v2 .option-arrow svg {
  display: none;
}

body.viscomms-v2 .option-arrow::after {
  content: '';
  display: block;
  width: 7px;
  height: 12px;
  flex-shrink: 0;
  background: url('../assets/figma/chevron-down.svg') center / contain no-repeat;
  transform: rotate(-90deg);
  transition: transform 0.15s ease;
}

body.viscomms-v2 .option-control[aria-expanded="true"] {
  background: var(--grey-bg-1);
  border-color: transparent;
  color: var(--black-main);
}

body.viscomms-v2 .option-control[aria-expanded="true"] .option-arrow {
  transform: none;
}

body.viscomms-v2 .option-control[aria-expanded="true"] .option-arrow::after {
  transform: rotate(90deg);
}

body.viscomms-v2 .option-dropdown {
  top: calc(100% + 4px);
  padding-top: 0;
  border-radius: var(--radius-md);
  background: var(--grey-bg-1);
  box-shadow: none;
}

body.viscomms-v2 .option-dropdown button {
  padding: 8px 12px;
  border-bottom: 1px solid var(--grey-bg-2);
  color: var(--grey-bg-6);
  font-size: 12px;
  line-height: 1;
  opacity: 1;
}

body.viscomms-v2 .option-dropdown.open {
  display: flex;
  flex-direction: column;
}

body.viscomms-v2 .option-dropdown button:last-child {
  border-bottom: none;
}

body.viscomms-v2 .option-dropdown button:hover {
  color: var(--black-main);
  background: transparent;
}

body.viscomms-v2 #settings-section,
body.viscomms-v2 #design-section {
  gap: 24px;
}

body.viscomms-v2 #design-section #colors-settings {
  margin-top: 0;
}

body.viscomms-v2 #settings-only-grid {
  gap: 24px;
}

body.viscomms-v2 .settings-block {
  gap: 24px;
}

body.viscomms-v2 .panel-design-heading {
  font-size: 20px;
  font-weight: 500;
  color: var(--black-main);
  margin: 0;
}

body.viscomms-v2 #design-controls-block {
  gap: 32px;
  overflow: visible;
}

body.viscomms-v2 #design-controls-block > .annotation-options-row + .design-slider-block,
body.viscomms-v2 #design-controls-block > .design-slider-block + .design-slider-block {
  margin-top: 0;
}

body.viscomms-v2 .design-slider-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  max-width: 284px;
  overflow: visible;
}

body.viscomms-v2 .design-slider-heading {
  width: 100%;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: var(--black-main);
}

body.viscomms-v2 .design-slider-range {
  position: relative;
  width: 284px;
  max-width: 100%;
  height: 62px;
  flex-shrink: 0;
  overflow: visible;
  box-sizing: border-box;
  padding: 0;
}

body.viscomms-v2 .design-slider-value {
  display: none;
}

body.viscomms-v2 .design-slider-extent {
  position: absolute;
  bottom: 0;
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  color: var(--black-main);
  pointer-events: none;
}

body.viscomms-v2 .design-slider-extent--min {
  left: 0;
}

body.viscomms-v2 .design-slider-extent--max {
  right: 0;
  text-align: right;
}

/* Figma 132:1345 — Union 28×24, fixed shape (not stretched by content) */
body.viscomms-v2 .design-slider-tooltip {
  position: absolute;
  top: 1px;
  left: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  height: 24px;
  padding: 0 0 5px;
  box-sizing: border-box;
  border: none;
  background: url('../assets/figma/slider-tooltip.svg') center / 28px 24px no-repeat;
  color: var(--black-main);
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 2;
}

body.viscomms-v2 .design-slider-block.is-dragging .design-slider-tooltip {
  opacity: 1;
  visibility: visible;
}

body.viscomms-v2 .design-slider-input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 8px;
  top: 28px;
  width: 268px;
  max-width: calc(100% - 16px);
  height: 20px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

body.viscomms-v2 .design-slider-input:focus {
  outline: none;
}

body.viscomms-v2 .design-slider-input:focus-visible {
  outline: 2px solid var(--black-main);
  outline-offset: 2px;
}

body.viscomms-v2 .design-slider-input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    var(--pink) 0%,
    var(--pink) var(--slider-pct, 50%),
    var(--grey-bg-3) var(--slider-pct, 50%),
    var(--grey-bg-3) 100%
  );
}

body.viscomms-v2 .design-slider-input::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: var(--grey-bg-3);
}

body.viscomms-v2 .design-slider-input::-moz-range-progress {
  height: 4px;
  border-radius: 4px;
  background: var(--pink);
}

body.viscomms-v2 .design-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  border: 4px solid var(--pink-dark);
  background: var(--white-main);
  box-sizing: border-box;
  cursor: pointer;
}

body.viscomms-v2 .design-slider-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid var(--pink-dark);
  background: var(--white-main);
  box-sizing: border-box;
  cursor: pointer;
}

body.viscomms-v2 .design-slider-block.is-dragging .design-slider-input::-webkit-slider-thumb {
  box-shadow: 0 0 0 2px rgba(248, 173, 209, 0.35);
}

/* ── Color tiles 92×72 ── */

body.viscomms-v2 .color-picker-row-wrap {
  display: grid;
  grid-template-columns: repeat(3, 92px);
  gap: 4px;
  width: 284px;
  max-width: 284px;
}

body.viscomms-v2 .color-picker-row-wrap .color-picker-row {
  flex: none;
  max-width: 92px;
  min-width: 92px;
}

body.viscomms-v2 .color-picker-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  width: 92px;
  height: 72px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--grey-bg-1);
  box-sizing: border-box;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font-family: var(--font-text);
}

body.viscomms-v2 .color-picker-row__name {
  font-size: 10px !important;
  font-weight: 400;
  line-height: 1;
  opacity: 1 !important;
  color: var(--black-main);
}

body.viscomms-v2 .color-picker-row__hex {
  font-size: 10px !important;
  font-weight: 400;
  line-height: 1;
  opacity: 1 !important;
  letter-spacing: 0.02em;
  color: var(--black-main);
}

body.viscomms-v2 .color-picker-group {
  gap: 16px;
}

body.viscomms-v2 #colors-settings {
  gap: 24px;
}

/* ── Export buttons (Figma Settings Grey / Accent Pink Medium) ── */

body.viscomms-v2 .panel-export-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  width: 284px;
  max-width: 284px;
}

body.viscomms-v2 #panel .panel-export-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-height: 32px;
  padding: 8px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.viscomms-v2 #panel .panel-export-btn.panel-export-btn--secondary {
  flex: 0 0 166px;
  width: 166px;
  max-width: 166px;
  border: 1px solid var(--grey-bg-3);
  background: transparent;
  color: var(--grey-bg-6);
}

body.viscomms-v2 #panel .panel-export-btn.panel-export-btn--secondary:hover {
  color: var(--dark-grey);
  border-color: var(--grey-bg-6);
}

body.viscomms-v2 #panel .panel-export-btn.panel-export-btn--secondary:active {
  background: var(--grey-bg-2);
  border-color: transparent;
  color: var(--black-main);
}

body.viscomms-v2 #panel .panel-export-btn.panel-export-btn--primary {
  flex: 0 0 108px;
  width: 108px;
  max-width: 108px;
  border: none;
  background: var(--pink);
  color: var(--black-main);
  font-weight: 400;
}

body.viscomms-v2 #panel .panel-export-btn.panel-export-btn--primary:hover {
  background: var(--pink-dark);
  color: var(--dark-grey);
}

body.viscomms-v2 #panel .panel-export-btn.panel-export-btn--primary:active {
  background: var(--pink-dark-2);
  color: var(--black-main);
}

body.viscomms-v2 #save-as-section {
  display: none !important;
}

body.viscomms-v2 #upload-section,
body.viscomms-v2 #colors-section,
body.viscomms-v2 #connector-section {
  display: none !important;
}

/* ── Statistics mode ── */

body.viscomms-v2 #stats-section {
  width: 100%;
  gap: 24px;
}

/* Override legacy absolute panel placement */
body.viscomms-v2 #panel.panel-mode-statistics {
  width: 284px;
  left: auto;
}

body.viscomms-v2 #panel.panel-mode-statistics .panel-page-carousel-wrap {
  display: block;
}
