/* ============================================================
   Márti & Keve – választó widgetek
   1) Nyelvválasztó (.mk-lang) – a chooser.js tölti fel a
      [data-lang-switch] konténereket; VÉGLEGES elem.
   2) Layout- és színválasztó (.mkch-*) – IDEIGLENES demóeszköz,
      a végleges oldalról teljesen eltávolítható.
   ============================================================ */

/* ── Nyelvválasztó ──────────────────────────────────────── */
.mk-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mk-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  opacity: .62;
  transition: opacity .2s ease, border-color .2s ease, background .2s ease;
}
.mk-lang-btn svg {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}
.mk-lang-btn:hover { opacity: 1; }
.mk-lang-btn.is-active {
  opacity: 1;
  border-color: rgba(var(--c-primary-rgb), .45);
  background: rgba(var(--c-primary-rgb), .08);
}

/* ── Lebegő választógomb ────────────────────────────────── */
.mkch-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--c-on-primary);
  background: var(--grad-primary);
  box-shadow: 0 10px 30px rgba(var(--c-primary-rgb), .45);
  transition: transform .17s ease, box-shadow .17s ease;
}
.mkch-toggle:hover {
  transform: translateY(-3px) rotate(12deg);
  box-shadow: 0 14px 36px rgba(var(--c-primary-rgb), .55);
}
.mkch-toggle svg { width: 26px; height: 26px; }

/* ── Panel ──────────────────────────────────────────────── */
.mkch-panel {
  position: fixed;
  right: 18px;
  bottom: 84px;
  z-index: 1100;
  width: min(360px, calc(100vw - 36px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-line);
  box-shadow: 0 26px 70px rgba(0,0,0,.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.97);
  transition: opacity .17s ease, transform .17s ease, visibility .17s ease;
}
.mkch-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mkch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
}
.mkch-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: .02em;
}
.mkch-note {
  font-size: .7rem;
  color: var(--c-muted);
  padding: 0 18px 8px;
}
.mkch-close {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--c-muted);
  transition: background .2s ease, color .2s ease;
}
.mkch-close:hover { background: var(--c-surface-alt); color: var(--c-ink); }
.mkch-close svg { width: 13px; height: 13px; }

.mkch-body {
  overflow-y: auto;
  padding: 0 18px 18px;
  overscroll-behavior: contain;
}

.mkch-label {
  display: block;
  margin: 14px 0 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* Layout rács */
.mkch-layouts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.mkch-layout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  text-align: left;
  font-size: .78rem;
  line-height: 1.25;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.mkch-layout:hover { border-color: var(--c-primary); transform: translateY(-1px); }
.mkch-layout.is-active {
  border-color: var(--c-primary);
  background: rgba(var(--c-primary-rgb), .08);
}
.mkch-layout-num {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--c-on-primary);
  background: var(--grad-primary);
}
.mkch-layout.is-active .mkch-layout-num { box-shadow: 0 0 0 2px rgba(var(--c-primary-rgb), .3); }

/* Szín rács */
.mkch-palettes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.mkch-palette {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px 6px;
  border-radius: 10px;
  border: 1px solid var(--c-line);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.mkch-palette:hover { border-color: var(--c-primary); transform: translateY(-1px); }
.mkch-palette.is-active {
  border-color: var(--c-primary);
  background: rgba(var(--c-primary-rgb), .08);
}
.mkch-swatch {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.mkch-palette-name {
  font-size: .58rem;
  line-height: 1.2;
  text-align: center;
  color: var(--c-muted);
}
.mkch-palette.is-active .mkch-palette-name { color: var(--c-ink); font-weight: 600; }

@media (max-width: 480px) {
  .mkch-toggle { right: 14px; bottom: 14px; width: 48px; height: 48px; }
  .mkch-panel { right: 14px; bottom: 72px; }
  .mkch-palettes { grid-template-columns: repeat(3, 1fr); }
}
