/* KTS v1.5.9 — record action overflow fix + multi-ink / LOT editor */

/* Structured multi-ink editor */
body.dashboard-v111 .ink-items-editor {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
body.dashboard-v111 .ink-items-list {
  display: grid;
  gap: 9px;
  width: 100%;
  min-width: 0;
}
body.dashboard-v111 .ink-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(62, 46, 24, .12);
  border-radius: 13px;
  background: #fffdf8;
}
body.dashboard-v111 .ink-item-field {
  min-width: 0;
}
body.dashboard-v111 .ink-item-field label {
  display: block;
  margin-bottom: 5px;
  line-height: 1.35;
}
body.dashboard-v111 .ink-item-field input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
body.dashboard-v111 .ink-row-remove {
  min-width: 54px;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(154, 62, 50, .18);
  border-radius: 10px;
  color: #8d352c;
  background: #fff7f4;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
body.dashboard-v111 .ink-add-btn {
  justify-self: start;
  min-height: 44px;
}

/* The record quick-action "더보기" used an absolute desktop popover.
   On phones, expanding it inline is more stable and cannot leave the viewport. */
@media (max-width: 720px) {
  body.dashboard-v111 .kts-quick-actionbar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }
  body.dashboard-v111 .kts-action-more {
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
  }
  body.dashboard-v111 .kts-action-more > summary {
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
  }
  body.dashboard-v111 .kts-action-more[open] {
    grid-column: 1 / -1;
    width: 100%;
  }
  body.dashboard-v111 .kts-action-more[open] > summary {
    width: 100%;
  }
  body.dashboard-v111 .kts-action-more > div {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-top: 7px;
    padding: 6px !important;
    overflow: hidden !important;
    box-sizing: border-box;
  }
  body.dashboard-v111 .kts-action-more > div button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 11px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.dashboard-v111 .ink-item-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 10px;
  }
  body.dashboard-v111 .ink-row-remove,
  body.dashboard-v111 .ink-add-btn {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  body.dashboard-v111 .ink-item-row { padding: 8px; gap: 7px; }
}
