/* filepath: src/admin/style.css */
body.admin_page_kayzart #wpadminbar,
body.admin_page_kayzart #adminmenumain,
body.admin_page_kayzart #adminmenuwrap,
body.admin_page_kayzart #wpfooter,
body.admin_page_kayzart #screen-meta,
body.admin_page_kayzart #screen-meta-links {
  display: none;
}

body.admin_page_kayzart #wpcontent,
body.admin_page_kayzart #wpbody-content {
  margin: 0;
  padding: 0;
}

body.admin_page_kayzart #wpcontent {
  margin-left: 0;
}

html.wp-toolbar,
body.admin_page_kayzart {
  padding-top: 0;
  margin-top: 0;
  background: #111318;
}

body.admin_page_kayzart #wpwrap,
body.admin_page_kayzart #wpcontent,
body.admin_page_kayzart #wpbody,
body.admin_page_kayzart #wpbody-content {
  height: 100%;
}

@media screen and (max-width: 600px) {
  body.admin_page_kayzart #wpbody {
    padding-top: 0 !important;
  }
}

#kayzart-app {
  height: 100vh;
}

.kayzart-app {
  --kayzart-settings-width: 320px;
  height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #111318;
  color: #e6e8ea;
  overflow: hidden;
}

.kayzart-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #2b2f38;
  background: #1a1d24;
}

.kayzart-toolbarGroup {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.kayzart-toolbarCluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kayzart-toolbarCluster-divider {
  padding-left: 10px;
  border-left: 1px solid #2b2f38;
}

.kayzart-toolbarLeft {
  justify-self: start;
}

.kayzart-toolbarCenter {
  justify-self: center;
}

.kayzart-toolbarRight {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  justify-self: end;
  min-width: 0;
}

.kayzart-toolbarCluster-rightPrimary {
  flex: 0 0 auto;
  order: 2;
}

.kayzart-toolbarCluster-rightSecondary {
  min-width: 0;
  flex: 0 1 auto;
  order: 1;
}

.kayzart-splitButton-save {
  flex: 0 0 auto;
  white-space: nowrap;
}

.kayzart-noticeHost {
  position: fixed;
  right: 16px;
  left: auto;
  top: var(--kayzart-notice-offset-top, 64px);
  z-index: 100000;
}

.kayzart-noticeHost .components-snackbar-list {
  position: fixed;
  right: 16px !important;
  top: var(--kayzart-notice-offset-top, 64px);
  left: auto !important;
  bottom: auto;
  margin: 0;
  width: auto;
}

.kayzart-noticeHost .components-snackbar-list__notices {
  align-items: flex-end;
}

.kayzart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #313743;
  background: #242a34;
  color: #e6e8ea;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.kayzart-toolbar [data-tooltip] {
  position: relative;
}

.kayzart-toolbar [data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
  background: #0b0d12;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 5;
}

.kayzart-toolbar [data-tooltip]:hover::after,
.kayzart-toolbar [data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.kayzart-toolbarTitle {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #2b2f38;
  background: #141821;
  color: #e6e8ea;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  flex: 0 1 auto;
  cursor: pointer;
}

.kayzart-toolbarTitleText {
  max-width: clamp(120px, 28vw, 240px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.kayzart-toolbarTitleSuffix {
  flex: 0 0 auto;
  color: #c4cbd6;
  font-weight: 500;
}

.kayzart-toolbarTitle:hover {
  border-color: #3a4252;
  background: #1a1f27;
}

.kayzart-toolbarTitle:focus-visible {
  outline: 2px solid #4c84ff;
  outline-offset: 2px;
}

.kayzart-btnIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.kayzart-btnIcon svg {
  width: 18px;
  height: 18px;
}

.kayzart-btnIcon-wordpress {
  width: 24px;
  height: 24px;
}

.kayzart-btnIcon-wordpress svg {
  width: 24px;
  height: 24px;
}

.kayzart-btnLabel {
  font-size: 11px;
  line-height: 1.1;
}

.kayzart-btn-stack {
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  min-width: 56px;
  text-align: center;
}

.kayzart-btn-icon {
  padding: 6px;
  min-width: 32px;
  justify-content: center;
}

.kayzart-btn-viewport.is-active {
  background: #202734;
  border-color: #3a4252;
  color: #f1f3f5;
}

.kayzart-btn-stack .kayzart-btnLabel {
  font-size: 10px;
  letter-spacing: 0.02em;
}

.kayzart-btn:hover {
  background: #2d3440;
  color: #f1f3f5;
}

.kayzart-btn:active {
  background: #1b1f27;
  color: #f1f3f5;
}

.kayzart-btn:focus {
  outline: 2px solid #4c84ff;
  outline-offset: 1px;
  color: #f1f3f5;
}

.kayzart-btn-primary {
  background: #2f6feb;
  border-color: #2f6feb;
  color: #fff;
}

.kayzart-btn-back .kayzart-btnLabel {
  font-size: 12px;
}

.kayzart-backMenu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.kayzart-backMenu::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}

.kayzart-backMenuDropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid #2b3340;
  background: #1a1f27;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 30;
}

.kayzart-backMenu:hover .kayzart-backMenuDropdown,
.kayzart-backMenu:focus-within .kayzart-backMenuDropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.kayzart-backMenuItem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #e6e8ea!important;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.kayzart-backMenuItem:hover,
.kayzart-backMenuItem:focus-visible {
  border-color: #343c4a;
  background: #202734;
  color: #f1f3f5;
}

.kayzart-backMenuItem:active {
  background: #1b1f27;
  color: #f1f3f5;
}

.kayzart-btn-primary:hover {
  background: #3b7cff;
}

.kayzart-btn-save.is-unsaved {
  background: #2f6feb;
  border-color: #2f6feb;
  color: #fff;
}

.kayzart-btn-save.is-unsaved:hover {
  background: #3b7cff;
}

.kayzart-splitButton {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.kayzart-splitButton-main {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.kayzart-splitButton-toggle {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
  min-width: 32px;
  padding: 6px;
}

.kayzart-splitMenu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #2b3340;
  background: #1a1f27;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 30;
}

.kayzart-splitMenuTitle {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8f96a2;
  padding: 2px 6px 8px;
}

.kayzart-splitMenuList {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kayzart-splitMenuItem {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #e6e8ea;
  font-size: 13px;
  cursor: pointer;
}

.kayzart-splitMenuItem:hover,
.kayzart-splitMenuItem:focus-visible {
  border-color: #343c4a;
  background: #202734;
}

.kayzart-splitMenuItem:disabled {
  opacity: 0.6;
  cursor: default;
}

.kayzart-splitMenuLabel {
  text-align: left;
}

.kayzart-btn-muted {
  background: #2a303b;
  border-color: #39414f;
  color: #8f96a2;
}

.kayzart-btn-muted.is-active {
  background: #242a34;
  border-color: #313743;
  color: #e6e8ea;
}

.kayzart-btn-muted:hover {
  color: #c4cbd6;
}

.kayzart-btn-muted.is-active:hover {
  color: #f1f3f5;
}

.kayzart-btn-muted:disabled {
  cursor: default;
}

.kayzart-btn-muted:disabled:hover {
  background: #2a303b;
}

.kayzart-btn-settings {
  position: relative;
}

.kayzart-btn-settings.is-active {
  background: #2f6feb;
  border-color: #2f6feb;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(47, 111, 235, 0.35), 0 8px 18px rgba(47, 111, 235, 0.25);
}

.kayzart-btn-settings.is-active:hover {
  background: #3b7cff;
}

/* .kayzart-btn-settings.is-active::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(47, 111, 235, 0.55);
} */

.kayzart-tailwindBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #2a313d;
  background: #141a21;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.kayzart-main {
  flex: 1;
  min-height: 0;
  display: flex;
  background: #0f1116;
  gap: 0;
}

.kayzart-app.is-compact-editors .kayzart-main {
  flex-direction: column;
  position: relative;
}

.kayzart-left,
.kayzart-right {
  min-height: 0;
  flex: 1;
}

.kayzart-app.is-compact-editors .kayzart-left,
.kayzart-app.is-compact-editors .kayzart-right {
  min-width: 0;
  width: 100%;
  flex: 1 1 50%;
}

.kayzart-left {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  min-width: 360px;
  background: #181b22;
  transition: width 0.25s ease, flex-basis 0.25s ease, transform 0.25s ease, opacity 0.2s ease;
}

.kayzart-app.is-compact-editors .kayzart-left {
  min-width: 0;
  border-right: 0;
  border-bottom: 1px solid #2b2f38;
}

.kayzart-app.is-editor-collapsed .kayzart-left {
  transform: translateX(-20px);
  opacity: 0;
  pointer-events: none;
  min-width: 0;
}

.kayzart-resizer {
  width: 6px;
  cursor: col-resize;
  background: #111318;
  position: relative;
  transition: width 0.25s ease, opacity 0.2s ease;
}

.kayzart-app.is-compact-editors .kayzart-resizer,
.kayzart-app.is-compact-editors .kayzart-editorResizer {
  display: none;
}

.kayzart-resizer::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 2px;
  background: #2b2f38;
  transition: background 0.2s ease;
}

.kayzart-resizer:hover::before {
  background: #4c84ff;
}

.kayzart-editorResizer {
  height: 6px;
  flex: 0 0 6px;
  cursor: row-resize;
  background: #141821;
  position: relative;
  touch-action: none;
}

.kayzart-editorResizer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 2px;
  height: 2px;
  background: #2b2f38;
  transition: background-color 0.2s ease;
}

.kayzart-editorResizer:hover::before {
  background: #4c84ff;
}

.kayzart-app.is-editor-collapsed .kayzart-resizer {
  width: 0;
  opacity: 0;
  pointer-events: none;
}

.kayzart-app.is-editor-collapsed .kayzart-right {
  flex: 1 1 auto;
  width: auto;
}

.kayzart-app.is-resizing,
.kayzart-app.is-resizing * {
  -webkit-user-select: none;
  user-select: none;
}

.kayzart-app.is-resizing .kayzart-left,
.kayzart-app.is-resizing .kayzart-resizer,
.kayzart-app.is-resizing .kayzart-editorResizer,
.kayzart-app.is-resizing .kayzart-settings,
.kayzart-app.is-resizing .kayzart-settingsResizer,
.kayzart-app.is-resizing .kayzart-settingsInner {
  transition: none;
}

.kayzart-editorPane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.kayzart-compactEditorTabs {
  display: none;
  border-bottom: 1px solid #2b2f38;
  background: #1f232d;
  padding: 6px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kayzart-compactEditorTabsList {
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.kayzart-compactEditorTab {
  padding-top: 9px;
  padding-bottom: 9px;
}

.kayzart-compactEditorActions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.kayzart-compactEditorAction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  white-space: nowrap;
}

.kayzart-compactEditorActionIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.kayzart-compactEditorActionIcon svg {
  width: 14px;
  height: 14px;
}

.kayzart-compactEditorActionLabel {
  font-size: 11px;
}

.kayzart-app.is-compact-editors .kayzart-compactEditorTabs {
  display: flex;
}

.kayzart-app.is-compact-editors .kayzart-editorPane {
  display: none;
}

.kayzart-app.is-compact-editors .kayzart-editorPane.is-compact-visible {
  display: flex;
}

.kayzart-app.is-compact-editors .kayzart-editorHeader {
  display: none;
}

.kayzart-editorPane + .kayzart-editorPane {
  border-top: 1px solid #2b2f38;
}

.kayzart-editorPane.is-active .kayzart-editorHeader {
  color: #fff;
}

.kayzart-editorHeader {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid #2b2f38;
  background: #1f232d;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a7adb8;
}

.kayzart-editorTitle {
  display: inline-flex;
  align-items: center;
}

.kayzart-editorTitle.has-unsaved::after,
.kayzart-editorTab.has-unsaved::after {
  content: '\25CF';
  margin-left: 6px;
  margin-bottom: 2px;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.kayzart-editorHeader-tabs {
  justify-content: space-between;
  gap: 8px;
}

.kayzart-editorTabs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.kayzart-editorTab {
  border: 0;
  padding: 4px 6px;
  background: transparent;
  color: #a7adb8;
  font-size: 11px;
  letter-spacing: 0.08em;
  /* text-transform: uppercase; */
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.kayzart-editorTab:hover {
  color: #e6e8ea;
}

.kayzart-editorTab.is-active {
  color: #fff;
  border-bottom-color: #2f6feb;
}

.kayzart-editorTab:disabled {
  cursor: default;
  opacity: 0.5;
}

.kayzart-editorActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kayzart-jsModeSelect {
  min-width: 142px;
}

.kayzart-compactJsModeSelect {
  min-width: 132px;
}

.kayzart-editorAction {
  border: 1px solid #39414f;
  background: #2a303b;
  color: #e6e8ea;
  border-radius: 4px;
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
}

.kayzart-editorAction-wrap {
  min-width: 96px;
  text-align: center;
}

.kayzart-editorAction.is-active {
  background: #2f6feb;
  border-color: #2f6feb;
  color: #fff;
}

.kayzart-editorAction.is-active:hover {
  background: #3b7cff;
  border-color: #3b7cff;
}

.kayzart-editorAction:hover {
  background: #333b47;
}

.kayzart-editorAction:active {
  background: #1b1f27;
}

.kayzart-editorAction:disabled {
  opacity: 0.5;
  cursor: default;
}

.kayzart-editorWrap {
  flex: 1;
  min-height: 0;
}

.kayzart-editorWrap-tabs .kayzart-editor {
  display: none;
}

.kayzart-editorWrap-tabs .kayzart-editor.is-active {
  display: block;
}

.kayzart-editor {
  width: 100%;
  height: 100%;
}

.kayzart-editor .cm-editor {
  height: 100%;
}

.kayzart-editor .cm-scroller {
  font-family: var(
    --vscode-editor-font-family,
    'SFMono-Regular',
    Menlo,
    Consolas,
    'Liberation Mono',
    'Courier New',
    monospace
  );
  font-size: 13px;
  line-height: 1.45;
}

.kayzart-right {
  background: #111318;
  position: relative;
}

.kayzart-app.is-compact-editors .kayzart-right {
  min-height: 0;
  overflow: hidden;
}

.kayzart-iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.kayzart-previewBadge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translate(-50%, -6px);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.kayzart-previewBadge.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.kayzart-settingsResizer {
  width: 0;
  opacity: 0;
  cursor: col-resize;
  background: #111318;
  position: relative;
  transition: width 0.28s ease, opacity 0.2s ease;
  pointer-events: none;
}

.kayzart-settingsResizer::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 2px;
  background: #2b2f38;
  transition: background 0.2s ease;
}

.kayzart-settingsResizer:hover::before {
  background: #4c84ff;
}

.kayzart-app.is-settings-open .kayzart-settingsResizer {
  width: 6px;
  opacity: 1;
  pointer-events: auto;
}

.kayzart-settings {
  width: 0;
  max-width: 0;
  flex: 0 0 auto;
  overflow: hidden;
  border-left: 1px solid #2b2f38;
  background: #171a21;
  opacity: 0;
  transform: translateX(24px);
  transition: width 0.28s ease, max-width 0.28s ease, opacity 0.2s ease, transform 0.28s ease;
  pointer-events: none;
}

.kayzart-app.is-settings-open .kayzart-settings {
  width: var(--kayzart-settings-width);
  max-width: var(--kayzart-settings-width);
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.kayzart-app.is-compact-editors .kayzart-settings {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  height: auto;
  z-index: 10;
  box-shadow: -12px 0 24px rgba(0, 0, 0, 0.35);
}

.kayzart-app.is-compact-editors .kayzart-settingsResizer {
  display: none;
}

.kayzart-settingsInner {
  width: var(--kayzart-settings-width);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.kayzart-settingsHeader {
  display: flex;
  align-items: flex-end;
  min-height: 44px;
  padding: 0 12px;
  border-bottom: 1px solid #2b2f38;
}

.kayzart-settingsBody {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kayzart-settingsTabsRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.kayzart-settingsTabs {
  display: flex;
  min-width: 0;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
}

.kayzart-settingsClose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9aa1ab;
  cursor: pointer;
}

.kayzart-settingsClose:hover {
  color: #e6e8ea;
  background: #202734;
}

.kayzart-settingsClose:focus-visible {
  outline: 2px solid #4c84ff;
  outline-offset: 2px;
}

.kayzart-settingsClose svg {
  width: 18px;
  height: 18px;
}

.kayzart-settingsTab {
  flex: 0 0 auto;
  border: 0;
  padding: 12px 4px 8px;
  background: transparent;
  color: #9aa1ab;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.kayzart-settingsTab:hover {
  color: #e6e8ea;
}

.kayzart-settingsTab.is-active {
  color: #e6e8ea;
  border-bottom-color: #2f6feb;
  font-weight: 600;
}

.kayzart-settingsTab:focus-visible {
  outline: 2px solid #4c84ff;
  outline-offset: 2px;
  border-radius: 4px;
}

.kayzart-settingsExternalPanel {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.kayzart-settingsSection {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #242a34;
}

.kayzart-settingsTitle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #242a34;
}

.kayzart-settingsTitleLabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8f96a2;
}

.kayzart-settingsTitleRow {
  display: flex;
  gap: 8px;
  align-items: center;
}

.kayzart-settingsTitleInput {
  flex: 1;
  min-width: 0;
}

.kayzart-settingsTitleSave {
  min-width: 72px;
}

.kayzart-settingsTitleError {
  min-height: 16px;
  font-size: 11px;
  color: #ff9a9a;
}

.kayzart-settingsSection:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kayzart-settingsSectionTitle {
  font-size: 11px;
  /* text-transform: uppercase; */
  letter-spacing: 0.14em;
  color: #8f96a2;
}

.kayzart-settingsItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #1a1f27;
  border: 1px solid #242a34;
}

.kayzart-settingsItem.is-clickable {
  cursor: pointer;
}

.kayzart-settingsItem.is-clickable:hover {
  border-color: #3a4252;
  background: #202734;
}

.kayzart-settingsItemLabel {
  font-size: 12px;
  color: #c9cdd6;
}

.kayzart-settingsItemValue {
  font-size: 12px;
  color: #8f96a2;
  text-align: right;
}

.kayzart-settingsItemValue img {
  max-width: 72px;
  max-height: 54px;
  border-radius: 6px;
  border: 1px solid #2a313d;
}

.kayzart-settingsHelp {
  font-size: 11px;
  color: #6c7480;
}

.kayzart-settingsError {
  font-size: 11px;
  color: #ff9a9a;
}

.kayzart-settingsScriptList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kayzart-settingsScriptRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kayzart-settingsAttrNameInput {
  flex: 0 0 90px;
  min-width: 0;
}

.kayzart-settingsScriptInput {
  flex: 1;
  min-width: 0;
}

.kayzart-settingsScriptButton {
  flex: 0 0 auto;
}

.kayzart-settingsScriptAdd {
  align-self: flex-start;
}

.kayzart-settingsToggle {
  align-items: center;
}

.kayzart-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 38px;
  height: 20px;
  cursor: pointer;
}

.kayzart-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.kayzart-toggleTrack {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #2a303b;
  border: 1px solid #39414f;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.kayzart-toggleTrack::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e6e8ea;
  transition: transform 0.2s ease;
}

.kayzart-toggle input:checked + .kayzart-toggleTrack {
  background: #2f6feb;
  border-color: #2f6feb;
}

.kayzart-toggle input:checked + .kayzart-toggleTrack::before {
  transform: translateX(18px);
}

.kayzart-toggle input:focus-visible + .kayzart-toggleTrack {
  outline: 2px solid #4c84ff;
  outline-offset: 2px;
}

.kayzart-chipList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.kayzart-chip {
  background: #2a303b;
  border: 1px solid #353d4a;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  color: #d1d6df;
}

.kayzart-chipEmpty {
  font-size: 11px;
  color: #6c7480;
}

.kayzart-featureThumb {
  max-width: 72px;
  max-height: 54px;
  border-radius: 6px;
  border: 1px solid #2a313d;
}

.kayzart-settingsTrash {
  justify-content: center;
  margin-top: 4px;
  border: 1px solid #a53838;
  background: transparent;
  color: #ffb4b4;
}

.kayzart-settingsTrash:hover {
  background: rgba(165, 56, 56, 0.2);
}

.kayzart-setupOverlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(59, 124, 255, 0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.16), transparent 40%),
    rgba(6, 8, 12, 0.82);
}

.kayzart-setupCard {
  width: min(640px, 94vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: #161a22;
  border: 1px solid #2b3340;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.kayzart-setupTitle {
  font-size: 18px;
  font-weight: 600;
  color: #f1f3f5;
}

.kayzart-setupIntro {
  font-size: 13px;
  color: #9aa1ab;
}

.kayzart-setupOptions {
  display: grid;
  gap: 12px;
}

.kayzart-setupOption {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #2b3340;
  background: #1b2029;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.kayzart-setupOption:hover {
  border-color: #3b4a63;
  background: #202734;
}

.kayzart-setupOption.is-active {
  border-color: #4c84ff;
  background: #1f2a3d;
}

.kayzart-setupOption input {
  margin-top: 3px;
  accent-color: #4c84ff;
}

.kayzart-setupOptionBody {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kayzart-setupOptionTitle {
  font-size: 14px;
  font-weight: 600;
  color: #e6e8ea;
}

.kayzart-setupOptionDesc {
  font-size: 12px;
  color: #9aa1ab;
}

.kayzart-setupImport {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.kayzart-setupFileLabel {
  position: relative;
  overflow: hidden;
}

.kayzart-setupFileInput {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.kayzart-setupFileName {
  font-size: 12px;
  color: #9aa1ab;
}

.kayzart-setupNote {
  font-size: 12px;
  color: #c6cbd5;
}

.kayzart-setupError {
  min-height: 16px;
  font-size: 12px;
  color: #ff9a9a;
}

.kayzart-setupActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.kayzart-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.kayzart-modalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.72);
}

.kayzart-modalDialog {
  position: relative;
  z-index: 1;
  width: min(520px, 92vw);
  background: #1a1f27;
  border-radius: 12px;
  border: 1px solid #2b3340;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.kayzart-modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #2b3340;
}

.kayzart-modalTitle {
  font-size: 14px;
  font-weight: 600;
  color: #e6e8ea;
}

.kayzart-modalClose {
  background: transparent;
  border: 0;
  color: #9aa1ab;
  font-size: 22px;
  cursor: pointer;
}

.kayzart-modalBody {
  padding: 16px;
  overflow: auto;
}

.kayzart-modalFooter,
.kayzart-modalActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
}

.kayzart-hintBody {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kayzart-hintText {
  margin: 0;
  font-size: 13px;
  color: #c9cdd6;
}

.kayzart-hintCode {
  margin: 0;
  padding: 10px 12px;
  background: #11141a;
  border: 1px solid #2b3340;
  border-radius: 6px;
  font-size: 12px;
  color: #e6e8ea;
  font-family: var(
    --vscode-editor-font-family,
    'SFMono-Regular',
    Menlo,
    Consolas,
    'Liberation Mono',
    'Courier New',
    monospace
  );
  white-space: pre-wrap;
  word-break: break-all;
  user-select: text;
}

.kayzart-modalError {
  color: #ff9a9a;
  padding: 0 16px;
  font-size: 12px;
}

.kayzart-modalForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kayzart-formGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kayzart-formLabel {
  font-size: 12px;
  color: #c6cbd5;
}

.kayzart-formInput,
.kayzart-formSelect {
  background: #11141a;
  border: 1px solid #2b3340;
  color: #e6e8ea;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}

.kayzart-formInput:focus,
.kayzart-formSelect:focus {
  outline: 2px solid #4c84ff;
  outline-offset: 1px;
}

.kayzart-editorActions .kayzart-jsModeSelect,
.kayzart-compactEditorActions .kayzart-jsModeSelect {
  height: 24px;
  padding: 1px 8px;
  border-radius: 4px;
  border-color: #323844;
  background: #0f1116;
  color: #e6e8ea;
  font-size: 11px;
  line-height: 1.2;
}

.wp-core-ui .kayzart-editorActions .kayzart-jsModeSelect:hover,
.wp-core-ui .kayzart-compactEditorActions .kayzart-jsModeSelect:hover,
.wp-core-ui .kayzart-editorActions .kayzart-jsModeSelect:focus,
.wp-core-ui .kayzart-compactEditorActions .kayzart-jsModeSelect:focus {
  color: #e6e8ea;
}

.kayzart-formHint {
  font-size: 11px;
  color: #6c7480;
}

.kayzart-radioRow,
.kayzart-checkboxRow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #d6dae2;
}

.kayzart-radioRow input,
.kayzart-checkboxRow input {
  accent-color: #4c84ff;
}

.kayzart-formRow {
  display: none;
}

.kayzart-formRow.is-visible {
  display: flex;
}

.kayzart-formRow .kayzart-formInput {
  width: 100%;
}

.kayzart-featurePreview {
  border: 1px dashed #2b3340;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8f96a2;
  font-size: 12px;
}

.kayzart-featurePreview img {
  max-width: 100%;
  border-radius: 8px;
}

.kayzart-btn-secondary {
  background: transparent;
  border: 1px solid #3a404c;
}

.kayzart-btn-danger {
  background: transparent;
  border: 1px solid #a53838;
  color: #ffb4b4;
}

/* Prevent WP core button styles from leaking into code editor UI */
.wp-core-ui .kayzart-app .cm-editor .button,
.wp-core-ui .kayzart-app .cm-editor .button-secondary {
  background: transparent!important;
  border: 0;
  color: inherit;
  box-shadow: none;
  text-shadow: none;
  vertical-align: baseline;
}

/* Editor highlight (DOM selector -> editor) */
.cm-editor .kayzart-highlight-inline {
  background: rgba(37, 99, 235, 0.28);
  border-bottom: 1px solid rgba(29, 78, 216, 0.95);
}

.cm-editor .kayzart-highlight-line {
  background: rgba(37, 99, 235, 0.12);
}

.cm-editor .kayzart-change-line-added {
  background: rgba(34, 197, 94, 0.18);
}

.cm-editor .kayzart-change-line-removed {
  background: rgba(239, 68, 68, 0.2);
}

@media (max-width: 1280px) {
  .kayzart-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    grid-template-areas:
      'left right'
      'center center';
    row-gap: 8px;
    overflow: visible;
    position: relative;
    z-index: 20;
  }

  .kayzart-toolbarLeft {
    grid-area: left;
  }

  .kayzart-toolbarRight {
    grid-area: right;
    justify-self: end;
  }

  .kayzart-toolbarCenter {
    grid-area: center;
    justify-self: stretch;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
    overflow-y: hidden;
    white-space: nowrap;
    padding-bottom: 2px;
    padding-top: 2px;
    padding-right: 2px;
  }

  .kayzart-toolbarCenter .kayzart-toolbarTitle {
    min-width: 0;
  }

  .kayzart-toolbarCenter .kayzart-toolbarTitleText {
    max-width: min(23vw, 320px);
  }

  .kayzart-toolbarCenter .kayzart-toolbarCluster {
    flex: 0 0 auto;
  }
}

@media (max-width: 1120px) {
  .kayzart-tailwindBadge {
    display: none;
  }
}

@media (max-width: 1040px) {
  .kayzart-btn-export {
    padding: 6px;
    min-width: 32px;
    justify-content: center;
  }

  .kayzart-btn-export .kayzart-btnLabel {
    display: none;
  }

  .kayzart-splitButton-save .kayzart-splitButton-main {
    padding: 6px;
    min-width: 32px;
    justify-content: center;
  }

  .kayzart-splitButton-save .kayzart-splitButton-main .kayzart-btnLabel {
    display: none;
  }
}

@media (max-width: 560px) {
  .kayzart-compactJsModeSelect {
    min-width: 84px;
  }

  .kayzart-compactEditorAction {
    padding: 4px 6px;
    min-width: 30px;
    justify-content: center;
  }

  .kayzart-compactEditorActionLabel {
    display: none;
  }
}

@media (max-width: 980px) {
  .kayzart-btn-view {
    display: none;
  }
}

.cm-editor .cm-tooltip .cm-textfield {
  color: #e6e8ea;
}

.cm-editor .cm-panel.cm-search [name='close'] {
  color: #e6e8ea;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
}

.cm-editor .cm-panel.cm-search [name='close']:hover {
  background: #333b47;
  color: #ffffff;
}

.cm-editor .cm-panel.cm-search [name='close']:focus-visible {
  outline: 2px solid #4c84ff;
  outline-offset: 1px;
  color: #ffffff;
}
