/* Override Tabler primary color */
:root {
  --tblr-primary: #00ada1;
  --tblr-primary-rgb: 0, 173, 161;
}

body {
  background: var(--tblr-body-bg);
}

.app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

@media (max-width: 768px) {
  .app {
    padding: 1rem 0.75rem;
  }

  .panel {
    width: 100%;
    border-radius: var(--tblr-border-radius);
  }

  .stage {
    height: 240px;
  }
}

.panel {
  width: min(800px, 90vw);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.hidden {
  display: none !important;
}

#panel-test.hidden {
  display: none !important;
}

/* Test stage */
.stage {
  width: 100%;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  background: #ffffff;
}

.shape {
  width: 120px;
  height: 120px;
  background: #1f5eff;
}

.shape.circle {
  border-radius: 50%;
}

.status {
  display: none;
}

/* Results */
.result-card {
  background: var(--tblr-card-bg);
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  padding: 1rem;
  margin: 1rem 0;
}

.result-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.result-grid > div {
  padding: 0.75rem;
  border-radius: var(--tblr-border-radius);
  background: var(--tblr-gray-50);
  border: 1px solid var(--tblr-border-color-light);
}

.share-link {
  margin: 1rem 0 0;
  padding: 0.75rem;
  border-radius: var(--tblr-border-radius);
  background: var(--tblr-bg-surface-secondary);
  font-size: 0.875rem;
  word-break: break-all;
  display: none;
}

.share-link.visible {
  display: block;
}

/* Fullscreen test mode */
body.fullscreen-test {
  background: #ffffff;
}

body.fullscreen-test .app {
  padding: 0;
}

body.fullscreen-test .panel {
  display: none !important;
}

body.fullscreen-test #panel-test {
  display: flex !important;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
}

body.fullscreen-test #panel-test .card-body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
}

body.fullscreen-test #panel-test .card-body > :not(.stage) {
  display: none !important;
}

body.fullscreen-test #panel-test .stage {
  width: 100vw;
  height: 100vh;
  margin: 0;
  border: none;
  border-radius: 0;
}

/* Graph */
.rt-graph {
  width: 100%;
  height: auto;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  background: #ffffff;
  display: block;
}

.graph-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--tblr-secondary);
  margin: 0.5rem 0 0;
  align-items: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-dot,
.legend-square,
.legend-tick {
  display: inline-block;
  flex-shrink: 0;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f9d55;
}

.legend-square {
  width: 8px;
  height: 8px;
  background: #d94a38;
}

.legend-tick {
  width: 2px;
  height: 10px;
  background: #111111;
}

/* JSON Export */
.json-export .json-output {
  width: 100%;
  min-height: 220px;
  padding: 0.75rem;
  border-radius: var(--tblr-border-radius);
  border: 1px solid var(--tblr-border-color);
  font-family: var(--tblr-font-monospace);
  font-size: 0.75rem;
  background: var(--tblr-gray-50);
  color: var(--tblr-body-color);
  resize: vertical;
}

/* Credits icon */
.test-credit-icon {
  width: 14px;
  height: 14px;
  fill: #000000;
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.25rem;
}
