/* Guitar Tuner – alle regels vallen onder .gtuner zodat het Joomla-template niet wordt beïnvloed */
.gtuner {
  --gt-bg: #121826;
  --gt-panel: #1a2133;
  --gt-line: rgba(255, 255, 255, .09);
  --gt-text: #eef1f6;
  --gt-muted: #98a1b3;
  --gt-accent: #2b59c3;
  --gt-accent2: #b93a5b;
  --gt-accent-text: #8aa8f0;
  --gt-accent2-text: #ec7f9c;
  --gt-good: #3ddc84;
  --gt-on-accent: #ffffff;
  --gt-radius: 16px;
  box-sizing: border-box;
  max-width: 440px;
  margin: 0 auto;
  padding: 14px 16px 16px;
  border-radius: var(--gt-radius);
  background: radial-gradient(120% 80% at 80% 0%, rgba(43, 89, 195, .22), transparent 60%), var(--gt-bg);
  color: var(--gt-text);
  color-scheme: dark;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
  -webkit-tap-highlight-color: transparent;
}
.gtuner--light {
  --gt-bg: #ffffff;
  --gt-panel: #f3f4f7;
  --gt-line: rgba(20, 24, 38, .1);
  --gt-text: #171b26;
  --gt-muted: #5f6778;
  --gt-accent: #2b59c3;
  --gt-accent2: #b93a5b;
  --gt-accent-text: #2b59c3;
  --gt-accent2-text: #b93a5b;
  color-scheme: light;
  --gt-good: #13a85a;
  box-shadow: 0 10px 34px rgba(20, 24, 38, .12);
}
.gtuner *, .gtuner *::before, .gtuner *::after { box-sizing: border-box; }
.gtuner button, .gtuner select, .gtuner input { font: inherit; color: inherit; margin: 0; }
.gtuner button { cursor: pointer; }
.gtuner button:focus-visible, .gtuner select:focus-visible, .gtuner input:focus-visible {
  outline: 2px solid var(--gt-accent); outline-offset: 2px;
}

/* Kop */
.gtuner__head { display: flex; flex-wrap: nowrap; gap: 8px; margin-bottom: 4px; }
.gtuner__field { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.gtuner__field--a4 { flex: 0 0 auto; }
.gtuner__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gtuner__select {
  width: 100%; height: 36px; padding: 0 30px 0 10px; font-size: 14px;
  border: 1px solid var(--gt-line); border-radius: 10px;
  background: var(--gt-panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b84e0' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none;
  color: var(--gt-text);
}
/* Robuust tegen template-CSS die kleuren van select/option overschrijft */
.gtuner select.gtuner__select {
  color: var(--gt-text) !important;
  -webkit-text-fill-color: var(--gt-text) !important;
  background-color: var(--gt-panel) !important;
  text-shadow: none !important;
  opacity: 1 !important;
  line-height: normal !important;
  height: 36px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  text-indent: 0 !important;
  font-size: 14px !important;
}
.gtuner select.gtuner__select option,
.gtuner select.gtuner__select optgroup {
  background-color: var(--gt-panel) !important;
  color: var(--gt-text) !important;
  -webkit-text-fill-color: var(--gt-text) !important;
}
.gtuner__stepper { display: flex; align-items: center; height: 36px; border: 1px solid var(--gt-line); border-radius: 10px; background: var(--gt-panel); overflow: hidden; }
.gtuner__step { width: 30px; height: 100%; border: 0; background: transparent; font-size: 18px; color: var(--gt-accent-text) !important; }
.gtuner__step:hover { background: var(--gt-line); }
.gtuner__a4val { min-width: 74px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.gtuner__a4val::before { content: "A4 "; color: var(--gt-muted); font-weight: 500; }

/* Meter */
.gtuner__display { text-align: center; padding: 2px 0 4px; }
.gtuner__meter { display: block; width: 100%; max-width: 270px; height: auto; margin: 0 auto -6px; overflow: visible; }
.gtuner__arc { fill: none; stroke: var(--gt-line); stroke-width: 10; stroke-linecap: round; }
.gtuner__zone { fill: none; stroke: var(--gt-good); stroke-width: 10; stroke-linecap: round; opacity: .55; transition: opacity .2s; }
.gtuner.is-intune .gtuner__zone { opacity: 1; }
.gtuner__tick { stroke: var(--gt-muted); stroke-width: 1.5; opacity: .55; }
.gtuner__tick--major { stroke-width: 2.5; opacity: .9; }
.gtuner__ticklabel { fill: var(--gt-muted); font-size: 10px; font-family: inherit; }
.gtuner__flatsharp { fill: var(--gt-muted); font-size: 20px; font-family: inherit; }
.gtuner__needle line { stroke: var(--gt-muted); stroke-width: 3.5; stroke-linecap: round; transition: stroke .2s; }
.gtuner__needle circle { fill: var(--gt-muted); transition: fill .2s; }
.gtuner.has-signal .gtuner__needle line { stroke: var(--gt-accent2); }
.gtuner.has-signal .gtuner__needle circle { fill: var(--gt-accent2); }
.gtuner.is-intune .gtuner__needle line { stroke: var(--gt-good); }
.gtuner.is-intune .gtuner__needle circle { fill: var(--gt-good); }

.gtuner__readout { position: relative; }
.gtuner__notewrap { display: flex; justify-content: center; align-items: baseline; gap: 2px; line-height: 1; margin-bottom: 2px; }
.gtuner__note { font-size: 50px; font-weight: 800; letter-spacing: -.02em; color: var(--gt-text); transition: color .2s; }
.gtuner__oct { font-size: 18px; font-weight: 700; color: var(--gt-muted); }
.gtuner.has-signal .gtuner__note { color: var(--gt-accent-text); }
.gtuner.is-intune .gtuner__note { color: var(--gt-good); }
.gtuner__cents, .gtuner__freq { display: inline; font-variant-numeric: tabular-nums; }
.gtuner__cents { font-size: 14px; font-weight: 700; }
.gtuner__freq { font-size: 13px; color: var(--gt-muted); }
.gtuner__cents:not(:empty) + .gtuner__freq::before { content: "  ·  "; white-space: pre; }
.gtuner__readout { min-height: 70px; }
.gtuner__hint { min-height: 20px; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--gt-muted); }
.gtuner.has-signal .gtuner__hint { color: var(--gt-accent2-text); }
.gtuner.is-intune .gtuner__hint { color: var(--gt-good); }

/* Snaren */
.gtuner__strings { display: flex; justify-content: center; gap: 6px; flex-wrap: nowrap; margin-top: 6px; }
.gtuner__string {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1 1 0; min-width: 0; max-width: 52px; height: 46px; padding: 0;
  border: 1.5px solid var(--gt-line); border-radius: 11px;
  background: var(--gt-panel);
  color: var(--gt-text) !important;
  transition: border-color .15s, background .15s, transform .1s;
}
.gtuner__string:hover { border-color: var(--gt-accent-text); }
.gtuner__string:active { transform: scale(.96); }
.gtuner__sname { font-size: 17px; font-weight: 800; line-height: 1.1; }
.gtuner__snum { font-size: 10px; color: var(--gt-muted); }
.gtuner__string.is-target { border-color: var(--gt-accent); background: linear-gradient(135deg, var(--gt-accent), var(--gt-accent2)); color: var(--gt-on-accent) !important; }
.gtuner__string.is-target .gtuner__snum { color: var(--gt-on-accent); opacity: .7; }
.gtuner__string.is-tuned::after {
  content: "✓"; position: absolute; top: -6px; right: -6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gt-good); color: #06210f; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
}
.gtuner__small { display: none; margin-top: 8px; font-size: 13px; color: var(--gt-muted); text-align: center; }

/* Bediening */
.gtuner__controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 10px; margin-top: 12px; }
.gtuner__start {
  flex: 1 1 140px; max-width: 180px; height: 38px; padding: 0 16px;
  border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--gt-accent), var(--gt-accent2));
  color: var(--gt-on-accent) !important; font-size: 15px; font-weight: 800; letter-spacing: .01em;
  box-shadow: 0 6px 16px rgba(185, 58, 91, .3);
  transition: transform .1s, filter .15s;
}
.gtuner__start:hover { filter: brightness(1.06); }
.gtuner__start:active { transform: scale(.98); }
.gtuner__start:disabled { opacity: .6; cursor: wait; }
.gtuner.is-running .gtuner__start { background: var(--gt-panel); color: var(--gt-text) !important; box-shadow: none; border: 1.5px solid var(--gt-line); }
.gtuner__toggles { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.gtuner__seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--gt-panel); border: 1px solid var(--gt-line); }
.gtuner__segbtn { height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; font-size: 13px; font-weight: 600; color: var(--gt-muted) !important; }
.gtuner__segbtn.is-active { background: var(--gt-accent); color: var(--gt-on-accent) !important; }
.gtuner__check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gt-muted); cursor: pointer; }
.gtuner__check input { width: 16px; height: 16px; accent-color: var(--gt-accent); }

.gtuner__msg {
  display: none; margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(185, 58, 91, .12); border: 1px solid rgba(185, 58, 91, .4);
  font-size: 13px; color: var(--gt-text);
}
.gtuner__msg:not(:empty) { display: block; }

@media (max-width: 420px) {
  .gtuner { padding: 12px 10px 14px; border-radius: 14px; }
  .gtuner__strings { gap: 4px; }
}

/* Robuust tegen template-CSS die knoppen opmaakt (achtergrond, rand, hoofdletters) */
.gtuner button {
  text-transform: none !important; letter-spacing: normal; text-shadow: none !important;
  min-height: 0 !important; line-height: 1.2 !important; box-shadow: none; text-decoration: none !important;
}
.gtuner .gtuner__step { background: transparent !important; border: 0 !important; border-radius: 0 !important; }
.gtuner .gtuner__step:hover { background: var(--gt-line) !important; }
.gtuner .gtuner__string { background: var(--gt-panel) !important; border: 1.5px solid var(--gt-line) !important; border-radius: 11px !important; padding: 0 !important; }
.gtuner .gtuner__string:hover { border-color: var(--gt-accent-text) !important; }
.gtuner .gtuner__string.is-target { background: linear-gradient(135deg, var(--gt-accent), var(--gt-accent2)) !important; border-color: var(--gt-accent) !important; }
.gtuner .gtuner__start { background: linear-gradient(135deg, var(--gt-accent), var(--gt-accent2)) !important; border: 0 !important; border-radius: 999px !important; box-shadow: 0 6px 16px rgba(185, 58, 91, .3) !important; }
.gtuner.is-running .gtuner__start { background: var(--gt-panel) !important; color: var(--gt-text) !important; border: 1.5px solid var(--gt-line) !important; box-shadow: none !important; }
.gtuner .gtuner__segbtn { background: transparent !important; border: 0 !important; border-radius: 999px !important; }
.gtuner .gtuner__segbtn.is-active { background: var(--gt-accent) !important; }
