/* ─────────────────────────────────────────────────────────────────────
 * b2b-portal-music-style.css — Music Style модал (круговая версия Energy).
 *
 * FIX1:
 *   • #bzp-toast z-index >= backdrop (10001) — чтобы тосты не прятались за блюром
 *   • модальная шапка/цвета сохранены
 *
 * Классы с префиксом bzp-ms-* — не конфликтуют с portal styles.
 * ───────────────────────────────────────────────────────────────────── */

/* FIX1: toast поверх модала */
#bzp-toast {
  z-index: 10100 !important;
}

/* ── Backdrop + Modal shell ─────────────────────────────────────── */

.bzp-ms-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.bzp-ms-modal {
  width: 100%;
  max-width: 900px;
  max-height: calc(100vh - 40px);
  background: #1a1a1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--bzp-text, #eaeaea);
}

.bzp-ms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.bzp-ms-title { font-size: 16px; font-weight: 600; }

.bzp-ms-close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}
.bzp-ms-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.05); }

/* ── Tabs ─────────────────────────────────────────────────────── */

.bzp-ms-tabs {
  display: flex;
  gap: 2px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow-x: auto;
  scrollbar-width: none;
}
.bzp-ms-tabs::-webkit-scrollbar { display: none; }

.bzp-ms-tab {
  background: none;
  border: none;
  color: inherit;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  opacity: 0.6;
  white-space: nowrap;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bzp-ms-tab:hover:not(.is-disabled) { opacity: 1; }
.bzp-ms-tab.is-active { opacity: 1; }
.bzp-ms-tab.is-active::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px; bottom: 0;
  height: 2px;
  background: var(--bzp-accent, #00ff91);
  border-radius: 2px 2px 0 0;
}
.bzp-ms-tab.is-disabled { cursor: not-allowed; opacity: 0.35; }

.bzp-ms-soon {
  font-size: 9px;
  text-transform: uppercase;
  background: rgba(255, 180, 32, 0.15);
  color: #ffb020;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

/* ── Body ─────────────────────────────────────────────────────── */

.bzp-ms-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* ── Coming-soon placeholder ─────────────────────────────────── */

.bzp-ms-soon-wrap {
  text-align: center;
  padding: 60px 20px;
}
.bzp-ms-soon-icon { font-size: 44px; opacity: 0.4; margin-bottom: 14px; }
.bzp-ms-soon-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.bzp-ms-soon-hint { font-size: 13px; opacity: 0.5; max-width: 340px; margin: 0 auto; line-height: 1.5; }

/* ── Energy tab: hint + status ───────────────────────────────── */

.bzp-ms-hint {
  font-size: 12px;
  opacity: 0.6;
  line-height: 1.5;
  margin-bottom: 14px;
}
.bzp-ms-hint code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

.bzp-ms-status {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 14px;
  font-weight: 500;
}
.bzp-ms-status--active   { background: rgba(0, 255, 145, 0.15); color: #3ddc84; }
.bzp-ms-status--disabled { background: rgba(255, 255, 255, 0.08); color: #888; }
.bzp-ms-status--error    { background: rgba(255, 80, 80, 0.15); color: #ff6b6b; }

/* ═══════════════════════════════════════════════════════════════
 * ENERGY TAB LAYOUT — 2 columns
 * ═══════════════════════════════════════════════════════════════ */

.bzp-ms-layout {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.5fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 16px;
}

/* ── Left panel ──────────────────────────────────── */

.bzp-ms-panel-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bzp-ms-selected {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  text-align: center;
}

.bzp-ms-sel-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.45;
  margin-bottom: 6px;
}

.bzp-ms-sel-letter {
  font-size: 36px;
  font-weight: 800;
  color: #3DD17A;
  line-height: 1;
  margin: 4px 0;
  transition: color 0.2s;
}

.bzp-ms-sel-time {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

.bzp-ms-energy-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.45;
  margin-left: 4px;
}

.bzp-ms-energy-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bzp-ms-energy-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.bzp-ms-energy-opt:hover {
  background: rgba(255, 255, 255, 0.06);
}
.bzp-ms-energy-opt.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}
.bzp-ms-energy-opt input[type=radio] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bzp-ms-energy-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3);
}

.bzp-ms-energy-text { flex: 1; min-width: 0; }
.bzp-ms-energy-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.bzp-ms-energy-range { font-size: 11px; opacity: 0.55; font-variant-numeric: tabular-nums; }

/* ── Right panel: circle + controls ────────────────────────── */

.bzp-ms-panel-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.bzp-ms-circle-wrap {
  width: 100%;
  max-width: 420px;   /* FIX1: немного крупнее для читаемости крупных меток */
  aspect-ratio: 1 / 1;
  position: relative;
}

#bzp-ms-svg {
  width: 100%;
  height: 100%;
  touch-action: none;
}

.bzp-ms-draggable-node { transition: fill 0.15s; }
.bzp-ms-draggable-node:hover { fill: #7A68B0 !important; }

.bzp-ms-circle-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

.bzp-ms-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  color: #eaeaea;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.bzp-ms-circle-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
}
.bzp-ms-circle-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.bzp-ms-circle-count {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: center;
}

/* ── Error + actions ───────────────────────────────────────── */

.bzp-ms-err {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 6px;
  color: #ff8080;
  font-size: 12px;
}

.bzp-ms-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 720px) {
  .bzp-ms-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .bzp-ms-circle-wrap { max-width: 360px; margin: 0 auto; }
  .bzp-ms-modal       { max-width: 100%; }
  .bzp-ms-tab         { padding: 10px 10px; font-size: 12px; }
  .bzp-ms-body        { padding: 16px; }
}
