@font-face {
  font-family: 'NR Sans';
  src: url('../fonts/NR-Sans.woff') format('woff');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

.nrpc-configurator {
  margin: 0px 0 20px;
}

.nrpc-configurator * {
  box-sizing: border-box;
}

.nrpc-configurator .s-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.nrpc-configurator .s-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
}

.nrpc-configurator .s-card__title {
  font-weight: 700;
  font-size: 16px;
  margin: 0;
}

.nrpc-configurator .s-card__body {
  display: grid;
  gap: 14px;
}

/* Fase 2: siempre en una sola columna para maximizar el canvas */
.nrpc-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.nrpc-preview-wrap {
  background: #f7f8fb;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px;
}

.nrpc-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  border-radius: 10px;
  background: #131821;
}

.nrpc-fields {
  display: grid;
  gap: 10px;
}

.nrpc-configurator .b-label__base {
  display: block;
  margin: 0;
}

.nrpc-configurator .b-label__base strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin: 0 0 4px;
}

.nrpc-configurator .e-input__base {
  border: 1px solid #cfd3dc;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  outline: none;
  font-size: 14px;
  line-height: 1.4;
  color: #111;
}

.nrpc-configurator .e-input__base:focus {
  border-color: #1c60a8;
  box-shadow: 0 0 0 3px rgba(28, 96, 168, 0.15);
}

.nrpc-configurator .e-input__full {
  width: 100%;
}

.nrpc-configurator select.e-input__base {
  min-height: 38px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.nrpc-color-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: auto;
}

.nrpc-color-option {
  flex: 0 0 auto;
  min-width: 0;
}

.nrpc-color-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.nrpc-color-tile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #cfd3dc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.nrpc-color-thumb {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.nrpc-color-name {
  display: block;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nrpc-color-tile:hover {
  border-color: #afbbce;
}

.nrpc-color-radio:checked + .nrpc-color-tile {
  border-color: #1c60a8;
  background: #f4f9ff;
  box-shadow: 0 0 0 2px rgba(28, 96, 168, 0.18);
}

.nrpc-color-radio:focus-visible + .nrpc-color-tile {
  outline: 2px solid #1c60a8;
  outline-offset: 1px;
}

.nrpc-extras {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.nrpc-extra-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #dde2ea;
  background: #fff;
  font-size: 13px;
  line-height: 1.35;
}

.nrpc-extra-item span {
  display: inline-block;
}

.nrpc-extra-item input[type="checkbox"] {
  margin: 0;
  flex: 0 0 auto;
}

.nrpc-summary {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 12px;
  display: grid;
  gap: 7px;
}

.nrpc-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #111;
  font-size: 14px;
}

.nrpc-summary-total {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .nrpc-color-group {
    gap: 6px;
  }

  .nrpc-color-tile {
    min-height: 38px;
    padding: 6px;
    gap: 6px;
  }

  .nrpc-color-thumb {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
  }

  .nrpc-color-name {
    font-size: 11px;
  }
}
