/* Felles stil for verktøysidene */

.page-head { padding: 24px 0 24px; }
.back {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--accent); }
.page-head h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  letter-spacing: -0.02em;
  margin: 10px 0 8px;
}
.page-head p {
  color: var(--muted);
  margin: 0;
  max-width: 60ch;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

/* Faner */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.tabs button {
  appearance: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* Skjemafelt */
.fields { display: grid; gap: 12px; }
.fields[hidden] { display: none; }
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field > span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], textarea, select {
  font: inherit;
  font-size: 0.95rem;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 10px 0;
}
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
.hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

/* Slippsone for filer */
.dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  padding: 40px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone.locked { opacity: 0.6; pointer-events: none; }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.dropzone svg { width: 40px; height: 40px; color: var(--accent); }
.dropzone strong { font-size: 1.05rem; }
.dropzone span { color: var(--muted); font-size: 0.85rem; }

.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  flex-wrap: wrap;
}
.segmented button {
  appearance: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
