/* Unit Definitions Table */

#unit-definitions-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}

#unit-definitions-section > p {
  margin: 0 0 16px;
}

#unit-definitions-table {
  width: 100%;
  border-collapse: collapse;
}

#unit-definitions-table thead th {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

#unit-definitions-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

#unit-definitions-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Table Inputs */
.unit-def-row input,
.unit-def-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  min-height: 40px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.unit-def-row input::placeholder {
  color: #9aa5a8;
}

.unit-def-row input:hover,
.unit-def-row select:hover {
  border-color: #c2cdc9;
}

.unit-def-row input:focus,
.unit-def-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: #fff;
}

.unit-def-row input:disabled,
.unit-def-row select:disabled {
  background: #fbfcfc;
  color: var(--muted);
  cursor: not-allowed;
}

.unit-def-row input[type="number"] {
  -moz-appearance: textfield;
}

.unit-def-row input[type="number"]::-webkit-outer-spin-button,
.unit-def-row input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.unit-def-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366757a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.unit-def-row select::-ms-expand {
  display: none;
}

/* Remove Button */
.ud-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
}

.ud-remove:hover {
  border-color: #c2cdc9;
  color: var(--danger);
  background: #fbfcfc;
}

.ud-remove:active {
  background: #f0f1f2;
}

.ud-remove i,
.ud-remove svg {
  width: 16px;
  height: 16px;
}

/* Add Row Button */
#add-unit-def-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
}

#add-unit-def-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

#add-unit-def-btn i,
#add-unit-def-btn svg {
  width: 16px;
  height: 16px;
}

/* Total Units Counter */
#unit-definitions-section > div:last-child {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

#unit-definitions-section > div:last-child span {
  font-weight: 600;
  color: var(--primary);
}

/* Specs column pills (bedrooms, toilets, features) */
.specs-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-2, #f3f4f6);
  color: var(--text, #111);
  border-radius: 999px;
  border: 1px solid var(--line, #e5e7eb);
  line-height: 1.4;
  white-space: nowrap;
}

.spec-pill-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
}

.spec-pill strong {
  font-weight: 600;
  color: var(--text, #111);
}

.spec-pill-feature {
  background: var(--primary-soft, #eef2ff);
  border-color: transparent;
  color: var(--primary, #4f46e5);
  text-transform: capitalize;
}
