/* ---------- Base (ALL screens use 2-column layout) ---------- */

.wulf-tool {
  width: 100%;
  margin: 16px 0;
  padding: 14px 14px 16px;
  font-family: system-ui, sans-serif;

  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;

  display: grid;
  grid-template-columns: 1fr 1fr;   /* ✅ always two columns */
  column-gap: 24px;                /* smaller gap for mobile */
  row-gap: 6px;
  align-items: start;
}

.wulf-label {
  font-size: 13px;
  font-weight: 600;
  color: #666;
}

.wulf-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  justify-content: flex-start;
}

/* ---------- Responsive tiles ---------- */

.wulf-tile {
  width: 100%;   /* scales on mobile */
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: clamp(14px, 4vw, 22px);
  font-weight: 700;

  border: 1px solid #bbb;
  text-transform: uppercase;
  cursor: text;
  outline: none;
  background: none;
  text-align: center;
  padding: 0;
}

/* Colors */
.wulf-correct .wulf-tile {
  background: #6aaa64;
  border-color: #6aaa64;
  color: #fff;
}

.wulf-misplaced .wulf-tile {
  background: #c9b458;
  border-color: #c9b458;
  color: #fff;
}

/* ---------- Inputs ---------- */

.wulf-sub-label {
  font-size: 12px;
  font-weight: 600;
  color: #777;
}

.wulf-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

/* ---------- Footer ---------- */

.wulf-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wulf-count {
  font-size: 13px;
  color: #555;
}

.wulf-reset {
  padding: 6px 14px;
  font-size: 13px;
  border: 1px solid #ccc;
  background: #f8f8f8;
  border-radius: 6px;
  cursor: pointer;
}

.wulf-reset:hover {
  background: #eee;
}

/* ---------- No Results ---------- */

.wulf-no-results {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 10px 12px;
  background: #fff6f6;
  border: 1px solid #f2c2c2;
  border-radius: 6px;
  font-size: 13px;
  color: #a94442;
}

/* ---------- Explicit grid placement ---------- */

/* Correct column */
.wulf-tool > .wulf-label:nth-of-type(1) {
  grid-column: 1;
  grid-row: 1;
}

.wulf-tool > .wulf-row.wulf-correct {
  grid-column: 1;
  grid-row: 2;
}

.wulf-tool > .wulf-sub-label:nth-of-type(1) {
  grid-column: 1;
  grid-row: 3;
}

.wulf-tool > .wulf-input.wulf-contains {
  grid-column: 1;
  grid-row: 4;
}

/* Misplaced column */
.wulf-tool > .wulf-label:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1;
}

.wulf-tool > .wulf-row.wulf-misplaced {
  grid-column: 2;
  grid-row: 2;
}

.wulf-tool > .wulf-sub-label:nth-of-type(2) {
  grid-column: 2;
  grid-row: 3;
}

.wulf-tool > .wulf-input.wulf-exclude {
  grid-column: 2;
  grid-row: 4;
}

/* Fix input text & caret color on mobile */
.wulf-correct .wulf-tile,
.wulf-misplaced .wulf-tile {
  color: #fff;
  caret-color: #fff;
}

/* Remove mobile default input styles */
.wulf-tile {
  background-clip: padding-box;
  -webkit-text-fill-color: currentColor;
}