/* Editör tuvali — blokları ön yüzdeki .container (1280px) gibi ortala */
body.block-editor-iframe__body {
  --hg-container: 1280px;
  --hg-gutter: 16px;
  --bg: #f8f9fa;
  --ink: #0a0a0a;
}

body.block-editor-iframe__body .is-root-container.block-editor-block-list__layout,
body.block-editor-iframe__body .block-editor-block-list__layout.is-root-container {
  box-sizing: border-box;
  max-width: var(--hg-container);
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--hg-gutter);
  padding-right: var(--hg-gutter);
}

body.block-editor-iframe__body .wp-block[class*="carbon-fields-"],
body.block-editor-iframe__body .wp-block.cf-block {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* Ana sayfa Carbon Fields blokları — editörde derli toplu düzen */
body.block-editor-iframe__body .cf-block__fields,
.edit-post-sidebar .cf-block__fields {
  display: flex;
  flex-wrap: wrap;
  margin: -8px;
}

body.block-editor-iframe__body .cf-block__fields > .cf-field,
.edit-post-sidebar .cf-block__fields > .cf-field {
  box-sizing: border-box;
  padding: 8px;
  width: 100%;
}

/* İki sütunlu alanlar (set_width 50) yan yana */
body.block-editor-iframe__body .cf-field__head,
.edit-post-sidebar .cf-field__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

body.block-editor-iframe__body .cf-field__label,
.edit-post-sidebar .cf-field__label {
  font-weight: 600;
  color: #1e1e1e;
  margin-bottom: 4px;
}

/* Alan gövdesi daha kompakt */
body.block-editor-iframe__body .cf-field__body input[type="text"],
body.block-editor-iframe__body .cf-field__body input[type="url"],
body.block-editor-iframe__body .cf-field__body input[type="email"],
body.block-editor-iframe__body .cf-field__body input[type="tel"],
body.block-editor-iframe__body .cf-field__body textarea,
body.block-editor-iframe__body .cf-field__body select,
.edit-post-sidebar .cf-field__body input[type="text"],
.edit-post-sidebar .cf-field__body textarea,
.edit-post-sidebar .cf-field__body select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid #dcdcde;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.5;
}

body.block-editor-iframe__body .cf-field__body textarea {
  min-height: 60px;
  resize: vertical;
}

/* Kompleks (tabbed) alanlar — kutu içinde */
body.block-editor-iframe__body .cf-complex__tabs,
.edit-post-sidebar .cf-complex__tabs {
  border: 1px solid #e2e4e7;
  border-radius: 6px;
  background: #f9f9f9;
  padding: 6px;
}

body.block-editor-iframe__body .cf-complex__tabs-list,
.edit-post-sidebar .cf-complex__tabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.block-editor-iframe__body .cf-complex__tabs-item,
.edit-post-sidebar .cf-complex__tabs-item {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  color: #444;
}

body.block-editor-iframe__body .cf-complex__tabs-item--current,
.edit-post-sidebar .cf-complex__tabs-item--current {
  background: #3858e9;
  border-color: #3858e9;
  color: #fff;
}

body.block-editor-iframe__body .cf-complex__group--tabbed,
.edit-post-sidebar .cf-complex__group--tabbed {
  margin-top: 8px;
  border: 1px solid #e2e4e7;
  border-radius: 6px;
  padding: 12px;
  background: #fff;
}

/* Sil / çoğalt butonlarını görünür ve tıklanabilir yap */
body.block-editor-iframe__body .cf-complex__group-actions--tabbed,
.edit-post-sidebar .cf-complex__group-actions--tabbed {
  display: flex !important;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px 12px;
  border-top: 1px solid #e2e4e7;
  background: #fbfbfc;
}

body.block-editor-iframe__body .cf-complex__group-action,
.edit-post-sidebar .cf-complex__group-action {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px !important;
  border: 1px solid #dcdcde !important;
  border-radius: 4px !important;
  margin: 0 !important;
  background: #fff !important;
  color: #444 !important;
  cursor: pointer;
  line-height: 1;
}

body.block-editor-iframe__body .cf-complex__group-action:hover,
.edit-post-sidebar .cf-complex__group-action:hover {
  background: #f0f0f1 !important;
  color: #000 !important;
}

body.block-editor-iframe__body .cf-complex__group-action-text,
.edit-post-sidebar .cf-complex__group-action-text {
  display: inline !important;
  font-size: 12px;
  font-weight: 500;
}

body.block-editor-iframe__body .cf-complex__group-action-icon,
.edit-post-sidebar .cf-complex__group-action-icon {
  font-size: 16px;
  width: auto;
  height: auto;
}

/* Görsel seçici kompakt */
body.block-editor-iframe__body .cf-file__inner,
.edit-post-sidebar .cf-file__inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.block-editor-iframe__body .cf-file__browse,
.edit-post-sidebar .cf-file__browse {
  margin: 0;
}

/* Blok kartları — editörde bölümler birbirinden ayrılsın */
body.block-editor-iframe__body .cf-block {
  box-sizing: border-box;
  margin: 0 0 20px;
  padding: 16px 16px 8px;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.block-editor-iframe__body .cf-block.is-selected {
  border-color: #3858e9;
  box-shadow: 0 0 0 1px #3858e9;
}

body.block-editor-iframe__body .cf-block__fields {
  margin: 0;
}

body.block-editor-iframe__body .cf-field__help,
body.block-editor-iframe__body .cf-html p {
  margin: 0;
}

body.block-editor-iframe__body .cf-field.cf-html {
  width: 100%;
  padding-top: 0;
}

body.block-editor-iframe__body .cf-complex__placeholder {
  border: 1px dashed #c3c4c7;
  border-radius: 6px;
  background: #f6f7f7;
  padding: 16px;
}

body.block-editor-iframe__body .cf-complex__placeholder-label {
  margin: 0 0 8px;
  color: #646970;
}

body.block-editor-iframe__body .cf-complex__inserter-button {
  border-radius: 4px;
}
