/* Smart rewrite workspace — modern focal layout */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap");

.tm-sre-workspace {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--tm-radius, 12px) + 4px) !important;
  background: var(--tm-card, #fff);
  box-shadow: 0 0.35rem 2rem rgba(13, 71, 161, 0.12), 0 0.15rem 0.5rem rgba(0, 0, 0, 0.06) !important;
}

.tm-sre-workspace__accent {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 71, 161, 0.07) 0%, rgba(230, 81, 0, 0.06) 45%, rgba(21, 101, 192, 0.05) 100%);
  pointer-events: none;
  z-index: 0;
}

.tm-sre-workspace__head {
  position: relative;
  z-index: 1;
  background: linear-gradient(125deg, #0a2540 0%, #1565c0 42%, #b45309 100%);
  margin: 0;
}

.tm-sre-workspace__icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1.25rem;
}

.tm-sre-workspace__body {
  position: relative;
  z-index: 1;
}

.tm-sre-workspace .tm-sre-workspace__stats strong {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tm-sre-pane-badge {
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  background: rgba(13, 71, 161, 0.12);
  color: var(--tm-primary, #0d47a1);
}

.tm-sre-pane-badge--out {
  background: rgba(46, 125, 50, 0.14);
  color: #2e7d32;
}

.tm-sre__in,
.tm-sre__out {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.55;
  resize: vertical;
  min-height: 10rem;
  border-radius: 10px !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.tm-sre-pane-output:focus {
  border-color: rgba(46, 125, 50, 0.45) !important;
  box-shadow: 0 0 0 0.15rem rgba(46, 125, 50, 0.15);
}

.tm-sre-pane-input:focus {
  border-color: rgba(13, 71, 161, 0.35) !important;
  box-shadow: 0 0 0 0.15rem rgba(13, 71, 161, 0.12);
}

.tm-sre-toolbar {
  backdrop-filter: blur(8px);
}

.tm-sre-mode-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tm-primary, #0d47a1);
  margin-bottom: 0.45rem;
}

.tm-sre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tm-sre-chip {
  border: 1px solid rgba(13, 71, 161, 0.28) !important;
  background: #fff !important;
  color: #163055 !important;
  font-weight: 600;
  padding-inline: 0.85rem !important;
  gap: 0.25rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.tm-sre-chip i {
  opacity: 0.85;
  font-size: 0.95em;
}

.tm-sre-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.2rem 0.45rem rgba(13, 71, 161, 0.15);
}

.tm-sre-chip.active {
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 0.2rem 0.65rem rgba(13, 71, 161, 0.35);
}

.tm-sre-chip.active i {
  opacity: 1;
}

.tm-sre-status {
  min-height: 1.25rem;
  color: #546e7a;
}

.tm-sre-kbd {
  font-family: inherit;
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
}

.tm-sre--home .tm-sre__in,
.tm-sre--home .tm-sre__out {
  min-height: 9rem;
}

@media (max-width: 991px) {
  .tm-sre-workspace__head .tm-sre-workspace__stats {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tm-sre-chip {
    transition: none;
  }
}
