
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body > #setup-mask {
  display: none;
}

/* =====  Container switches between vertical & horizontal  ===== */
#flex-container {
  display: flex;
  height: 100%;
  width: 100%;
  max-height: 100%;
  max-width: 100%;
}

/* default: two columns */
#flex-container.split-vertical {
  flex-direction: row;
}
/* alternative: two rows */
#flex-container.split-horizontal {
  flex-direction: column;
}

/* =====  Panels  ===== */
.panel {
  display: flex;
  overflow: hidden; /* clip overflowing child content */
  flex: 1 1 50%;     /* start 50 % / 50 % */
  min-width: 0;      /* allow flexbox to shrink below content width */
  min-height: 0;
}

/* Left‑column specific structure */
.panel-left {
  flex-direction: column;
}
.left-head {
  padding: 1em;
  background: #f0f0f0;
  border-bottom: 0.0625em solid #ccc;
  flex: 0 0 auto; /* height is content‑driven */
}
.save-space .left-head {
  padding-top: 0.4em;
  padding-bottom: 0.4em;
}
.left-body {
  flex: 1 1 auto;  /* fill remaining height */
  min-width: 0;
  min-height: 0;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-bottom: 0.0625em solid #e0e0e0;
}
.left-body:last-child {
  border-bottom: none;
}

/* Right‑column – three equal vertical sections */
.panel-right {
  flex-direction: column;
}
.section {
  flex: 1 1 auto;
  border-top: 0.0625em solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section > .playback-controls {
  display: flex;
  align-items: center;
  justify-content: center;
}
.section:first-child {
  flex: 0 0 auto;
  border-top: none;
  padding: 0.5em;
}
.save-space .section:first-child {
  padding-top: 0.3em;
  padding-bottom: 0.3em;
}

/* =====  Resizer bar  ===== */
.resizer {
  background: #d0d0d0;
  flex: 0 0 0.3em;          /* thickness */
  user-select: none;
  touch-action: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-vertical .resizer {
  width: 0.4em;
  height: 100%;
  max-width: 0.4em;
  max-height: 100%;
  min-width: 0.4em;
  min-height: 100%;
  cursor: col-resize;
}

/* When layout becomes horizontal the bar turns horizontal */
.split-horizontal .resizer {
  width: 100%;
  height: 0.4em;
  max-width: 100%;
  max-height: 0.4em;
  min-width: 100%;
  min-height: 0.4em;
  cursor: row-resize;
}

.resizer-bullets {
  font-size: 0.7em;
  color: white;
  opacity: 0.5;
}

.split-vertical .resizer-bullets {
  writing-mode: vertical-rl;
  text-orientation: sideways;
}

.split-horizontal .resizer-bullets {
  writing-mode: horizontal-tb;
  text-orientation: upright;
}

.resizer:hover .resizer-bullets {
  opacity: 1;
}

@media (pointer: coarse) {
.split-vertical .resizer { width: 1em; max-width: 1em; min-width: 1em; }
.split-horizontal .resizer { height: 1em; max-height: 1em; min-height: 1em; }
}

@media (hover: none) {
.split-vertical .resizer { width: 1em; max-width: 1em; min-width: 1em; }
.split-horizontal .resizer { height: 1em; max-height: 1em; min-height: 1em; }
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 1;
  font-size: 1.6em;
  line-height: 1;
}

input[type=button]:not(.icon-button), button:not(.icon-button) {
  font-family: inherit;
  font-size: 1em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  padding-top: 0.2em;
  padding-bottom: 0.2em;
}

input[type=button].icon-button, button.icon-button {
  padding: 0.1em;
}

select, input[type=text], input[type=number], input[type=file] {
  font-family: inherit;
  font-size: 1em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  padding-top: 0.2em;
  padding-bottom: 0.2em;
}

select.size-to-icon-button {
  padding-top: 0.4em;
  padding-bottom: 0.4em;
}

.progress-bar-outer {
  text-align: left;
  padding: 0em;
  height: 0.4em;
  background-color: #e0e0e0;
}

.progress-bar-inner {
  padding: 0em;
  margin: 0em;
  height: 100%;
  background-color: #4d884e;
}

.setup-header {
  padding: 1em;
  padding-top: 1.2em;
  padding-bottom: 1.2em;
}

.step-header {
  font-weight: bold;
  padding-left: 1em;
  padding-right: 1em;
  padding-top: 0em;
  padding-bottom: 0em;
}

.step-header-num {
  display: inline-block;
  background-color: #e0e0e0;
  padding: 0.5em;
  padding-top: 0.3em;
  padding-bottom: 0.3em;
  border-radius: 0.5em;
  margin-right: 0.5em;
}

.highlighted-table {
  background-color: #e0e0e0;
  border-radius: 0.5em;
}

.highlighted-table td:first-child {
  padding-left: 0.5em;
}

.highlighted-table td:last-child {
  padding-right: 0.5em;
}

.highlighted-table tr:first-child td {
  padding-top: 0.5em;
}

.highlighted-table tr:last-child td {
  padding-bottom: 0.5em;
}

.highlighted-table tr:not(:last-child) td {
  border-bottom: 0.0625em solid #ccc;
}

.step-body {
  padding: 0.5em;
  padding-left: 1em;
  padding-right: 1em;
  text-align: center;
}

.step-body .step-form-table {
  text-align: left;
}

.step-form-table:not(.rope-manufacturer-info) tr.rope-manufacturer-info {
  display: none;
}

.step-form-table:first-of-type {
  margin-top: 1em;
}

.step-form-table tr:not(.additional-input-info) td:first-child:not(.fullwidth-text):not(.centered) {
  text-align: right;
}

.step-form-table tr:not(.additional-input-info) td.centered, .centered {
  text-align: center;
}

#menu-stats-table td:first-child:not(.centered) {
  text-align: right;
}

#menu-stats-table td:not(:first-child) {
  text-align: center;
}

#menu-stats-table td:first-child {
  padding-right: 0.5em;
}

#menu-stats-table tr:not(:last-child) td {
  border-bottom: 0.0625em solid #ccc;
}

.material-symbols-outlined.inline-icon {
  font-size: 1.6em;
  transform: translateY(0.23em);
}

.step-form-table .material-symbols-outlined.info-icon, .info-box .material-symbols-outlined.info-icon {
  font-size: 1em;
  transform: translateY(0.13em);
}

.info-box .info-icon {
  margin-right: 0.2em;
}

.legend-box, .info-box {
  display: inline-block;
  cursor: pointer;
  white-space: nowrap;
  margin-left: 0.3em;
  margin-right: 0.3em;
  margin-top: 0.03125em;
  margin-bottom: 0.03125em;
  padding-left: 0.3em;
  padding-right: 0.3em;
  padding-top: 0.1em;
  padding-bottom: 0.1em;
  border-radius: 0.2em;
  user-select: none;
  background-color: #eee;
  transition-property: background-color;
  transition-duration: 500ms;
}

.legend-box {
  padding-top: 0.2em;
}

.legend-box.hidden span:not(.legend-color-dot) {
  text-decoration: line-through;
}

.legend-color-dot {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  border-radius: 0.4em;
  margin-right: 0.4em;
  transition-property: opacity;
  transition-duration: 500ms;
}

.legend-box.hidden .legend-color-dot {
  opacity: 0.5;
}

.legend-box.hidden:hover .legend-color-dot {
  opacity: 1;
}

.legend-box:hover {
  background-color: #bbb;
}

.info-box {
  background-color: #ddd;
}

.info-box:hover {
  background-color: #bbb;
}

.additional-input-info {
  color: #666;
}

.additional-input-info td.small-info {
  font-size: 0.8em;
  padding-bottom: 1.5em;
  padding-left: 3em;
  padding-right: 3em;
}

.additional-input-info td:not(.small-info) {
  padding-bottom: 1.4em;
}

.setup-step {
  margin-bottom: 1.2em;
}

#simulation-menu {
  position: absolute;
  left: 0px;
  top: 0px;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  background-color: rgba(255, 255, 255, 0.9);
}

.menu-container {
  margin: max(1em, 5%);
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5em;
}

.menu-header > :first-child {
  font-size: 1.3em;
  font-weight: bold;
}

.menu-section:not(:last-child) {
  margin-bottom: 1.5em;
}

.menu-section-header {
  display: inline-block;
  font-weight: bold;
  margin-bottom: 0.5em;
}

.rainbow-gradient {
  background: linear-gradient(
    to right,
    #345a5d 0%,
    #355e8a 11.111%,
    #53a396 22.222%,
    #4d884e 33.333%,
    #809254 44.444%,
    #ffd43a 55.556%,
    #f1a02d 66.667%,
    #b65329 77.778%,
    #975f60 88.889%,
    #3e2b3e 100%
  );
}
