/* Tool-specific styles for UUID / GUID Batch Generator. */
.uuid-tool {
  --uuid-accent: #4338ca;
  --uuid-accent-strong: #3730a3;
  --uuid-accent-soft: #eef2ff;
  --uuid-line: #dbe3ef;
  display: grid;
  gap: 14px;
}

.uuid-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f8fafc;
}

.uuid-local-note,
.uuid-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.uuid-local-note {
  flex: 1 1 320px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.uuid-local-note svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--uuid-accent);
}

.uuid-local-note span,
.uuid-actions span {
  overflow-wrap: anywhere;
}

.uuid-actions {
  justify-content: flex-end;
}

.uuid-export-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.uuid-export-select select {
  min-height: 38px;
  max-width: 150px;
}

.uuid-workspace {
  display: grid;
  grid-template-columns: minmax(300px, .88fr) minmax(0, 1.12fr);
  gap: 14px;
}

.uuid-panel {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.uuid-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--uuid-line);
}

.uuid-panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.uuid-panel-head p {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.uuid-panel-head > svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: var(--uuid-accent);
}

.uuid-settings-body {
  display: grid;
  gap: 16px;
  padding: 14px;
}

.uuid-version-fieldset,
.uuid-case-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.uuid-version-fieldset legend,
.uuid-case-fieldset legend,
.uuid-control-grid label > span {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.uuid-version-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 4px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.uuid-version-switch button {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 70px;
  padding: 8px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  cursor: pointer;
}

.uuid-version-switch button strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
}

.uuid-version-switch button span {
  font-size: 11px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.uuid-version-switch button[aria-pressed="true"],
.uuid-case-switch button[aria-pressed="true"] {
  background: #fff;
  color: var(--uuid-accent-strong);
  box-shadow: 0 1px 5px rgba(51, 65, 85, .16);
}

.uuid-version-note {
  min-height: 42px;
  margin: 8px 0 0;
  padding: 9px 10px;
  border-left: 3px solid var(--uuid-accent);
  background: var(--uuid-accent-soft);
  color: #3730a3;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.uuid-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.uuid-control-grid label {
  min-width: 0;
}

.uuid-control-grid input,
.uuid-control-grid select {
  width: 100%;
  min-height: 42px;
}

.uuid-control-grid input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .1);
}

.uuid-control-grid small {
  display: block;
  margin-top: 5px;
  color: var(--color-muted);
  font-size: 11px;
}

.uuid-case-switch {
  display: inline-flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.uuid-case-switch button {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.uuid-output-panel textarea {
  display: block;
  width: calc(100% - 28px);
  min-height: 370px;
  margin: 14px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
}

.uuid-stats-panel {
  grid-column: 1 / -1;
}

.uuid-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--uuid-line);
}

.uuid-stat-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 78px;
  padding: 13px 14px;
  background: #fff;
}

.uuid-stat-grid span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.uuid-stat-grid strong {
  color: #172554;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.uuid-status.is-error {
  color: #b91c1c;
}

.uuid-status.is-success {
  color: #047857;
}

@media (max-width: 900px) {
  .uuid-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .uuid-stats-panel {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .uuid-toolbar,
  .uuid-actions {
    align-items: stretch;
  }

  .uuid-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .uuid-actions button {
    flex: 1 1 132px;
    justify-content: center;
  }

  .uuid-export-select {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .uuid-export-select select {
    flex: 1 1 auto;
    max-width: none;
  }

  .uuid-version-switch,
  .uuid-control-grid,
  .uuid-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .uuid-version-switch button {
    min-height: 52px;
  }

  .uuid-output-panel textarea {
    min-height: 300px;
    font-size: 12px;
  }
}
