/*!
 * SuperSplit core styles. Scope: the `.ss-surface` the library injects into
 * your container. Theme via the --ss-* custom properties (set on .ss-surface).
 */

.ss-surface {
  /* themeable tokens (overridden inline from JS options) */
  --ss-accent: #2f7bff;
  --ss-accent-soft: color-mix(in srgb, var(--ss-accent) 16%, transparent);
  --ss-gap: 9px;
  --ss-pad: 13px;
  --ss-pane-radius: 11px;
  --ss-header-h: 37px;
  --ss-title-ink: #2a2c31;
  --ss-handle-ink: #b9bcc4;

  position: relative;
  width: 100%;
  height: 100%;
  padding: var(--ss-pad);
  overflow: hidden;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}
.ss-surface *,
.ss-surface *::before,
.ss-surface *::after { box-sizing: border-box; }

/* fallback when color-mix is unsupported */
@supports not (color: color-mix(in srgb, red 50%, transparent)) {
  .ss-surface { --ss-accent-soft: rgba(47, 123, 255, 0.16); }
}

/* ---------- Pane ---------- */
.ss-pane {
  position: absolute;
  top: 0; left: 0;
  will-change: transform, width, height;
}
.ss-pane-inner {
  width: 100%; height: 100%;
  border-radius: var(--ss-pane-radius);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: linear-gradient(180deg, var(--ss-body-top, #fbfcfd), var(--ss-body-bot, #eef0f3));
  box-shadow:
    0 0 0 0.5px var(--ss-edge, rgba(20, 24, 40, 0.1)),
    0 1px 2px rgba(20, 24, 40, 0.05);
  display: flex;
  flex-direction: column;
  transform-origin: center;
  transition: box-shadow 0.2s ease;
}
.ss-pane.ss-leaving .ss-pane-inner { opacity: 0; transform: scale(0.93);
  transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.2, 0.7, 0.2, 1); }

.ss-pane.ss-focused { z-index: 3; }
.ss-pane.ss-focused .ss-pane-inner {
  box-shadow:
    0 0 0 2px var(--ss-accent),
    0 0 0 5px var(--ss-accent-soft),
    0 6px 18px -6px var(--ss-accent-soft);
}
.ss-pane.ss-dragging { z-index: 30; }
.ss-pane.ss-dragging .ss-pane-inner {
  box-shadow: 0 0 0 2px var(--ss-accent), 0 18px 40px -10px rgba(20, 24, 40, 0.4);
  opacity: 0.96;
}

.ss-pane-header {
  flex: 0 0 var(--ss-header-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  cursor: grab;
  user-select: none;
  background: var(--ss-header-bg, #f4f5f7);
  border-bottom: 0.5px solid var(--ss-edge, rgba(20, 24, 40, 0.08));
}
.ss-pane-header:active { cursor: grabbing; }

.ss-pane-icon { width: 17px; height: 17px; flex: 0 0 auto; display: grid; place-items: center; color: var(--ss-ink, #7b8089); opacity: 0.85; }
.ss-pane-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ss-pane-title { font-size: 12.5px; font-weight: 650; letter-spacing: -0.01em; color: var(--ss-title-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ss-pane-actions { margin-left: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 1px; }
.ss-pane-handle { flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center; color: var(--ss-handle-ink); }
.ss-pane-handle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.ss-pane-close {
  flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center;
  padding: 0; border: none; background: transparent; border-radius: 6px;
  color: var(--ss-handle-ink); cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, transform 0.08s ease;
}
.ss-pane-close svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; }
.ss-pane-close:hover { background: rgba(229, 72, 77, 0.14); color: #e5484d; }
.ss-pane-close:active { transform: scale(0.86); }
.ss-surface.ss-single .ss-pane-close { display: none; }

.ss-pane-body { flex: 1 1 auto; position: relative; display: grid; place-items: center; min-height: 0; container-type: size; }

/* ---------- Dividers ---------- */
.ss-divider { position: absolute; top: 0; left: 0; z-index: 12; border-radius: 6px; background: transparent; transition: background 0.15s ease; }
.ss-divider.ss-col { cursor: col-resize; }
.ss-divider.ss-row { cursor: row-resize; }
.ss-divider:hover, .ss-divider.ss-active { background: var(--ss-accent-soft); }

/* ---------- Drop zone ---------- */
.ss-dropzone {
  position: absolute; top: 0; left: 0; z-index: 20;
  border-radius: var(--ss-pane-radius);
  background: var(--ss-accent-soft);
  box-shadow: 0 0 0 2px var(--ss-accent) inset;
  opacity: 0; pointer-events: none;
  transition:
    transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
    width 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
    height 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.14s ease;
}
.ss-dropzone.ss-show { opacity: 1; }

/* ---------- Floating drag chip ---------- */
.ss-drag-chip {
  position: fixed; z-index: 9999; top: 0; left: 0;
  display: none; align-items: center; gap: 7px;
  padding: 6px 11px 6px 9px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: 9px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 10px 24px -8px rgba(20, 24, 40, 0.45);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 12.5px; font-weight: 650; color: #2a2c31;
  pointer-events: none; transform: translate(-50%, -140%); white-space: nowrap;
}
.ss-drag-chip.ss-show { display: flex; }
.ss-drag-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }

body.ss-is-dragging { cursor: grabbing; }
body.ss-is-dragging .ss-pane-header { cursor: grabbing; }
