/* ===========================================================
   SHARED TOOL STYLES
   Common patterns used across multiple tools so we don't
   duplicate the toolbar/pane/button CSS in every file.
=========================================================== */

.tool-stub {
  flex: 1; display: flex; flex-direction: column;
  background: #c0c0c0; padding: 20px;
  font-family: Verdana, sans-serif; font-size: 11px;
  overflow: auto;
}
.tool-stub .stub-panel {
  background: #ffffff; border: 2px inset #ffffff;
  padding: 24px; max-width: 700px; margin: 0 auto;
  font-family: "Courier New", monospace; font-size: 13px;
}
.tool-stub h1 {
  font-family: Verdana, sans-serif; font-size: 16px;
  color: #000080; margin-bottom: 6px;
  border-bottom: 1px solid #808080; padding-bottom: 4px;
}
.tool-stub .meta {
  color: #808080; font-size: 11px; margin-bottom: 14px;
  font-family: Verdana, sans-serif;
}
.tool-stub .ascii-art {
  color: #000080; white-space: pre; font-size: 10px;
  line-height: 1.2; margin: 8px 0;
}
.tool-stub h2 {
  font-family: Verdana, sans-serif; font-size: 12px;
  background: #000080; color: #fff; padding: 2px 6px;
  margin: 14px 0 6px 0;
}
.tool-stub ul { margin: 6px 0 12px 24px; line-height: 1.6; }
.tool-stub ul li { color: #000; }
.tool-stub .status {
  background: #ffffe1; border: 1px solid #808080;
  padding: 6px 10px; margin: 12px 0;
  font-family: Verdana, sans-serif;
}

/* ----- shared shell for "real" tools (toolbar + body) ----- */
.t-root {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; background: #c0c0c0;
  font-family: Verdana, sans-serif; font-size: 11px;
}
.t-toolbar {
  background: #c0c0c0; border-bottom: 2px groove #ffffff;
  padding: 4px 6px; display: flex; flex-wrap: wrap; gap: 4px;
  align-items: center; flex-shrink: 0;
}
.t-toolbar .group {
  display: flex; gap: 2px; padding: 0 4px; align-items: center;
  border-left: 1px solid #808080; border-right: 1px solid #ffffff;
}
.t-toolbar .group:first-child { border-left: none; }
.t-toolbar .group:last-child { border-right: none; }
.t-btn {
  background: #c0c0c0; border: 2px outset #ffffff;
  padding: 2px 8px; font-family: Verdana, sans-serif;
  font-size: 11px; cursor: pointer; color: #000; white-space: nowrap;
}
.t-btn:active, .t-btn.pressed { border: 2px inset #ffffff; padding: 3px 7px 1px 9px; }
.t-btn:disabled { color: #808080; cursor: default; }
.t-toolbar label { display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; }
.t-toolbar select, .t-toolbar input[type=text], .t-toolbar input[type=number] {
  font-family: Verdana, sans-serif; font-size: 11px;
  border: 2px inset #ffffff; background: #ffffff; padding: 1px 4px;
}

.t-body { flex: 1; display: flex; overflow: hidden; gap: 4px; padding: 4px; min-height: 0; }
.t-pane {
  flex: 1; display: flex; flex-direction: column;
  background: #c0c0c0; border: 2px inset #ffffff; min-width: 0;
}
.t-pane-title {
  background: linear-gradient(to right, #000080, #1084d0);
  color: #fff; padding: 2px 6px; font-size: 11px; font-weight: bold;
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.t-pane-body { flex: 1; overflow: auto; background: #ffffff; padding: 6px; min-height: 0; }

.t-textarea {
  width: 100%; height: 100%; box-sizing: border-box;
  border: none; outline: none; resize: none;
  font-family: "Courier New", monospace; font-size: 12px;
  padding: 6px; background: #ffffff; color: #000;
  white-space: pre;
}
.t-textarea:focus { background: #ffffe8; }

.t-output {
  font-family: "Courier New", monospace; font-size: 12px;
  white-space: pre; padding: 6px;
}

.t-validation {
  background: #ffffe1; border-top: 1px solid #808080;
  padding: 3px 8px; font-size: 11px; font-family: "Courier New", monospace;
  color: #008000; flex-shrink: 0;
}
.t-validation.error { background: #ffe0e0; color: #a00000; }
.t-validation.warn { background: #fff4d0; color: #806000; }
