/* Search Box */

/* input#ld-searchform-1-s,
input#ld-categoryform-1-s {
    padding: 1rem 0.75rem;
    border-radius: 12px;
    border: 2px solid #cbd5e1;  
    width: 100%;
}

input#ld-searchform-1-s:focus-visible,
input#ld-categoryform-1-s:focus-visible {
    border: 2px solid #e28937;
    outline: none !important;
} */

.ld-cat-title {
  font-size: 1.45rem !important;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #1f2937;
  /* text color */
}

/* Base layout for the list */
.ld-checkbox-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 14px;
}

/* Each checkbox item */
.ld-checkbox {
  position: relative;
}

.ld-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.ld-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 16px;
  background: transparent;
}

.ld-search-input::placeholder {
  color: #999;
}

.ld-search-submit-btn {
  background: #e28937;
  border: none;
  padding: 12px 16px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  border-radius: 0 8px 8px 0;
  margin-left: auto;
}

.ld-search-submit-btn:hover {
  background: #ba6b22;
}

.ld-search-submit-btn:active {
  background: #ba6b22;
}

/* Visually hide the native checkbox but keep it accessible */
.ld-checkbox-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

/* Click target */
.ld-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  line-height: 1.2;
  color: #1f2937;
  /* text color */
}

/* The custom box */
.ld-checkbox-box {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  /* slate-300 */
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

/* The check icon */
.ld-checkbox-icon {
  color: #fff;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .18s ease, transform .18s ease;
}

/* Hover state */
.ld-checkbox-label:hover .ld-checkbox-box {
  border-color: #94a3b8;
  /* slate-400 */
}

/* Focus state */
.ld-checkbox-input:focus-visible+.ld-checkbox-label .ld-checkbox-box {
  outline: 2px solid #e28937;
  outline-offset: 2px;
}

/* Checked state */
.ld-checkbox-input:checked+.ld-checkbox-label .ld-checkbox-box {
  background-color: #e28937;
  border-color: #e28937;
  box-shadow: 0 0 0 2px rgb(196 196 196 / 55%);
}

.ld-checkbox-input:checked+.ld-checkbox-label .ld-checkbox-icon {
  opacity: 1;
  transform: scale(1);
}

/* Disabled state (optional) */
.ld-checkbox-input:disabled+.ld-checkbox-label {
  opacity: .6;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {

  .ld-checkbox-box,
  .ld-checkbox-icon {
    transition: none;
  }
}

.ld-category-and-toggle-wrapper {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  width: 100%;
}

.ld-category-tree .ld-cat-level {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.ld-cat-item {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: .4rem 2px;
}

.ld-cat-item .ld-cat-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
}

.ld-cat-toggle,
.ld-cat-spacer {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.ld-cat-toggle {
  position: relative;
}

.ld-cat-toggle .ld-caret {
  width: 20px;
  height: 20px;
  position: relative;
  display: block;
}

.ld-cat-toggle .ld-caret:before {
  content: \"\";
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  transition: transform .2s ease;
}

.ld-cat-item.is-expanded>.ld-cat-toggle .ld-caret:before {
  transform: rotate(135deg);
}

.ld-cat-children {
  margin-left: 0.6rem;
  margin-top: 0.5rem;
  border-left: 1px solid #e2e8f0;
  padding-left: .8rem;
}

.ld-cat-item.is-selected>.ld-cat-checkbox-wrapper .ld-checkbox-label {
  font-weight: 600;
}

.ld-actions-row {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
}

.load-more-btn {
  background: #e28937;
  color: #fff;
  border: 0;
  padding: 1rem 2rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: .9rem;
  line-height: 1.2;
  transition: all 0.35s ease;
}

.load-more-btn:hover {
  background: #ba6b22;
  transition: all 0.35s ease;
 
}

.load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.ld-clear-btn {
  color: red;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0px;
  cursor: pointer
}

.ld-clear-btn:hover {
  text-decoration: none;
}

.ld-cat-toggle:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

.ld-cat-item .ld-checkbox-input {
  position: absolute;
  left: -9999px;
}

.ld-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}

.ld-checkbox-box {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #fff;
  transition: .2s;
}

.ld-checkbox-icon {
  color: #fff;
  opacity: 0;
  transform: scale(.6);
  transition: .2s;
}

.ld-checkbox-input:checked+.ld-checkbox-label .ld-checkbox-icon {
  opacity: 1;
  transform: scale(1);
}

.ld-checkbox-input:focus-visible+.ld-checkbox-label .ld-checkbox-box {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

.ld-cat-tree-wrapper {
  max-height: 480px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: .25rem .25rem .5rem 0;
}