tab-bar {
  display: flex;
}

.tab-header {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ccc;

}

.tab-header button {
  border-radius: 0;
  padding: var(--space) calc(2 *  var(--space));
  cursor: pointer;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-bottom: 2px solid transparent;
  border-right: none;
  outline: none;
  min-width: 10rem;
  max-width: 14rem;
  opacity: 0.8;
  transition: all 0.2s ease-in-out;
  box-shadow: none;
  transform: none;
}

.tab-header button[disabled="true"] {
  opacity: 0.3;
}

.tab-header button:hover {
  background-color: #e9ecef;
  opacity: 1;
}

.tab-header button[aria-selected="true"] {
  border-bottom-color: var(--main-accent-color);
  background-color: white;
  opacity: 1;
  border-bottom-width: 3px;
}

.tab-panels {
  width: 100%;

}

.tab-panel {
  padding: calc(var(--space) * 2);
}
.tab-panel:not([active]) {
  display: none;
}

.tab-header .tab-error {
  opacity: 1;
  color: red;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --main-accent-color: rgb(225, 0, 36);
  --main-weak-accent-color: rgba(225, 0, 36, 0.1);
  --main-focus-color: rgba(33, 33, 200, 0.8);
  --space: 0.6rem;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  font-size: 1.4rem;
  line-height: 1.3;
}

body {
  font-family: ApercuPro, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  height: 100vh;
  width: 100%;
  color: #333;
  display: flex;
  flex-direction: column;
}

.flash {
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  height: 2rem;
  text-align: center;
  font-size: 1.2rem;
}

.flash.notice {
  background-color: #f7f3c8;
}

.flash.alert {
  background-color: #ffeeee;
  color: red;
  font-weight: bold;
}

header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: var(--space);
  gap: var(--space);
  background-color: #333;
  color: white;
}

header img {
  height: 1rem;
}

header h1 {
  font-size: 1rem;
}

nav {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  padding: var(--space);
  border-bottom: 2px solid #bbb;
}

.spacer {
  flex-grow: 1;
}

nav > * {
  margin-right: var(--space);
}

nav h2 {
  font-size: 1.2rem;
}

table {
    border-collapse: collapse;
    width: 100%;
}

tr {
    border-bottom: 1px solid #bbb;
}

thead {
  background-color: #efefef;
}

thead tr:nth-child(2) {
  background-color: #fafafa;
  font-size: 0.9rem;
  font-weight: bold;
}

th, td {
  padding: var(--space);
  text-align: left;
}

th.border-left {
  border-left: 2px solid #aaa;
}

th.border-right {
  border-right: 2px solid #aaa;;
}

td.ra, th.ra {
  text-align: right;
}

td.short {
  width: 10px;
}

.center-box {
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  background-color: #333;
}

.error {
  color: red;
  max-width: 30rem;
}

.success {
  color: green;
}

.disabled {
  opacity: 0.8;
  cursor:not-allowed;
}

article {
  background-color: white;
  padding: calc(var(--space) * 2);
}

article hr {
  border: none;
  margin-bottom: calc(var(--space) * 2);
}

summary.bigger {
  font-size: 1.2rem;
  padding:  calc(var(--space) * 2) 0;
}

select, input, textarea {
  padding: 0.4rem var(--space);
  font-size: 1.1rem;
  border-radius: 0.4rem;
  text-decoration: none;
  color: #333;
  border: 2px solid #ccc;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


*:focus {
  box-shadow: 0 0 10px var(--main-focus-color);
}

select:hover, input:hover, textarea:hover {
  border-color: #999;
}

.button, button, input[type="submit"] {
  padding: 0.4rem calc(var(--space) * 1.5);
  font-size: 1.1rem;
  border-radius: 0.4rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  text-decoration: none;
  color: #333;
  border: 2px solid #dee2e6;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: 500;
}

.button:hover, button:hover, input[type="submit"]:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  border-color: #adb5bd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.button:active, button:active, input[type="submit"]:active {
  transform: translateY(0px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #dee2e6 0%, #ced4da 100%);
}

.button:disabled, button:disabled, input[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8f9fa;
  border-color: #e9ecef;
  box-shadow: none;
  transform: none;
}

.button:disabled:hover, button:disabled:hover, input[type="submit"]:disabled:hover {
  background: #f8f9fa;
  border-color: #e9ecef;
  box-shadow: none;
  transform: none;
}

.field_name, label {
  color: #666;
  display: flex;
  gap: var(--space);
  font-size: 1.1rem;
  margin-bottom: calc(var(--space) * 0.5);
  align-items: baseline;
}

label:has([type="radio"]) {
  display: inline-flex;
  margin-right: calc(var(--space) * 1.5);
}

select {
  font-size: inherit;
  padding: 0.2rem var(--space);
}

.field-line {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--space) * 0.25);
  align-items: baseline;
}

.field {
  margin-bottom: calc(var(--space)*1.5);
}

.form-line {
  display: flex;
  flex-wrap: wrap;
  column-gap: calc(var(--space) * 2);
}


.field p.error {
  margin-top: calc(var(--space) * 0.25);
}

.field-line p.error {
  margin-top: 0;
}

.form-line p.error {
  min-width: 100%;
}

.hint {
  color: #998;
  margin-top: calc(var(--space) * 0.5);
  max-width: 20rem;
  text-wrap: balance;
}

input.short {
  width: 6rem;
}

input.big {
  font-size: 1.5rem;
}

input.error, .error input {
  outline: 3px solid red;
  color: inherit;
}

.field.radio-error {
  border: 3px solid red;
  padding: calc(var(--space) * 0.5);
}

input[type="submit"] {
  margin-top: 1rem;
}

input[type="checkbox"], input[type="radio"] {
  transform: scale(1.5);
  margin-left: 0.1rem;
}

.login {
  border-radius: 0.3rem;
}

.login h2 {
  margin-bottom: 1rem;
}

.header__app_version {
  opacity: 0.3;
}

.header__current-user {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  gap: var(--space);
}

.header__current-user button {
  font-size: 0.8rem;
}

.header__lang .field {
  margin: 0;
  color: black;
}

.header_navbar {
  width: 100%;
  padding: var(--space);
  background-color: #eee;
  font-size: 0.8rem;
  display: flex;
  gap: calc(var(--space) * 1.5);
  list-style: none;
}



form h2 {
  margin-bottom: calc(var(--space) * 2);
}

fieldset {
  padding: calc(var(--space) * 1.5);
  margin-bottom: var(--space);
}

fieldset legend {
  font-size: 1.2rem;
  padding: 0 var(--space);
}

.field_value {
  background-color: #eee;
  min-height: 1.8rem;
  font-size: 1.2rem;
  min-width: 4rem;
  display: flex;
  align-items: center;
  padding: 0 var(--space);
}

.table-view {
  margin-bottom: calc(var(--space) * 2.0);
}

.skipped-results {
  align-content: center;
  font-size: 1.6rem;
}

.search_form {
  display: flex;
  gap: var(--space);
  align-items: baseline;
  margin-bottom: var(--space);
}

.search_form > * {
  margin: 0!important;
}

.search_form > label:has([type="checkbox"]) {
  transform: translateY(0.3rem);
}

.destroy-link {
  color: red;
  margin: 0 2rem;
}

auto-complete {
  display: relative;
}

auto-complete ul {
  display: none;
  position: absolute;
  z-index: 1;
  background-color: white;
  width: 20rem;
  list-style: none;
  border-radius: 0.3rem;
}

auto-complete ul li {
  padding: var(--space);
  user-select: none;
  cursor: pointer;
}

auto-complete .preview {
  margin-top: var(--space);
}


auto-complete ul li:hover {
  background-color: #eee;
  border-radius: 0.3rem;
}

auto-complete ul li.active {
  background-color: var(--main-weak-accent-color);
}

.remove-button {
  margin-bottom: calc(var(--space) * 2.0);
}

auto-complete-multiple {
  display: relative;
}

auto-complete-multiple ul {
  display: none;
  position: absolute;
  z-index: 1;
  background-color: white;
  width: 20rem;
  list-style: none;
  border-radius: 0.3rem;
}

auto-complete-multiple ul li {
  padding: var(--space);
  user-select: none;
  cursor: pointer;
}

auto-complete-multiple ul li:hover {
  background-color: #eee;
  border-radius: 0.3rem;
}

auto-complete-multiple ul li.active {
  background-color: var(--main-weak-accent-color);
}


auto-complete-multiple .selected-items-container {
  display: flex;
  flex-direction: column;
  gap: var(--space);
  margin: var(--space) 0;
}


auto-complete-multiple .selected-items-container:empty {
  margin: 0;
}

auto-complete-multiple .selected-item {

}

auto-complete-multiple .remove-button {
  font-size: 0.7rem;
  padding: calc(var(--space) / 2);
  font-weight: bold;
  margin: 0;
}

.validation-state {
  margin-bottom: calc(var(--space) * 1);
}

/* specific rules */

.scale__vals-table > * {
  width: max(calc(25% - calc(var(--space) * 2)), 15rem);
}

.scale__vals-table input[type="text"] {
  width: 100%;
}

.scale__vals-table select {
  width: 100%;
}

.protocols__eccentricity-test-image {
  width: 8rem;
}

.translation_missing {
  outline: solid pink 2px;
}


.translation {
  outline: solid green 2px;
}
