/* Nav Dot Controls - Isolated Integration */
/* EXACT REPLICA of standalone dot-controls with nav-dotctrl-* namespace */

@import url("https://fonts.cdnfonts.com/css/thegoodmonolith");

:root {
  --nav-dotctrl-hue: 223;
  --nav-dotctrl-sat: 10%;
  --nav-dotctrl-pixel-size: 0.5em;
  --nav-dotctrl-control-width-desktop: 2.8em;
  --nav-dotctrl-control-height-desktop: 4.06em;
  --nav-dotctrl-control-width-mobile: 5em;
  --nav-dotctrl-control-height-mobile: 7.5em;
  --nav-dotctrl-transition-medium: 0.3s ease;
}

/* Theme definitions - applied to document root */
[data-theme="light"] {
  --nav-dotctrl-bg: hsl(var(--nav-dotctrl-hue), var(--nav-dotctrl-sat), 95%);
  --nav-dotctrl-fg: hsl(var(--nav-dotctrl-hue), var(--nav-dotctrl-sat), 15%);
  --nav-dotctrl-accent: hsl(0, 80%, 55%);
  --nav-dotctrl-dot-bg-color: #222;
  --nav-dotctrl-dot-fg-color: #fff;
}

[data-theme="dark"] {
  --nav-dotctrl-bg: #000000;
  --nav-dotctrl-fg: #ffffff;
  --nav-dotctrl-accent: hsl(0, 80%, 55%);
  --nav-dotctrl-dot-bg-color: #333;
  --nav-dotctrl-dot-fg-color: #ffffff;
}

/* Desktop Container - Balanced with Nav Menu */
.nav-dotctrl-desktop-container {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-left: 2em;
  padding: 0 0.66em;
}

.nav-dotctrl-control-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.31em;
}

/* Control label (desktop) */
.nav-dotctrl-control-label {
  font-family: "TheGoodMonolith", monospace, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.625em;
  color: #000;
  font-weight: 600;
  text-align: center;
}

/* Dot Control - Desktop */
.nav-dotctrl-dot-control {
  position: relative;
  width: var(--nav-dotctrl-control-width-desktop);
  height: var(--nav-dotctrl-control-height-desktop);
  cursor: pointer;
  /* Glassmorphism matching navbar aesthetic */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.66em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
              0 2px 4px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.nav-dotctrl-dot-control:hover {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2),
              0 4px 8px rgba(0, 0, 0, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Canvas styling */
canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0.66em;
}

/* Control value display */
.nav-dotctrl-control-value {
  font-family: "TheGoodMonolith", monospace, sans-serif;
  font-size: 0.625em;
  color: var(--nav-dotctrl-accent);
  transition: color 0.5s ease;
  text-align: center;
  min-width: 2.8em;
}

/* Mobile Container - Inside Hamburger Menu */
.nav-dotctrl-mobile-container {
  display: none;
  flex-direction: column;
  gap: 0.94em;
  padding: 1.25em 1.88em;
  margin-top: 1.25em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-dotctrl-mobile-label {
  font-family: "TheGoodMonolith", monospace, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75em;
  color: #000;
  font-weight: 600;
  margin-top: 0.625em;
}

.nav-dotctrl-mobile-label:first-child {
  margin-top: 0;
}

/* Mobile dot controls - larger for touch */
.nav-dotctrl-dot-control.nav-dotctrl-mobile {
  width: var(--nav-dotctrl-control-width-mobile);
  height: var(--nav-dotctrl-control-height-mobile);
  margin: 0.625em auto;
}

/* Font size classes - affect entire website by scaling html base font */
html.nav-dotctrl-font-size-10 {
  font-size: 62.5%; /* 10px base (10/16 = 62.5%) */
}

html.nav-dotctrl-font-size-12 {
  font-size: 75%; /* 12px base (12/16 = 75%) */
}

html.nav-dotctrl-font-size-14 {
  font-size: 87.5%; /* 14px base (14/16 = 87.5%) */
}

html.nav-dotctrl-font-size-16 {
  font-size: 100%; /* 16px base (default) */
}

html.nav-dotctrl-font-size-18 {
  font-size: 112.5%; /* 18px base (18/16 = 112.5%) */
}

html.nav-dotctrl-font-size-20 {
  font-size: 125%; /* 20px base (20/16 = 125%) */
}

html.nav-dotctrl-font-size-22 {
  font-size: 137.5%; /* 22px base (22/16 = 137.5%) */
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Hide desktop controls on mobile */
  .nav-dotctrl-desktop-container {
    display: none;
  }

  /* Show mobile controls inside hamburger menu */
  .nav-dotctrl-mobile-container {
    display: flex;
  }
}

@media (min-width: 769px) {
  /* Show desktop controls */
  .nav-dotctrl-desktop-container {
    display: flex;
  }

  /* Hide mobile controls on desktop */
  .nav-dotctrl-mobile-container {
    display: none !important;
  }
}
