.priyank-code-tabs {
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 12px 0;
  overflow: hidden;
  background: #fff;
}

/* header and control row */
.priyank-code-tabs .ct-header { padding: 8px 12px; background: #fafafa; border-bottom: 1px solid #eee; font-weight: 600; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.ct-header-row { display:flex; justify-content:space-between; align-items:center; gap:12px; }

/* tabs */
.priyank-code-tabs .ct-tabs { display:flex; gap:6px; padding: 10px; background: #fff; border-bottom: 1px solid #efefef; flex-wrap:wrap; }
.ct-tab { background: #f5f5f5; border: 1px solid #e6e6e6; padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.ct-tab.ct-active { background: #0073aa; color: #fff; border-color: #006195; }

/* panels area */
.priyank-code-tabs .ct-panels { padding: 12px; background: #fff; }

/* toolbar */
.ct-toolbar { display:flex; justify-content:flex-end; margin-bottom:8px; gap:8px; }
.ct-copy-btn, .ct-open-btn, .ct-split-toggle { background: #0073aa; color: #fff; border: none; padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.ct-copy-btn:hover, .ct-open-btn:hover, .ct-split-toggle:hover { background: #005f8d; }

/* iframe and code */
.ct-iframe-wrap { border: 1px solid #ddd; border-radius: 4px; overflow: hidden; margin-top: 8px; }
.ct-preview-iframe { width: 100%; height: 320px; border: 0; display: block; }

/* code area styling */
pre { margin: 0; padding: 12px; background: #2d2d2d; color: #fff; border-radius: 4px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 13px; }

/* --- SPLIT MODE (desktop) --- */
.priyank-code-tabs.ct-split .ct-panels {
  display: flex;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.priyank-code-tabs.ct-split .ct-panel {
  max-width: 50%;
  width: 50%;
}

/* Ensure code panels occupy left column and preview the right */
.priyank-code-tabs.ct-split .ct-panel-html,
.priyank-code-tabs.ct-split .ct-panel-css,
.priyank-code-tabs.ct-split .ct-panel-js {
  grid-column: 1 / 2;
}

.priyank-code-tabs.ct-split .ct-panel-preview {
  grid-column: 2 / 3;
  display: block !important;
}

/* small responsive: stacked on mobile (code on top, preview below) */
@media (max-width: 899px) {
  .priyank-code-tabs.ct-split .ct-panels {
    display: block;
  }
  .priyank-code-tabs .ct-preview-iframe {
    height: 300px;
  }
  .priyank-code-tabs.ct-split .ct-panel {
    width: 100%;
  }
}

/* limit code block height so preview is visible */
.priyank-code-tabs pre {
  max-height: 52vh;
}

/* small layout for the editor's input grid */
.ct-editor-grid { display:flex; gap:12px; margin-top:10px; }
.ct-editor-grid > div { flex:1; }
@media (max-width: 800px) { .ct-editor-grid { flex-direction: column; } }
.ct-main-controls {
  padding: 8px 12px;
}
