.wp-eventkoi {
  #wpbody-content {
    padding-bottom: 0;
  }

  #wpcontent {
    padding-left: 0;
  }
}

/* Keep only the first block-editor-hooks__layout-constrained inside the Layout panel */
body.eventkoi-active
  .components-panel__body.is-opened
  .block-editor-hooks__layout-constrained
  + .block-editor-hooks__layout-constrained {
  display: none !important;
}

.eventkoi-admin {
  font-family:
    inter,
    -apple-system,
    blinkmacsystemfont,
    "Segoe UI",
    roboto,
    oxygen-sans,
    ubuntu,
    cantarell,
    "Helvetica Neue",
    sans-serif;
  font-size: 16px;

  p {
    font-size: 16px;
  }

  li {
    margin-bottom: 0px;
  }

  a {
    &:hover,
    &:focus {
      box-shadow: none;
      color: inherit;
    }
  }

  [contenteditable="true"]:empty:before {
    content: attr(placeholder);
    pointer-events: none;
    display: block;
    color: #777777;
  }

  .eventkoi-error {
    border-color: #d13d3d !important;
  }

  /* Hide scrollbars and native spinner arrows */
  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }
  .scrollbar-hide {
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
  }

  .appearance-none {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  .mce-tinymce {
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); /* subtle shadow */
    background-color: #f9fafb; /* gray-50 */
    overflow: hidden;
    box-sizing: border-box;
  }

  /* Toolbar container — single row with horizontal scroll on overflow. */
  .mce-container-body .mce-toolbar-grp {
    background-color: #f9fafb;
    border-bottom: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .mce-container-body .mce-toolbar-grp::-webkit-scrollbar {
    height: 4px;
  }
  .mce-container-body .mce-toolbar-grp::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 2px;
  }

  .mce-container-body.mce-flow-layout {
    display: flex;
    flex-wrap: nowrap;
    .mce-btn-group {
      flex-shrink: 0;
    }
    .mce-btn-group.mce-last {
      margin-left: auto;
    }
  }

  /* Toolbar buttons */
  .mce-container-body .mce-btn {
    margin: 0 2px;
    border: none;
    min-height: 28px;
    display: inline-flex;
    &:hover,
    &.mce-listbox:hover {
      box-shadow: none;
    }
    .mce-ico::before {
      position: relative;
      top: 1px;
    }
    button {
      background: transparent;
      color: #374151;
      font-size: 14px;
      padding: 4px 6px;
      border-radius: 2px;
      transition: none;
      border: none;
    }
  }

  /* Button hover */
  .mce-container-body {
    padding: 0;
  }
  .mce-container-body .mce-btn button:hover {
    background-color: #e5e7eb; /* gray-200 */
    color: #111827; /* gray-900 */
    border: none;
  }

  .mce-container-body .mce-btn.mce-active button {
    background-color: #333;
    color: #fff;
    border: none;
  }

  /* Icons follow text color */
  .mce-container-body .mce-btn i {
    color: inherit !important;
    font-size: 16px;
  }

  /* Edit area spacing */
  .mce-edit-area iframe {
    padding: 0;
  }

  /* Remove outlines */
  .mce-container-body .mce-btn button:focus {
    outline: none;
    box-shadow: none;
  }

  .mce-container-body .mce-btn-group {
    padding: 4px;
  }

  .mce-container-body .mce-btn-group:not(:first-child) {
    border-left: 1px solid #eee !important;
    margin-left: 0;
  }

  /**
 * Replace TinyMCE's "remove formatting" button icon with Lucide's version.
 * Works inside WordPress' wp.editor TinyMCE.
 */
  .mce-i-removeformat::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7V4h16v3'/%3E%3Cpath d='M5 20h6'/%3E%3Cpath d='M13 4 8 20'/%3E%3Cpath d='m15 15 5 5'/%3E%3Cpath d='m20 15-5 5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    vertical-align: middle;
  }

  /* Prevent TinyMCE icon font from rendering behind it */
  .mce-i-removeformat {
    font-family: none !important;
    color: currentColor !important;
  }
}
