.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 5px;
  line-height: 1;
}

.category-modal-close:hover {
  color: #000;
}
.category-search-wrapper {
  margin-bottom: 15px;
}

.category-search-input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;

  &:focus-visible {
    outline: none;
    border-color: var(--superio-theme-color);
  }
}

.category-list {
  overflow-y: auto;
  margin: 0;
  padding: 0;
}

.category-item {
  cursor: pointer;
  padding: 0;
}

.category-item:hover {
  background-color: #f5f5f5;
}

.category-item:has(input:checked) {
  background-color: #e3f2fd;
  color: #1976d2;
}

.category-checkbox-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  cursor: pointer;
  margin: 0;
  width: 100%;
}

.category-checkbox {
  display: none;
}

.category-name {
  font-size: 14px;
}

.category-count {
  color: #999;
  font-size: 12px;
  margin-left: 8px;
  flex-shrink: 0;
}

.category-dialog-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
  padding-right: 10px;
}

.category-apply-count {
  margin-left: 6px;
  font-weight: normal;
  opacity: 0.85;
}

.modal-field-selection__arrow {
  position: relative;
}

.modal-field-selection__arrow b {
  border-color: #000 transparent transparent transparent;
  border-style: solid;
  border-width: 5px 4px 0 4px;
  height: 0;
  left: 50%;
  margin-left: -4px;
  margin-top: -2px;
  position: absolute;
  top: 50%;
  width: 0;
}

@media screen and (min-width: 769px) {
  .modal-dialog-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 60px);
  }

  .category-list {
    max-height: 60vh;
    min-width: 600px;
  }
}

@media screen and (max-width: 768px) {
  .modal.modal-fullscreen-mobile {
    .modal-dialog {
      margin: 0;
      margin-top: var(--wp-admin--admin-bar--height, 0);
    }

    .modal-content {
      width: 100dvw;
      height: calc(100dvh - var(--wp-admin--admin-bar--height, 0));
      overflow: auto;
      border-radius: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .modal-body {
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .category-list {
      max-height: none;
      overflow: auto;
    }
  }
}

