.groove-overlay[hidden] {
  display: none;
}
.groove-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(22, 32, 48, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #182b42;
  font:
    13px "Segoe UI",
    sans-serif;
}
.groove-dialog {
  width: min(960px, 100%);
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  background: #f2f3f5;
  border: 1px solid #687582;
  border-radius: 5px;
  box-shadow: 0 14px 50px #0004;
  overflow: hidden;
}
.groove-dialog button,
.groove-dialog input,
.groove-dialog select {
  font: inherit;
  color: inherit;
}
.groove-dialog button {
  min-height: 29px;
  padding: 4px 12px;
  border: 1px solid #8e9cac;
  border-radius: 3px;
  background: linear-gradient(#fff, #e2e7ed);
  cursor: pointer;
}
.groove-dialog button:hover {
  border-color: #3286c8;
  background: #e3effa;
}
.groove-dialog button:focus-visible,
.groove-dialog input:focus-visible,
.groove-dialog select:focus-visible {
  outline: 2px solid #226cc1;
  outline-offset: 1px;
}
.groove-dialog button:disabled {
  opacity: 0.45;
  cursor: default;
}
.groove-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 12px;
  background: #e0e6ed;
  border-bottom: 1px solid #9ba8b7;
}
.groove-header button {
  min-height: 24px;
  padding: 0 7px;
  color: white;
  border-color: #b14141;
  background: #c85454;
  font-size: 19px;
  line-height: 22px;
}
.groove-content {
  padding: 12px;
  overflow: auto;
}
.groove-caption {
  margin-bottom: 8px;
  font-weight: 600;
}
.groove-types {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
}
.groove-dialog .groove-type {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  padding: 6px;
  background: #fff;
  min-height: 125px;
  border-radius: 0;
}
.groove-type svg {
  width: 132px;
  max-width: 100%;
  height: 88px;
}
.groove-dialog .selected {
  border-color: #254ea9;
  box-shadow: inset 0 0 0 2px #254ea9;
  background: #f0f6ff;
}
.groove-note {
  margin: 10px 0;
  color: #4b5c70;
  font-size: 12px;
}
.groove-modes {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px;
  border: 1px solid #b6c0cb;
  margin: 8px 0 12px;
}
.groove-modes label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.groove-table-wrap {
  overflow: auto;
  max-height: 160px;
  background: white;
  min-height: 75px;
  border: 1px solid #a9b4c1;
}
.groove-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 540px;
  table-layout: fixed;
}
.groove-table th {
  background: #e3e8ef;
  font-weight: 500;
  padding: 6px 5px;
}
.groove-table td,
.groove-table th {
  border: 1px solid #b4bfcb;
  text-align: left;
}
.groove-table th:first-child {
  width: 25%;
}
.groove-table td input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  padding: 6px;
}
.groove-table tr.selected {
  background: #dfecff;
  box-shadow: none;
}
.groove-error {
  color: #b32132;
  min-height: 18px;
  margin: 9px 0 0;
}
.groove-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #b7c0cc;
  padding: 10px 12px;
}
.groove-footer > span {
  flex: 1;
  font-size: 12px;
  color: #526275;
}
.groove-dialog .groove-primary {
  border-color: #326dae;
  background: #d9eaff;
  font-weight: 600;
}
.groove-dialog--drawing {
  width: min(1240px, 100%);
  height: min(820px, calc(100vh - 36px));
}
.groove-draw-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px;
  border-bottom: 1px solid #b7c0cc;
}
.groove-draw-bar select {
  max-width: 180px;
  padding: 5px;
  border: 1px solid #9daabb;
  background: white;
}
.groove-draw-layout {
  display: flex;
  flex: 1;
  min-height: 220px;
  overflow: hidden;
}
.groove-canvas-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.groove-base,
.groove-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.groove-preview {
  cursor: crosshair;
  touch-action: none;
}
.groove-cursor {
  position: absolute;
  bottom: 8px;
  left: 12px;
  background: #ffffffdf;
  color: #35516d;
  font:
    12px Consolas,
    monospace;
  pointer-events: none;
  padding: 4px 8px;
}
.groove-draw-side {
  width: 235px;
  flex-shrink: 0;
  padding: 13px;
  background: #f7f8fa;
  border-left: 1px solid #b7c0cc;
  overflow: auto;
  box-sizing: border-box;
}
.groove-draw-side p {
  font-size: 12px;
  line-height: 1.45;
  color: #526275;
}
.groove-draw-side p.groove-error {
  color: #b32132;
}
.groove-draw-side label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 7px 0;
}
.groove-draw-side input {
  width: 140px;
  min-width: 0;
  padding: 5px;
  border: 1px solid #a2b0c0;
  background: white;
}
.groove-draw-side > button {
  width: 100%;
  margin: 3px 0;
}
.groove-created {
  border-top: 1px solid #ccd5df;
  padding-top: 10px;
  margin-top: 12px;
}
.groove-created > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 0;
  font-size: 12px;
}
.groove-created > div > span {
  overflow-wrap: anywhere;
}
.groove-created button {
  padding: 0 7px;
  min-height: 22px;
}
#createGrooveButton {
  margin-top: 8px;
  padding: 0;
  cursor: pointer;
  color: #293a4e;
}
#createGrooveButton.selected {
  outline: 2px solid #2776bf;
  background: #d5e9ff;
}
@media (max-width: 760px) {
  .groove-overlay {
    padding: 5px;
  }
  .groove-dialog {
    max-height: calc(100vh - 10px);
  }
  .groove-types {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .groove-dialog .groove-type {
    min-height: 96px;
    padding: 3px;
  }
  .groove-type svg {
    height: 62px;
  }
  .groove-draw-side {
    width: 190px;
    padding: 8px;
  }
  .groove-draw-side input {
    width: 105px;
  }
  .groove-footer {
    flex-wrap: wrap;
  }
}
