/* File: styles.css */

/*
© 2025 SKR4CH. All rights reserved. Unauthorized copying, reproduction, distribution, or creation of derivative works, in whole or in part, without the express prior written permission of SKR4CH is strictly prohibited.
*/

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background: #111;
  color: #eee;
  font-family: sans-serif;
}

/* Link styling: meets 4.5:1 contrast on #111 background */
a,
a:link {
  color: #1E90FF;
  text-decoration: none;
}
a:visited {
  color: #BA55D3;
}
a:hover,
a:focus {
  color: #00BFFF;
  text-decoration: underline;
}

/* Header styling */
.site-header {
  width: 100%;
  margin: 0;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Inner container for logo & title */
.header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 3rem;
}

/* Logo constrained to container height */
.header-content .logo-img {
  max-height: 100%;
  width: auto;
}

/* Title constrained to container height */
.header-content .site-title {
  margin: 0;
  font-family: Impact, sans-serif;
  font-size: 3rem;
  line-height: 3rem;
  height: 3rem;
}

.canvas-container {
  position: relative;
  width: 80vw;
  max-width: 1600px;
  box-sizing: border-box;
}

canvas#waveform {
  width: 100%;
  aspect-ratio: 2 / 1;
  background: #000;
  display: block;
  cursor: crosshair;
  box-sizing: border-box;
  border: 2px solid #444;
}

/* Centered help menu over canvas */
.canvas-container .help-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #222;
  color: #eee;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 1rem;
  max-width: 80%;
  font-size: 0.9rem;
  z-index: 20;
}

.controls {
  position: relative;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.axis-label {
  position: absolute;
  background: #222;
  color: #eee;
  border: 1px solid #444;
  padding: 0.2rem 0.4rem;
  font-size: 0.9rem;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
}

.x-label {
  transform: translateX(-50%);
}
.y-label.left {
  left: 0;
  top: 50%;
  transform: translate(-100%, -50%);
}
.y-label.right {
  left: 100%;
  top: 50%;
  transform: translate(0%, -50%);
}

.controls label {
  margin-left: 1rem;
}
.controls input,
.controls select {
  width: 4rem;
  padding: 0.2rem;
  font-size: 1rem;
  background: #222;
  color: #eee;
  border: 1px solid #444;
  border-radius: 4px;
}
.controls button {
  padding: 0.25em 0.5em;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #444;
  background: #222;
  color: #eee;
  cursor: pointer;
}

/* Toggle-btn consistency */
.toggle-btn {
  padding: 0.25em 0.5em;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #444;
  background: #222;
  color: #eee;
  cursor: pointer;
}
.toggle-btn.active {
  background: #00D50C;
  color: #000;
}

/* Legal & Policies */
details#legal {
  display: inline-block;
  width: auto;
  margin: 2rem auto 3rem;
  background: #222;
  color: #eee;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  box-sizing: border-box;
  transition: width 0.25s ease;
}
details#legal[open] {
  display: block;
  width: 80vw;
  max-width: 800px;
  padding: 1rem;
}
details#legal summary {
  cursor: pointer;
  font-weight: bold;
  text-align: center;
  outline: none;
}
details#legal h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Nested Cookie Details dropdown */
details.cookie-details {
  margin: 1rem auto;
  width: auto;
}
details.cookie-details summary {
  display: list-item; /* show default arrow */
  cursor: pointer;
  font-weight: normal;
  text-align: center;
  padding: 0.25em 0;
}

/* Sticky footer repositioned into normal flow */
#site-footer {
  margin-top: auto;
  width: 100%;
  text-align: center;
  font-size: 0.875rem;
  color: #eee;
  background: #111;
  padding: 0.5rem 0;
}
#site-footer p {
  margin: 0;
}
