/* SkillsAtWill Labs — saw-labs.css v3.1
   All rules use !important to override BuddyBoss & Elementor theme styles.
   Fonts are loaded via wp_enqueue_style in the plugin PHP. */

/* ── Animations ─────────────────────────────────────────────────────────────── */
@keyframes sawlabs-deviceIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes sawlabs-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes sawlabs-slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Root mount point reset ─────────────────────────────────────────────────── */
.saw-labs-root,
.saw-labs-root * {
  box-sizing: border-box !important;
  -webkit-font-smoothing: antialiased !important;
}

.saw-labs-root {
  font-family: 'IBM Plex Sans', sans-serif !important;
  color: #F1F5F9 !important;
  line-height: 1.5 !important;
}

/* Reset headings inside our component so BuddyBoss doesn't override */
.saw-labs-root h1,
.saw-labs-root h2,
.saw-labs-root h3,
.saw-labs-root h4 {
  font-family: 'Barlow Condensed', sans-serif !important;
  color: #F1F5F9 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.1 !important;
  border: none !important;
  background: none !important;
}

/* Reset paragraphs */
.saw-labs-root p {
  margin: 0 !important;
  padding: 0 !important;
}

/* Reset links */
.saw-labs-root a {
  text-decoration: none !important;
  color: inherit !important;
}

/* Reset all buttons inside our component */
.saw-labs-root button {
  font-family: 'IBM Plex Sans', sans-serif !important;
  cursor: pointer !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Reset inputs */
.saw-labs-root input,
.saw-labs-root textarea {
  font-family: 'IBM Plex Sans', sans-serif !important;
  color: #F1F5F9 !important;
  background: transparent !important;
}

/* ── SVG inside ring diagram ────────────────────────────────────────────────── */
.saw-labs-root svg {
  display: block !important;
  width: 100% !important;
  max-height: 420px !important;
  overflow: visible !important;
}

/* ── Ring node cursor ───────────────────────────────────────────────────────── */
.sawlabs-ring-node {
  cursor: pointer !important;
}

/* ── Pills (lab selector) ───────────────────────────────────────────────────── */
.sawlabs-pill {
  padding: 0.4rem 1rem !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.25s !important;
  white-space: nowrap !important;
}
.sawlabs-pill:hover {
  border-color: rgba(255,255,255,0.2) !important;
  color: #F1F5F9 !important;
}

/* ── Toggle button ──────────────────────────────────────────────────────────── */
.sawlabs-tog {
  padding: 0.35rem 0.8rem !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
}
.sawlabs-tog:hover {
  background: rgba(0,191,255,0.12) !important;
  border-color: rgba(0,191,255,0.5) !important;
  color: #00BFFF !important;
}

/* ── Connect button ─────────────────────────────────────────────────────────── */
.sawlabs-connect {
  transition: all 0.25s !important;
}

/* ── Device row hover ───────────────────────────────────────────────────────── */
.sawlabs-dev-row {
  animation: sawlabs-deviceIn 0.35s cubic-bezier(0.16,1,0.3,1) both !important;
}
.sawlabs-dev-header {
  user-select: none !important;
  -webkit-user-select: none !important;
}
.sawlabs-dev-header:hover {
  opacity: 0.88 !important;
}

/* ── Back button ────────────────────────────────────────────────────────────── */
.sawlabs-back-btn {
  cursor: pointer !important;
  transition: all 0.2s !important;
}
.sawlabs-back-btn:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #F1F5F9 !important;
}

/* ── Copy button ────────────────────────────────────────────────────────────── */
.sawlabs-copy-btn {
  transition: opacity 0.2s !important;
}
.sawlabs-copy-btn:hover {
  opacity: 0.8 !important;
}

/* ── Launch button ──────────────────────────────────────────────────────────── */
.saw-labs-root button[style*="linear-gradient"]:hover {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .saw-labs-root svg {
    max-height: 320px !important;
  }
  .sawlabs-pill {
    font-size: 0.76rem !important;
    padding: 0.35rem 0.75rem !important;
  }
}

/* ── BuddyBoss / Elementor specific overrides ───────────────────────────────── */

/* Prevent BuddyBoss from adding borders/padding to our divs */
.saw-labs-root .bb-grid-cell,
.saw-labs-root .entry-content > *,
.saw-labs-root .elementor-widget-container > * {
  margin: 0 !important;
  padding: 0 !important;
}

/* Force our background to always show — BuddyBoss sometimes forces white */
.saw-labs-root div[style*="background:#0A0E17"],
.saw-labs-root div[style*="background: #0A0E17"] {
  background: #0A0E17 !important;
}

/* Prevent Elementor from stripping pointer-events on SVG */
.saw-labs-root svg * {
  pointer-events: all !important;
}

/* Prevent BuddyBoss global link color bleeding in */
.saw-labs-root a:hover {
  color: #00BFFF !important;
  text-decoration: none !important;
}

/* Prevent theme font stacks from overriding Barlow Condensed */
.saw-labs-root [style*="Barlow Condensed"] {
  font-family: 'Barlow Condensed', sans-serif !important;
}

/* Prevent theme font stacks from overriding IBM Plex Mono */
.saw-labs-root [style*="IBM Plex Mono"] {
  font-family: 'IBM Plex Mono', monospace !important;
}

/* ── Terminal animations ────────────────────────────────────────────────────── */
@keyframes sawlabs-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes sawlabs-termFade {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes sawlabs-slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sawlabs-term-output {
  font-family: 'IBM Plex Mono', 'SF Mono', monospace !important;
}

/* ── Ring line dash animation ───────────────────────────────────────────────── */
@keyframes sawlabs-dash {
  from { stroke-dashoffset: 20; }
  to   { stroke-dashoffset: 0; }
}
/* Ensure SVG is tall enough for larger ring on small screens */
@media (max-width: 400px) {
  .saw-labs-root svg {
    max-height: 300px !important;
  }
}
