/* KodaDash — inline editing */
.kdash-ie {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  border-radius: 4px;
  transition: background-color .3s ease;
}
.kdash-ie-display { min-width: 0; }
.kdash-ie.is-empty .kdash-ie-display { display: none; }

.kdash-ie-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.kdash-ie-pencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px; height: 22px;
  padding: 0; margin: 0;
  border: 0; border-radius: 4px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, background-color .15s ease, color .15s ease;
  line-height: 1;
}
.kdash-ie-pencil:hover { background: rgba(0,0,0,.06); color: #111827; }
.kdash-ie-pencil:focus-visible { opacity: 1; outline: 2px solid #2563eb; outline-offset: 1px; }
.kdash-ie:hover .kdash-ie-pencil,
td:hover .kdash-ie-pencil,
.kdash-entry-table__value:hover .kdash-ie-pencil,
.kdash-ie.is-empty .kdash-ie-pencil { opacity: 1; }
.kdash-ie.is-empty .kdash-ie-pencil { color: #9ca3af; }
@media (hover: none) {
  .kdash-ie-pencil { opacity: .7; }
}

.kdash-ie-input,
.kdash-ie-select {
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
  max-width: 100%;
}
.kdash-ie-input { width: 220px; }
textarea.kdash-ie-input { width: 280px; min-height: 64px; resize: vertical; }
.kdash-ie-select { width: auto; min-width: 120px; padding-right: 26px; }
.kdash-ie-input:focus,
.kdash-ie-select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.2); }

.kdash-ie.is-saving { opacity: .55; pointer-events: none; }
.kdash-ie.is-saved { background-color: rgba(34,197,94,.18); }

.kdash-ie-error {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  min-width: 180px;
  max-width: 280px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #b91c1c;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Checklist popover (checkbox / multi-select) */
.kdash-ie-pop {
  position: absolute;
  z-index: 100000;
  min-width: 200px;
  max-width: 320px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,.14);
  font-size: 14px;
  color: #111827;
}
.kdash-ie-pop__list { max-height: 260px; overflow: auto; padding: 6px; }
.kdash-ie-pop__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  margin: 0;
  font-weight: normal;
}
.kdash-ie-pop__item:hover { background: #f3f4f6; }
.kdash-ie-pop__item input { margin: 0; }
.kdash-ie-pop__foot { display: flex; justify-content: flex-end; padding: 6px 8px; border-top: 1px solid #f1f5f9; }
.kdash-ie-pop__done {
  font: inherit; font-size: 13px;
  padding: 4px 12px;
  border: 0; border-radius: 6px;
  background: #2563eb; color: #fff;
  cursor: pointer;
}
.kdash-ie-pop__done:hover { background: #1d4ed8; }

/* Datepicker (jQuery UI, same widget Gravity Forms uses) */
#ui-datepicker-div.kdash-ie-dp {
  z-index: 100000 !important;
  padding: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,.14);
  font-size: 13px;
  color: #111827;
  width: 260px;
}
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-header { position: relative; display: flex; align-items: center; justify-content: center; padding: 4px 28px 8px; }
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-prev,
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-next { position: absolute; top: 4px; cursor: pointer; font-size: 0; width: 24px; height: 24px; }
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-prev { left: 0; }
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-next { right: 0; }
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-prev::before,
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-next::before { font-size: 18px; line-height: 24px; display: block; text-align: center; color: #374151; }
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-prev::before { content: "\2039"; }
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-next::before { content: "\203A"; }
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-title { display: flex; gap: 6px; }
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-title select { font-size: 13px; padding: 2px 4px; border: 1px solid #d1d5db; border-radius: 4px; }
#ui-datepicker-div.kdash-ie-dp table { width: 100%; border-collapse: collapse; margin: 0; }
#ui-datepicker-div.kdash-ie-dp th { padding: 4px 0; font-weight: 600; color: #6b7280; text-align: center; border: 0; background: none; }
#ui-datepicker-div.kdash-ie-dp td { padding: 1px; border: 0; text-align: center; background: none; }
#ui-datepicker-div.kdash-ie-dp td a,
#ui-datepicker-div.kdash-ie-dp td span { display: block; padding: 5px 0; border-radius: 4px; color: #111827; text-decoration: none; }
#ui-datepicker-div.kdash-ie-dp td a:hover { background: #eff6ff; }
#ui-datepicker-div.kdash-ie-dp .ui-state-highlight { background: #f3f4f6; }
#ui-datepicker-div.kdash-ie-dp .ui-state-active { background: #2563eb; color: #fff; }
#ui-datepicker-div.kdash-ie-dp .ui-datepicker-unselectable span { color: #d1d5db; }
