.tc-schem {
  position: relative;
  width: 100%;
  height: 500px;
  background: #ecedee;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  font-family: system-ui, sans-serif;
}

@media (min-width: 768px) {
  .tc-schem {
    height: auto;
    aspect-ratio: 5 / 2;
  }
}
.tc-schem:active { cursor: grabbing; }

/* SVG */
.tc-schem__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Панель кнопок */
.tc-schem__controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.tc-schem__btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: #d6d6d6;
  color: #333;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tc-schem__btn:hover  { background: #c4c4c4; }
.tc-schem__btn:active { background: #b8b8b8; }

.tc-schem__btn--floor.is-active {
  background: #70931a;
  color: #fff;
}
.tc-schem__btn--floor.is-active:hover {
  background: #5e7c15;
}

/* Группа кнопок этажей */
.tc-schem__floors {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Разделитель */
.tc-schem__divider {
  height: 1px;
  background: #c4c4c4;
  margin: 4px 0;
}

/* Название этажа */
.tc-schem__floor-label {
  position: absolute;
  top: 14px;
  left: 16px;
  color: #666;
  font-size: 13px;
  pointer-events: none;
  z-index: 10;
}

/* ── Десктоп ── */
@media (min-width: 768px) {

  /* Панель: по центру правого края */
  .tc-schem__controls {
    bottom: auto;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    gap: 8px;
  }

  /* Кнопки крупнее */
  .tc-schem__btn {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 22px;
  }

  /* Группа этажей — чуть больший зазор */
  .tc-schem__floors {
    gap: 10px;
  }

  /* Название этажа — крупнее и жирнее */
  .tc-schem__floor-label {
    top: 18px;
    left: 20px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
  }
}

/* Индикатор зума */
.tc-schem__zoom-label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  color: #999;
  font-size: 12px;
  pointer-events: none;
  z-index: 10;
}

/* Лоадер */
.tc-schem__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.tc-schem__loader.is-loading {
  opacity: 1;
}
.tc-schem__loader::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: tc-schem-spin 0.7s linear infinite;
}

@keyframes tc-schem-spin {
  to { transform: rotate(360deg); }
}
