/* assets/dci.css */

/* ---------------------------
   Theme variables (override as needed)
   --------------------------- */
.nr-dci {
  --nr-bg: var(--wp--preset--color--base, #ffffff);
  --nr-surface: color-mix(in oklab, var(--nr-bg), black 6%);
  --nr-text: var(--wp--preset--color--contrast, inherit);
  --nr-muted: color-mix(in oklab, var(--nr-text), transparent 55%);
  --nr-primary: var(--wp--preset--color--primary, #0a66c2);
  --nr-border: color-mix(in oklab, var(--nr-text), transparent 80%);

  /* Containment to avoid layout bleed */
  font: inherit;
  color: var(--nr-text);
  background: transparent;
}

/* Layout container */
.nr-dci__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

@media (min-width: 768px) {
  .nr-dci__grid { grid-template-columns: 1fr 1fr; }
}

/* Cards */
.nr-dci__card {
  background: var(--nr-surface);
  border: 1px solid var(--nr-border);
  border-radius: 8px;
  padding: 1rem;
}

/* Titles */
.nr-dci__title,
.nr-dci__card-title {
  margin: 0 0 .6rem 0;
  line-height: 1.2;
  font-weight: 600;
}

/* Labels & Inputs */
.nr-dci__label {
  display: block;
  font-size: 0.95em;
  margin: .65rem 0;
}

.nr-dci__label small {
  opacity: .7;
  margin-left: .35rem;
}

.nr-dci__input,
.nr-dci__select,
.nr-dci__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: .55rem .7rem;
  border: 1px solid var(--nr-border);
  border-radius: 6px;
  background: var(--nr-bg);
  color: inherit;
  font: inherit;
}

.nr-dci__textarea {
  min-height: 140px;
  resize: vertical;
}

/* Split rows */
.nr-dci__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}

/* Actions / Buttons */
.nr-dci__actions {
  display: flex;
  gap: .6rem;
  margin-top: .6rem;
  flex-wrap: wrap;
}

.nr-dci__btn {
  appearance: none;
  border: 1px solid var(--nr-primary);
  background: var(--nr-primary);
  color: #fff;
  padding: .5rem .9rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  transition: transform .02s ease, opacity .2s ease;
}
.nr-dci__btn:hover { opacity: .95; }
.nr-dci__btn:active { transform: translateY(1px); }

.nr-dci__btn--alt {
  background: transparent;
  color: var(--nr-primary);
}

.nr-dci__btn--ghost {
  background: transparent;
  color: inherit;
  border-color: var(--nr-border);
}

/* Output */
.nr-dci__output {
  margin-top: 1rem;
  padding: .8rem;
  border: 1px dashed var(--nr-border);
  border-radius: 6px;
  background: var(--nr-bg);
  color: inherit;
}

/* Prevent global styles from leaking in */
.nr-dci * {
  box-sizing: border-box;
}