/* darkened.css - Dark visual overlay for GWAY default site */

:root {
  --bg: #1e1f26;
  --bg-alt: #2b2c34;
  --fg: #e4e4e7;
  --accent: #5eead4;
  --accent-alt: #60a5fa;
  --muted: #9ca3af;
  --error: #f87171;
  --border-radius: 0.5rem;
  --font-main: 'Inter', sans-serif;
  --font-code: 'Fira Code', monospace;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--fg);
  display: flex;
  flex-direction: column;
}

.layout {
  display: flex;
  flex: 1 0 auto;
  min-height: 100vh;
  flex-direction: row;
}

/* Sidebar (navbar) */
aside {
  background-color: var(--bg-alt);
  border-right: 1px solid var(--muted);
  padding: 1rem;
  width: 240px;
  flex-shrink: 0;
  overflow: hidden;
}

aside ul {
  padding: 0;
  list-style: none;
}

aside ul li {
  margin-bottom: 0.5rem;
}

aside ul li a {
    color: var(--fg);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.93em;
}

aside ul li a:hover,
aside ul li a.active {
    background-color: var(--accent);
    color: var(--bg);
}

aside ul.sub-links {
    list-style: none;
    padding-left: 1em;
    margin: 0.2em 0 0.4em;
    font-size: 0.85em;
}

aside ul.sub-links li a {
    text-transform: none;
    padding: 0.2em 0.5rem;
}

/* QR image cap */
img.qr,
img.navbar-qr {
  max-width: 100%;
  max-height: 180px;
  margin-top: 1rem;
  filter: drop-shadow(0 0 4px var(--muted));
}

/* Main content area */
main {
  flex-grow: 1;
  background-color: var(--bg);
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--fg);
}

p {
  line-height: 1.6;
}

/* Inputs and Buttons */
button,
input[type="submit"],
input[type="button"] {
  background-color: var(--accent-alt);
  color: var(--bg);
  border: none;
  padding: 0.5rem 1rem;
  font-weight: bold;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover,
input[type="submit"]:hover {
  background-color: var(--accent);
}

input,
textarea,
select {
  background-color: var(--bg-alt);
  color: var(--fg);
  border: 1px solid var(--muted);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  width: 100%;
  box-sizing: border-box;
}

/* File input spacing */
input[type="file"] {
  display: block;
  margin-bottom: 1rem;
}

/* Link styling */
a {
  color: var(--accent-alt);
  background-color: rgba(96, 165, 250, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

a:hover {
  background-color: rgba(94, 234, 212, 0.2);
  color: var(--accent);
}

/* Footer */
footer {
  background-color: var(--bg-alt);
  color: var(--fg);
  padding: 1rem;
  border-top: 1px solid var(--muted);
  text-align: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  margin-top: auto;
}

/* Code */
code, pre {
  background-color: #111827;
  color: #a5f3fc;
  font-family: var(--font-code);
  border-radius: var(--border-radius);
  padding: 0.2rem 0.4rem;
}

pre {
  overflow-x: auto;
  padding: 1rem;
}

/* Error messages */
.error,
p.error {
  color: var(--error);
  font-weight: bold;
}

/* Style selector (if present) */
nav .style-selector {
  margin-top: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: var(--border-radius);
  color: var(--fg);
  padding: 0.25rem 0.5rem;
  font-family: var(--font-code);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  aside {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--muted);
  }

  main {
    padding: 1rem;
  }
}


/* === GWAY HELP OVERLAY: Dark Mode Styles === */

.help-entry {
  margin: 1.4em 0 1.7em 0;
  border: 1.5px solid #343648;
  border-radius: 13px;
  background: #232435;
  box-shadow: 0 2px 10px 0 rgba(30,40,80,0.18);
  padding: 1.2em 1.5em 0.8em 1.5em;
  position: relative;
  transition: box-shadow 0.15s;
}

.help-entry:hover {
  box-shadow: 0 6px 18px 1px rgba(68,146,203,0.12);
}

.help-multi {
  display: flex;
  flex-direction: column;
  gap: 1.3em;
}

.help-sep {
  border: none;
  border-top: 2px solid #3e425e;
  margin: 2em 0 1.2em 0;
  opacity: 0.37;
}

/* --- Project/Function Row at Top --- */
.projfunc-row {
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-size: 1.45em;
  font-family: var(--font-code), 'JetBrains Mono', 'Fira Mono', 'Menlo', 'Consolas', monospace;
  font-weight: 700;
  margin-bottom: 0.7em;
  letter-spacing: -0.01em;
}
.projfunc-row .project, .projfunc-row .function {
  font-family: inherit;
  font-weight: 700;
  color: #5eead4;
  background: #20222f;
  padding: 0.08em 0.38em;
  border-radius: 0.32em;
  box-shadow: 0 2px 9px 0 #33e6a511;
  font-size: 1.01em;
}
.projfunc-row .dot {
  color: #46c2b1;
  font-weight: 400;
  font-size: 1.18em;
}

/* --- Minor Links in Help --- */
.help-entry a, .help-entry .refs a {
  color: #60a5fa;
  text-decoration: none;
  font-size: 1.04em;
  font-weight: 500;
  padding: 0.07em 0.23em;
  border-radius: 0.16em;
  background: rgba(96,165,250,0.08);
  transition: background 0.13s;
}
.help-entry a:hover {
  background: #314b68;
  color: #5eead4;
}

/* --- References row --- */
.refs {
  margin: 0.4em 0 0.8em 0;
  padding: 0.15em 0.06em;
  font-size: 1.01em;
}

/* --- Code Blocks in help --- */
.help-entry pre,
.help-entry pre code.python {
  background-color: #10111c;
  color: #a5f3fc;
  border-radius: 7px;
  margin: 1em 0 1em 0;
  font-size: 0.98em;
  font-family: var(--font-code), 'JetBrains Mono', 'Fira Mono', 'Menlo', monospace;
  box-shadow: 0 1px 3px 0 #0006;
}
.help-entry .doc {
  background: #23374b;
  color: #a5f3fc;
  padding: 0.47em 0.85em;
  border-left: 3px solid #60a5fa;
  margin: 1em 0 1.05em 0;
  border-radius: 3px;
  font-size: 1.02em;
}

.copy-btn {
  position: absolute;
  top: 0.6em; right: 1.0em;
  background: #60a5fa;
  color: #10111c;
  border: none;
  border-radius: 6px;
  font-size: 1.01em;
  padding: 0.22em 0.7em;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 1px 5px 0 #1e293b66;
  transition: background 0.13s;
}
.copy-btn:hover { background: #0891b2; }
.full-code-block { position: relative; }

@media (max-width: 650px) {
  .help-entry {
    padding: 0.7em 0.4em 0.45em 0.4em;
  }
  .projfunc-row { font-size: 1em; }
}
