/* =========================
   GLOBAL
   ========================= */

   body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background: #f9f9f9;
  }
  
  h1, h2 {
    margin-bottom: 10px;
  }
  
  .tabs {
    margin-bottom: 20px;
  }
  
  .tabs button {
    padding: 10px 15px;
    border: 1px solid #ccc;
    background: #eee;
    cursor: pointer;
    margin-right: 5px;
  }
  
  .tabs button.active {
    background: #fff;
    border-bottom: 2px solid #f9f9f9;
    font-weight: bold;
  }
  
  .tabContent {
    display: none;
    background: #fff;
    padding: 20px;
    border: 1px solid #ccc;
  }
  
  .visible {
    display: block;
  }
  
  /* =========================
     REPOSITORY TAB
     ========================= */
  
  #items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .item {
    border: 1px solid #ccc;
    padding: 10px;
    background: #fff;
    width: 280px;
  }
  
  .item h3 {
    margin: 0 0 5px 0;
  }
  
  .item textarea {
    width: 100%;
    height: 80px;
    font-family: monospace;
    margin-bottom: 5px;
  }
  
  .svg-container {
    border: 1px solid #aaa;
    padding: 10px;
    background: white;
    margin-top: 10px;
    width: 100%;
    overflow: hidden;
  }
  
  .svg-container svg {
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  
  /* =========================
     EDITOR & VIEWER TAB
     ========================= */
  
  #editorForm input {
    display: block;
    margin: 5px 0 10px 0;
    width: 100%;
    font-size: 14px;
    padding: 5px;
    box-sizing: border-box;
  }
  
  #editorForm label {
    font-weight: bold;
  }
  
  .codePreviewRow {
    display: flex;
    gap: 20px;
    margin-top: 20px;
  }
  
  .codeBox {
    width: 50%;
    display: flex;
    flex-direction: column;
  }
  
  #itemSVG {
    width: 100%;
    font-family: monospace;
    font-size: 14px;
    box-sizing: border-box;
  }
  
  .inlinePreviewBox {
    flex: 1; /* fill the rest of the space */
    min-width: 0; /* prevents overflow pushing side */
  }
  
  #svgPreviewContainer {
    width: 100%;
    height: 60vh;
    margin: 0 auto;
    border: 1px solid #ccc;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
  }
  
  /* The inline SVG scales to fit container */
  #svgPreviewContainer svg {
    max-width: 100%;
    max-height: 100%;
    cursor: pointer;
  }
  
  .iframeSection {
    margin-top: 30px;
  }
  
  .highlight-outline {
    stroke: red !important;
    stroke-width: 5 !important;
    paint-order: stroke fill;
  }
  
  /* =========================
     IMPORT/EXPORT TAB
     ========================= */
  
  #jsonOutput {
    white-space: pre-wrap;
    background: #eef;
    padding: 10px;
    border: 1px solid #ccc;
    max-height: 250px;
    overflow-y: auto;
  }
  