body {
  display: flex;
  flex-direction: column;
  color: var(--vscode-editor-foreground);
}

form {
  margin-top: 5px;
  margin-bottom: 10px;
}

.help-link {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: calc(var(--type-ramp-base-font-size) + 2px);
  font-weight: bold;
  text-decoration: none;
}

.help-link:hover {
  text-decoration: underline;
}

.grid-group-div {
  margin-bottom: 10px;
}

.grid-group-div * {
  vertical-align: bottom;
}

.grid-header-div , .grid-value-div {
  display: block;
}

.grid-header-div {
  margin-bottom: 4px;
}

.grid-value-div {
  margin-bottom: 6px;
}

.app-form-table {
  width: 100%;
  padding: 0px;
  margin: 0px;
}

.debug-tools-table {
  table-layout: fixed;
  width: 100%;
  padding: 5px;
  border-collapse: collapse;
}

.debug-tools-table th, .debug-tools-table td {
  border-bottom: 1px solid var(--vscode-tab-border);
  width: 13%;
  text-align: center;
}

.debug-tools-table th {
  border-bottom: 3px solid var(--vscode-tab-border);
  padding-bottom: 5px;
}

.debug-tools-table th:nth-child(1), .debug-tools-table td:nth-child(1) {
  width: 20px;
}

.debug-tools-table th:nth-child(2), .debug-tools-table td:nth-child(2) {
  width: 40%;
  text-align: left;
}

fieldset {
  margin-bottom: 10px;
  width: calc(var(--design-unit)* 140px);
  border: 1px solid var(--vscode-textBlockQuote-border);
}

fieldset.no-border  {
  border: 0 none;
  width: calc(var(--design-unit)* 140px);
}

.toolchains-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px; 
}

.toolchains-container vscode-checkbox {

}


#boardImg {
  min-width: 20vw;
  min-height: 20vh;
  max-width: 50vw;
  max-height: 50vh;
  width: 100%;
  height: auto;
  object-fit: contain; 
}

vscode-dropdown {
  width: calc(var(--design-unit)* 135px);
  min-width: calc(var(--design-unit)* 60px);

}

vscode-text-field {
  width: calc(var(--design-unit)* 135px);
  min-width: calc(var(--design-unit)* 60px);
}

vscode-text-field.browse-field {
  width: calc(var(--design-unit)* 114px);
  min-width: calc(var(--design-unit)* 40px);
}

vscode-button {
  height: calc(var(--input-height)* 1px);
}

.runner-install {
  position: absolute;
  margin-left: 5px;
}

.combo-dropdown {
  position: relative;
  display: inline-block;
  width: calc(var(--design-unit)* 135px);
  min-width: calc(var(--design-unit)* 60px);
}

.combo-dropdown .combo-dropdown-control {
  align-items: center;
  box-sizing: border-box;
  background: var(--input-background);
  color: var(--input-foreground);
  border: calc(var(--border-width)* 1px) solid var(--dropdown-border);
  border-radius: calc(var(--corner-radius-round)* 1px);
  min-width: var(--input-min-width);
  outline: none;
  cursor: pointer;
  min-height: 100%;
  display: flex;
  font-family: inherit;
  font-size: var(--type-ramp-base-font-size);
  line-height: var(--type-ramp-base-line-height);
  padding: 2px 6px 2px 8px;
  width: 100%;
  height: calc(var(--input-height)* 1px);
}

.combo-dropdown .combo-dropdown-control:focus {
  border: calc(var(--border-width)* 1px) solid var(--focus-border);
}

.combo-dropdown .combo-dropdown-control::placeholder {
  color: var(--input-placeholder-foreground);
}

.combo-dropdown-control:disabled {
  cursor: default;
  background: color-mix(in srgb, var(--input-background) 30%, transparent);
  color: color-mix(in srgb, var(--input-foreground) 40%, transparent);
  border-color: color-mix(in srgb, var(--dropdown-border) 40%, transparent);
}

.combo-dropdown .indicator, ::slotted(svg), ::slotted(span) {
  fill: currentcolor;
  position: absolute;
  top: 13px;
  right: 7px;
  min-height: calc(var(--design-unit)* 4px);
  min-width: calc(var(--design-unit)* 4px);
  height: 1em;
  width: 1em;
  transform: translateY(-50%);
  pointer-events: none;
}

.combo-dropdown .indicator {
  flex: 0 0 auto;
  margin-inline-start: 1em;
}

.dropdown-content {
  display: none;
  position: absolute;
  box-sizing: border-box;
  background: var(--input-background);
  border: calc(var(--border-width)* 1px) solid var(--focus-border);
  border-radius: calc(var(--corner-radius-round)* 1px);
  min-width: 100%;
  max-height: var(--dropdown-list-max-height);
  overflow-y: auto;
  z-index: 1;
}

.dropdown-item {
  color: var(--foreground);
  font-family: inherit;
  font-size: var(--type-ramp-base-font-size);
  padding: 2px 2px;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: var(--vscode-inputOption-hoverBackground);
}

.description {
  color: var(--vscode-editorInlayHint-foreground);
  font-size: calc(var(--type-ramp-base-font-size) - 2px);
  padding-left: 5px;
  text-align: right;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

.spinner {
  position: absolute;
  top: 0;
  left: 30px;
  width: 12px;
  height: 12px;
  border: 3px solid rgba(0, 0, 0, 0.3);
  border-top-color: var(--vscode-statusBar-focusBorder);
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
}

.tooltip {
  position: relative;
  background: rgba(0,0,0,0.3);
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border-radius: 50%;
  padding: 0;
  cursor: help;
  border: 1px solid var(--vscode-editor-foreground);
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  background: rgba(0,0,0,0.8);
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  max-width: 90vw;
  border-radius: 5px;
  color: #fff;
  padding: 8px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: pre-wrap;
  pointer-events: none;
  visibility: hidden;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

.tooltip[data-tooltip]:hover::after {
  left: 50%;
  transform: translateX(-50%);
  white-space: normal;
}

@media screen and (max-width: 400px) {
  .tooltip::after {
    right: 0;
    left: auto;
    transform: translateX(-10%);
  }
}

@media screen and (max-width: 300px) {
  .tooltip::after {
    left: 0;
    right: auto;
    transform: translateX(10%);
  }
}


.no-icon-tooltip {
  
}

.no-icon-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  background: rgba(0,0,0,0.8);
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  max-width: 90vw;
  border-radius: 5px;
  color: #fff;
  padding: 8px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: normal;
  pointer-events: none;
  visibility: hidden;
  font-family: var(--font-family);
  font-size: var(--type-ramp-base-font-size);
}

.no-icon-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

.no-icon-tooltip[data-tooltip]:hover::after {
  left: 50%;
  transform: translateX(-50%);
  white-space: normal;
}

@media screen and (max-width: 400px) {
  .no-icon-tooltip::after {
    right: 0;
    left: auto;
    transform: translateX(-10%);
  }
}

@media screen and (max-width: 300px) {
  .no-icon-tooltip::after {
    left: 0;
    right: auto;
    transform: translateX(10%);
  }
}
