* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: #333;
}

body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.pane {
  min-width: 0;
  min-height: 0;
  padding: 1rem 1.25rem;
  border-right: 1px solid #e0e0e0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.pane:last-of-type {
  border-right: none;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  flex-shrink: 0;
}

/* Form */
.form-row {
  margin-bottom: 0.75rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.25rem;
  color: #555;
}

input,
textarea,
button {
  width: 100%;
  max-width: 320px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

textarea {
  min-height: 80px;
  resize: vertical;
  font-family: monospace;
}

button {
  max-width: 120px;
  cursor: pointer;
  background: #333;
  color: #fff;
  border: none;
  margin-top: 0.5rem;
}

button:hover {
  background: #555;
}

.typical-events {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e8e8e8;
}

.typical-events-label {
  display: block;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.typical-event-btn {
  max-width: none;
  padding: 0.35rem 0.6rem;
  margin: 0.25rem 0.25rem 0 0;
  font-size: 0.8rem;
  background: #555;
}

.typical-event-btn:hover {
  background: #333;
}

/* dataLayer */
#dataLayerOutput {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1rem;
  min-height: 120px;
  font-family: monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.refresh-btn {
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

/* Backend */
.pane-backend h3 {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
}

.backend-link {
  display: inline-block;
  font-size: 0.85rem;
  color: #0066cc;
  margin-bottom: 0.75rem;
  text-decoration: none;
}

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

.backend-controls {
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.backend-label,
.backend-input {
  display: block;
}

.backend-input {
  max-width: 200px;
  margin-top: 0.25rem;
}

.clear-responses-btn {
  margin-top: 0.75rem;
}

.endpoint-block {
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.api-input {
  display: block;
  max-width: 240px;
  margin-bottom: 0.35rem;
}

.api-btn {
  margin-right: 0.5rem;
  margin-bottom: 0.35rem;
}

.api-output {
  background: #f0f4f8;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.75rem;
  margin: 0.35rem 0 0;
  font-family: monospace;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 180px;
  overflow: auto;
}

.api-output.error {
  background: #fff0f0;
  border-color: #e0a0a0;
}

.api-output.success {
  background: #f0fff0;
  border-color: #a0c0a0;
}
