/* components.css - form fields, buttons, note palette, ocarina type selector, tab output, legend. */

label.field { display: block; font-weight: 700; margin-bottom: 6px; color: var(--forest); }

textarea, .titlein {
  width: 100%;
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

textarea { min-height: 150px; resize: vertical; padding: 12px 14px; font: 18px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.titlein { padding: 10px 14px; font: 18px/1.4 var(--serif); }

textarea:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 2px;
}

.hint { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

.hint code, .help code {
  background: var(--parchment-2); padding: 1px 6px; border-radius: var(--radius);
  font: 13px ui-monospace, Menlo, Consolas, monospace; color: var(--ink);
}

fieldset.typesel { border: 0; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

fieldset.typesel legend { float: left; font-weight: 700; color: var(--forest); margin-right: 14px; padding: 0; line-height: 44px; }

.typesel label { cursor: pointer; }

.typesel input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.typesel span { display: inline-flex; flex-direction: column; align-items: center; min-width: 110px; padding: 6px 18px; border: 1px solid var(--gold-dark); border-radius: var(--radius); background: var(--paper); color: var(--forest); line-height: 1.25; transition: background .15s, color .15s; }

.typesel span b { font: 700 16px/1.2 var(--serif); letter-spacing: .06em; text-transform: uppercase; }

.typesel span small { font-size: 12px; opacity: .8; }

.typesel label:hover span { background: var(--parchment-2); }

.typesel input:checked + span { background: var(--forest); color: var(--gold); border-color: var(--gold-line); box-shadow: inset 0 0 0 1px var(--gold-line); }

.typesel input:focus-visible + span { outline: 3px solid var(--gold-dark); outline-offset: 2px; }

.palette { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }

button {
  font: 700 13px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-transform: uppercase; letter-spacing: .07em;
  cursor: pointer; border-radius: var(--radius); border: 1px solid var(--gold-dark);
  background: var(--paper); color: var(--forest); padding: 9px 14px; min-height: 40px;
  transition: background .15s, color .15s, border-color .15s;
}

button:hover { background: var(--parchment-2); border-color: var(--forest); }

.palette button { min-width: 54px; padding: 8px; font-size: 15px; text-transform: none; letter-spacing: 0; }

.palette button.sharp { background: var(--forest); color: var(--gold); border-color: var(--forest); }

.palette button.sharp:hover { background: var(--forest-2); border-color: var(--gold-line); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }

button.primary { background: var(--red); border-color: var(--red-dark); color: #fff; padding: 10px 26px; font-size: 14px; }

button.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

.wrapctl { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 15px; }

.wrapctl input { width: 64px; padding: 7px 8px; border: 1px solid var(--gold-dark); border-radius: var(--radius); font: inherit; background: var(--paper); color: var(--ink); }

.msg { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius); background: #fbe9e7; border-left: 4px solid var(--error); color: var(--error); font-size: 15px; }

.msg ul { margin: 4px 0 0; padding-left: 20px; }

.tabbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.paper { background: #fff; border: 1px solid var(--gold-dark); border-radius: var(--radius); padding: 10px; overflow-x: auto; }

.paper svg { display: block; margin: 0 auto; width: 100%; height: auto; }

.empty { color: var(--muted); padding: 30px 10px; text-align: center; }

.legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; color: var(--muted); font-size: 14px; margin: 10px 0 0; }

.legend svg { vertical-align: -3px; margin-right: 4px; }

/* Cookie notice (bottom of the screen) and the "Cookie settings" link in the footer */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 2147483000;
  max-width: 760px; margin: 0 auto; padding: 16px 20px;
  background: var(--parchment); color: var(--ink);
  border: 1px solid var(--gold-dark); border-radius: var(--radius);
  box-shadow: inset 0 0 0 3px var(--parchment), inset 0 0 0 4px var(--gold-line), 0 10px 30px rgba(0, 0, 0, .5);
  font-size: 14px; line-height: 1.5;
}
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.linklike {
  background: none; border: 0; padding: 0; min-height: 0;
  font: inherit; text-transform: none; letter-spacing: normal; font-weight: 400;
  color: var(--gold); text-decoration: underline; cursor: pointer;
}
.linklike:hover { background: none; color: #fff; }

@media (max-width: 520px) {
  .consent-actions button { flex: 1 1 100%; }
}

@media (max-width: 520px) {
  .wrapctl { margin-left: 0; }
}
