﻿.rlc-calc {
  --bg: #f8f4ff;
  --card: #ffffff;
  --line: #dccdf8;
  --text: #1f1240;
  --muted: #64548d;
  --p1: #6d2fff;
  --p2: #a16cff;
  --ok: #17b26a;
  max-width: 920px;
  margin: 22px auto;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(1300px 380px at -12% -55%, rgba(109,47,255,.18), transparent 65%),
    radial-gradient(900px 260px at 120% -70%, rgba(161,108,255,.18), transparent 70%),
    linear-gradient(180deg, #fbf9ff 0%, #f5efff 100%);
  border: 1px solid #e7dafd;
  box-shadow: 0 24px 64px rgba(79, 35, 180, .16);
  font-family: "Manrope", sans-serif;
  color: var(--text);
  opacity: 1;
  transition: opacity .18s ease;
}
.rlc-calc.rlc-loading { opacity: 0; }

.rlc-calc * { box-sizing: border-box; }

.rlc-calc__hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(180deg, #f8f3ff 0%, #f1e8ff 100%);
  margin-bottom: 16px;
  text-align: center;
}

.rlc-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  right: -100px;
  top: -130px;
  background: radial-gradient(circle, rgba(109, 47, 255, .35) 0%, rgba(109, 47, 255, 0) 70%);
  filter: blur(8px);
  animation: rlcFloat 8s ease-in-out infinite;
}

@keyframes rlcFloat {
  0%,100% { transform: translateY(0); opacity: .9; }
  50% { transform: translateY(10px); opacity: .65; }
}

.rlc-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--p1), var(--p2));
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .3px;
  box-shadow: 0 8px 20px rgba(109, 47, 255, .35);
}

.rlc-calc__hero h1 {
  margin: 10px 0 8px;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -.5px;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

.rlc-calc__hero p {
  margin: 0 auto;
  max-width: 58ch;
  color: var(--muted);
  font-weight: 600;
}

.rlc-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.rlc-steps button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 6px;
  font-weight: 700;
  color: #5d4a86;
  cursor: pointer;
}

.rlc-steps button.active {
  border-color: transparent;
  background: linear-gradient(90deg, var(--p1), var(--p2));
  color: #fff;
  box-shadow: 0 10px 22px rgba(109, 47, 255, .25);
}

.rlc-panel {
  display: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}

.rlc-panel.active { display: block; }

.rlc-panel h3 {
  margin: 0 0 12px;
  font-family: "Sora", sans-serif;
  font-size: 1.18rem;
}

.rlc-label { font-weight: 700; display:block; margin-bottom: 8px; }

.rlc-grid-1,
.rlc-grid-2 {
  display: grid;
  gap: 10px;
}

.rlc-grid-2 { grid-template-columns: 1fr 1fr; }

.rlc-subsection {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  max-width: 100%;
  margin: 0;
}

.rlc-subsection h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-family: "Sora", sans-serif;
  color: #3b2675;
}

.rlc-hints {
  display: none;
  margin-top: 6px;
  border: 1px solid #d8c8fb;
  border-radius: 10px;
  background: #fff;
  max-height: 190px;
  overflow-y: auto;
}

.rlc-hints button {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #efe5ff;
  background: #fff;
  color: #2a185d;
  padding: 9px 10px;
  font-size: 13px;
  cursor: pointer;
}

.rlc-hints button:hover {
  background: #f8f2ff;
}

.rlc-hints button:last-child {
  border-bottom: 0;
}
.rlc-model-grid-wrap {
  margin-top: 8px;
  border: 1px solid #ddcdfc;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}
.rlc-model-grid-title {
  margin: 0 0 6px;
  font-size: 12px;
  color: #6f5da0;
  font-weight: 700;
}
.rlc-model-grid {
  max-height: 180px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.rlc-model-chip {
  border: 1px solid #ccb8f4;
  border-radius: 8px;
  background: #fbf8ff;
  color: #3e2a75;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 6px;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.rlc-model-chip:hover,
.rlc-model-chip.selected {
  border-color: transparent;
  background: linear-gradient(90deg, var(--p1), var(--p2));
  color: #fff;
}

.rlc-calc label {
  font-size: 13px;
  font-weight: 700;
  color: #4e3f79;
  display: block;
  width: 100%;
}
.rlc-form-grid {
  display: grid;
  gap: 10px;
  align-items: end;
}
.rlc-form-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rlc-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rlc-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.rlc-filter-half { grid-column: span 1; }
.rlc-filter-full { grid-column: 1 / -1; }
.rlc-emisiones-wrap {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #ddcdfc;
  border-radius: 10px;
  background: #fff;
}
.rlc-boe-field {
  margin-top: 12px;
}

.rlc-calc input,
.rlc-calc select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #ccb8f4;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  color: #201545;
  background: #fff;
}

.rlc-calc input:focus,
.rlc-calc select:focus {
  outline: none;
  border-color: #8d5bff;
  box-shadow: 0 0 0 4px rgba(141, 91, 255, .14);
}

.rlc-pill-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.rlc-pill {
  border: 1px solid #cdbaf6;
  border-radius: 12px;
  background: #f8f3ff;
  color: #4a317f;
  font-weight: 800;
  padding: 11px 12px;
  cursor: pointer;
}

.rlc-pill.active {
  background: linear-gradient(90deg, var(--p1), var(--p2));
  border-color: transparent;
  color: #fff;
}

.rlc-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
}

.rlc-check input { margin-top: 2px; width: 16px; height: 16px; }

.rlc-note {
  font-size: 12px;
  color: #6f5da0;
  margin: 10px 0 0;
}
.rlc-msg {
  margin: 6px 0 0;
  font-size: 12px;
  display: none;
}
.rlc-msg--error {
  color: #b4234f;
  font-weight: 700;
}
.rlc-msg--info {
  color: #6f5da0;
  font-weight: 600;
}
.rlc-co2-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.rlc-co2-buttons button {
  height: 40px;
  border: 1px solid #ccb8f4;
  border-radius: 10px;
  background: #f8f3ff;
  color: #4f3a81;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.rlc-co2-buttons button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(109, 47, 255, .16);
}
.rlc-co2-buttons button.selected {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, var(--p1), var(--p2));
}
.rlc-invalid {
  border-color: #d92d53 !important;
  box-shadow: 0 0 0 3px rgba(217, 45, 83, .14) !important;
}

.rlc-actions {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.rlc-btn {
  border: 1px solid #ccb8f4;
  background: #fff;
  color: #4f3a81;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.rlc-btn--primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, var(--p1), var(--p2));
  box-shadow: 0 12px 26px rgba(109, 47, 255, .26);
}
.rlc-btn:disabled,
.rlc-btn[disabled]{
  opacity:.45;
  cursor:not-allowed;
  box-shadow:none;
}

.rlc-btn--wa {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, #1fbf5e, #18a64f);
}

.rlc-cta {
  background: linear-gradient(180deg, #f6f0ff, #efe4ff);
  border: 1px solid #d7c6fb;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.rlc-cta h4 { margin: 0 0 6px; font-family: "Sora", sans-serif; }
.rlc-cta p { margin: 0 0 10px; color: #5f4a8e; font-weight: 600; }
.rlc-cta__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rlc-pro-box{
  background: linear-gradient(180deg,#f9f3ff,#f3eaff);
  border:1px solid #dfcbff;
  border-radius:14px;
  padding:14px;
  margin-bottom:12px;
}
.rlc-pro-box h4{
  margin:0 0 8px;
  font-family:"Sora",sans-serif;
  color:#301864;
}

.rlc-summary {
  border: 1px solid #d8c8fb;
  border-radius: 14px;
  overflow: hidden;
}
.rlc-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.rlc-result-head h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: #2b1760;
}
.rlc-detail-group {
  border-bottom: 1px solid #ece2ff;
  background: #fff;
}
.rlc-detail-group:last-of-type {
  border-bottom: 1px solid #ece2ff;
}
.rlc-detail-group summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  font-weight: 800;
  color: #3b2675;
  background: #fbf8ff;
}
.rlc-detail-group summary::-webkit-details-marker {
  display: none;
}
.rlc-detail-group[open] summary {
  background: #f4ecff;
}
.rlc-detail-body {
  border-top: 1px solid #efe4ff;
}

.rlc-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #ece2ff;
}

.rlc-row:last-child { border-bottom: none; }
.rlc-row strong { color: #221250; }
.rlc-row--title { background: #f8f3ff; font-weight: 800; }
.rlc-row--total {
  background: linear-gradient(90deg, #f3e8ff, #eee0ff);
  font-weight: 900;
  font-size: 1.35rem;
  color: #2d1469;
}
.rlc-row--discount {
  background: linear-gradient(90deg, #fff0f3, #ffe6ec);
  border-top: 1px solid #ffc9d8;
  border-bottom: 1px solid #ffc9d8;
}
.rlc-row--discount span,
.rlc-row--discount strong {
  color: #b4234f;
  font-weight: 900;
}
.rlc-pill--prof{
  background:#efe2ff;
  color:#5b2ca7;
  border:1px solid #cba7ff;
}
.rlc-pill--part{
  background:#e8f6ff;
  color:#0d5f88;
  border:1px solid #9fdcff;
}

.rlc-footnote {
  margin-top: 8px;
  color: #6a5799;
  font-size: 12px;
}
.rlc-footnote--note{
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px dashed #d8befb;
  border-radius: 10px;
  background: #faf5ff;
  color: #5b3c92;
}

@media (max-width: 768px) {
  .rlc-calc { margin: 10px; padding: 12px; border-radius: 16px; }
  .rlc-steps { grid-template-columns: repeat(2, 1fr); }
  .rlc-grid-2 { grid-template-columns: 1fr; }
  .rlc-actions { flex-wrap: wrap; }
  .rlc-result-head { flex-direction: column; align-items: flex-start; }
  .rlc-form-grid--4,
  .rlc-form-grid--2,
  .rlc-co2-buttons,
  .rlc-filter-grid { grid-template-columns: 1fr; }
  .rlc-model-grid { grid-template-columns: 1fr; }
}
