/* CleanBot wizard — reskin de allybot.css (C:\xampp\htdocs\ally\allybot\assets\css\allybot.css)
   con la paleta de marca de RMN Cleaning Services LLC (navy #153A5E / teal
   #4FABBC) en vez de los tokens maroon de Ally. Misma estructura visual,
   mismos componentes (chips, campos, review, success) — solo colores,
   personaje e íconos temáticos cambiados. Sin dependencia de una hoja de
   estilos padre — los tokens se definen aquí mismo. */

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }

:root {
  --bg-0: #0d2438;
  --bg-1: #153A5E;
  --bg-2: #1b4a76;
  --bg-3: #21578a;
  --ink: #ffffff;
  --ink-dim: rgba(255, 255, 255, .72);
  --ink-faint: rgba(255, 255, 255, .46);
  --line: rgba(255, 255, 255, .13);
  --line-soft: rgba(255, 255, 255, .09);
  --accent: #4FABBC;
  --accent-2: #8fd6e0;
  --accent-ink: #04222a;
}

html, body { min-height: 100%; background: var(--bg-0); }

body {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(79, 171, 188, .18) 0%, transparent 55%),
    radial-gradient(90% 60% at 0% 100%, rgba(79, 171, 188, .12) 0%, transparent 60%),
    var(--bg-0);
  background-attachment: fixed;
}
/* ---------- Esquinas de circuito (mismo motivo que allybot/bnkBot) ---------- */
.cb-bg-circuit {
  position: fixed; z-index: 0; pointer-events: none;
  width: min(46vw, 420px); height: min(35vw, 320px);
}
.cb-bg-circuit--br { right: -30px; bottom: -20px; }
.cb-bg-circuit--tl { left: -30px; top: -20px; transform: rotate(180deg); }
@media (max-width: 700px) {
  .cb-bg-circuit { width: 78vw; height: 60vw; }
}

/* ---------- Fondo animado: burbujas de jabón subiendo + destellos de brillo
   intermitentes, en loop, muy sutil detrás de la tarjeta del wizard — tema
   de limpieza (jabón/brillo), reemplaza la animación de ruta/pin/vehículo
   que tenía AllyBot (esa era un metáfora de mudanza, no de limpieza). Ambos
   efectos son 100% CSS (círculos con gradiente y una cruz rotada), sin
   depender de íconos de Font Awesome que puedan no existir en el set libre. ---------- */
.cb-bg-bubbles { position: fixed; z-index: 0; pointer-events: none; inset: 0; overflow: hidden; }
.cb-bubble {
  position: absolute; bottom: -60px; border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.85) 0%, rgba(255,255,255,.22) 22%, rgba(143,214,224,.16) 55%, rgba(79,171,188,.08) 100%);
  border: 1px solid rgba(255,255,255,.32);
  box-shadow: 0 0 10px rgba(143,214,224,.22), inset 0 0 6px rgba(255,255,255,.35);
  animation: cb-bubble-rise linear infinite;
}
.cb-bubble--1 { left: 8%;  width: 22px; height: 22px; animation-duration: 14s; animation-delay: 0s; }
.cb-bubble--2 { left: 22%; width: 14px; height: 14px; animation-duration: 10s; animation-delay: 2.4s; }
.cb-bubble--3 { left: 40%; width: 30px; height: 30px; animation-duration: 17s; animation-delay: 4.2s; }
.cb-bubble--4 { left: 62%; width: 18px; height: 18px; animation-duration: 12s; animation-delay: 1.1s; }
.cb-bubble--5 { left: 80%; width: 24px; height: 24px; animation-duration: 15s; animation-delay: 6.3s; }
.cb-bubble--6 { left: 92%; width: 12px; height: 12px; animation-duration: 9s;  animation-delay: 3.5s; }
@keyframes cb-bubble-rise {
  0%   { transform: translate(0, 0) scale(.9); opacity: 0; }
  8%   { opacity: .85; }
  50%  { transform: translate(18px, -55vh) scale(1); }
  92%  { opacity: .55; }
  100% { transform: translate(-14px, -112vh) scale(1.06); opacity: 0; }
}

.cb-bg-sparkle {
  position: fixed; z-index: 0; pointer-events: none;
  width: 14px; height: 14px;
  background:
    linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.92)) center / 2px 100% no-repeat,
    linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.92)) center / 100% 2px no-repeat;
  filter: drop-shadow(0 0 4px rgba(143,214,224,.85));
  animation: cb-sparkle-twinkle 3.6s ease-in-out infinite;
}
.cb-bg-sparkle--1 { top: 16%; left: 10%; animation-delay: 0s; }
.cb-bg-sparkle--2 { top: 70%; left: 88%; animation-delay: 1.3s; }
.cb-bg-sparkle--3 { top: 42%; left: 92%; animation-delay: 2.4s; }
.cb-bg-sparkle--4 { top: 84%; left: 14%; animation-delay: .7s; }
@keyframes cb-sparkle-twinkle {
  0%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); }
  50%      { opacity: 1; transform: scale(1) rotate(45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cb-bubble, .cb-bg-sparkle { animation: none; opacity: 0; }
}
@media (max-width: 600px) {
  .cb-bubble--3, .cb-bubble--5 { display: none; }
  .cb-bg-sparkle--3, .cb-bg-sparkle--4 { display: none; }
}

.cb-audio-toggle {
  position: fixed; z-index: 5; top: 14px; right: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 0; margin: 0; line-height: 1; -webkit-appearance: none; appearance: none;
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  backdrop-filter: blur(6px); color: var(--ink-dim); cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.cb-audio-toggle i { font-size: 13px; line-height: 1; display: block; }
.cb-audio-toggle:hover { border-color: var(--accent); color: var(--ink); background: rgba(79,171,188,.14); transform: translateY(-1px); }
@media (max-width: 480px) {
  .cb-audio-toggle { top: 58px; right: 20px; width: 32px; height: 32px; }
}

#cleanbot-app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 620px;
  margin: 0 auto;
  padding: 22px 20px 40px;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  color: var(--ink);
}

/* ---------- Progress bar ---------- */
.cb-progress { margin-bottom: 6px; }
.cb-progress__row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 7px;
}
.cb-progress__track {
  position: relative; height: 5px; width: 100%; overflow: hidden;
  border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-soft);
}
.cb-progress__fill {
  position: relative; height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 8px 0 rgba(79,171,188,.5);
}
.cb-progress__sweep {
  position: absolute; inset-block: 0; left: 0; width: 32px;
  background: rgba(255,255,255,.4); filter: blur(3px); pointer-events: none;
}

/* ---------- Central body ---------- */
.cb-center {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px; position: relative;
  padding-top: 12px;
}

.cb-avatar {
  position: relative;
  filter: drop-shadow(0 0 20px rgba(79,171,188,.35));
}
.cb-avatar::after {
  content: "";
  position: absolute; z-index: -1; inset: -30px;
  background: radial-gradient(circle, rgba(79,171,188,.20) 0%, transparent 72%);
  pointer-events: none;
}
.cb-avatar img {
  display: block; object-fit: contain;
  width: clamp(126px, 36vw, 148px); height: auto;
}

.cb-card {
  width: 100%; display: flex; flex-direction: column; align-items: center;
  gap: 18px; text-align: center;
}
.cb-text {
  max-width: 440px; font-size: 16.5px; font-weight: 500; line-height: 1.45;
}
.cb-text strong { color: var(--accent-2); font-weight: 700; }

.cb-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--accent-2);
  animation: cb-caret-blink .9s steps(1) infinite;
}
@keyframes cb-caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cb-caret { animation: none; opacity: 1; }
}

.cb-controls { width: 100%; }

/* ---------- Option chips ---------- */
.cb-options {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  max-height: 44vh; overflow-y: auto; padding: 4px;
}
.cb-chip {
  cursor: pointer; user-select: none; font: inherit; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); color: var(--ink-dim); padding: 7px 15px 7px 12px;
  backdrop-filter: blur(6px);
  transition: transform .15s cubic-bezier(.16,1,.3,1), background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.cb-chip i { font-size: 11px; color: var(--accent); opacity: .8; transition: color .15s, opacity .15s; }
.cb-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: rgba(79,171,188,.14);
  color: var(--ink);
  box-shadow: 0 4px 14px -4px rgba(79,171,188,.4);
}
.cb-chip:disabled { cursor: default; }
.cb-chip.is-picked {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #04222a;
  box-shadow: 0 4px 16px -2px rgba(79,171,188,.55);
}
.cb-chip.is-picked i { color: #04222a; opacity: 1; }

/* ---------- Text fields ---------- */
.cb-field {
  width: 100%; max-width: 360px; margin: 0 auto;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: var(--ink); padding: 9px 13px; font: inherit; font-size: 13px;
  outline: none; transition: border-color .15s, background-color .15s;
}
.cb-field::placeholder { color: var(--ink-faint); }
.cb-field:focus { border-color: var(--accent); background: rgba(255,255,255,.05); }
textarea.cb-field { resize: none; }
input[type="date"].cb-field { color-scheme: dark; }
select.cb-field {
  color-scheme: dark;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3e%3cpath fill='%238fd6e0' d='M1 1l5 5 5-5'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
select.cb-field option { background: var(--bg-1); color: var(--ink); }

.cb-field-icon {
  position: relative; width: 100%; max-width: 360px; margin: 0 auto;
}
.cb-field-icon > i {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--ink-faint); pointer-events: none;
}
.cb-field-icon .cb-field { padding-left: 32px; max-width: none; }
.cb-field-icon .cb-field:focus + i,
.cb-field-icon:focus-within > i { color: var(--accent); }

.cb-form { display: flex; flex-direction: column; gap: 9px; max-width: 360px; width: 100%; margin: 0 auto; }
.cb-form-inline { display: flex; gap: 7px; max-width: 360px; width: 100%; margin: 0 auto; }
.cb-form-inline .cb-field { flex: 1; min-width: 0; }
.cb-form-row { display: flex; gap: 9px; min-width: 0; }
.cb-form-row .cb-field-icon { max-width: none; flex: 1; min-width: 0; }

/* Address autocomplete dropdown (OpenStreetMap / Nominatim) */
.cb-address-wrap { position: relative; width: 100%; max-width: 360px; margin: 0 auto; }
.cb-address-suggestions {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px);
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-1); box-shadow: 0 10px 26px -8px rgba(0,0,0,.6);
  max-height: 210px; overflow-y: auto; text-align: left;
}
.cb-address-suggestions button {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 12.5px;
  color: var(--ink-dim); background: transparent; border: 0; cursor: pointer;
  padding: 9px 13px; border-bottom: 1px solid var(--line-soft);
}
.cb-address-suggestions button:last-child { border-bottom: 0; }
.cb-address-suggestions button:hover { background: rgba(79,171,188,.14); color: var(--ink); }

.cb-btn {
  cursor: pointer; font: inherit; font-weight: 700; font-size: 12px;
  letter-spacing: .04em; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04222a;
  box-shadow: 0 4px 16px -4px rgba(79,171,188,.55);
  transition: filter .15s, opacity .15s, transform .15s, box-shadow .15s;
}
.cb-btn i { font-size: 12px; transition: transform .2s ease; }
.cb-btn:hover:not(:disabled) i { transform: translateX(2px); }
.cb-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 20px -4px rgba(79,171,188,.65); }
.cb-btn:active:not(:disabled) { transform: translateY(0); }
.cb-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.cb-btn--full { width: 100%; max-width: 360px; margin: 0 auto; display: flex; padding: 13px 20px; }
.cb-btn--center { display: inline-flex; margin: 2px auto 0; }

.cb-btn--ghost {
  background: transparent; color: var(--ink-dim);
  border: 1px solid var(--line); box-shadow: none;
}
.cb-btn--ghost i { color: var(--ink-faint); }
.cb-btn--ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--ink); box-shadow: none; }
.cb-btn--ghost:hover:not(:disabled) i { color: var(--accent); }

/* ---------- Review ---------- */
.cb-review-box {
  width: 100%; max-width: 380px; margin: 0 auto; text-align: left;
  border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  box-shadow: 0 8px 28px -12px rgba(0,0,0,.5);
  overflow: hidden;
}
.cb-review-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-bottom: 1px solid var(--line-soft);
  background: rgba(79,171,188,.10);
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent-2);
}
.cb-review-head i { font-size: 12px; color: var(--accent); }
.cb-review-body { padding: 4px 16px 8px; }
.cb-review-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 13px;
}
.cb-review-row:last-child { border-bottom: 0; }
.cb-review-row i {
  flex: 0 0 auto; width: 16px; text-align: center; font-size: 11px;
  color: var(--accent); opacity: .85;
}
.cb-review-row .cb-review-label { flex: 0 0 auto; color: var(--ink-faint); min-width: 108px; }
.cb-review-row .cb-review-value { flex: 1; text-align: right; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.cb-review-row .cb-review-value--empty { color: var(--ink-faint); font-weight: 400; font-style: italic; }

.cb-confirm {
  display: flex; align-items: center; gap: 8px; font-size: 11.5px;
  color: var(--ink-dim); max-width: 380px; margin: 12px auto 0;
}
.cb-confirm input { accent-color: var(--accent); width: 14px; height: 14px; flex: none; }

/* ---------- Success screen ---------- */
.cb-success-box {
  width: 100%; max-width: 380px; margin: 0 auto; text-align: center;
  border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(79,171,188,.10), rgba(255,255,255,.015) 60%);
  box-shadow: 0 10px 32px -12px rgba(0,0,0,.55);
  padding: 26px 22px 22px;
}

.cb-success-icon {
  position: relative;
  width: 68px; height: 68px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 22px -4px rgba(79,171,188,.6);
}
.cb-success-icon i { font-size: 25px; color: #04222a; }
.cb-success-ring {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(79,171,188,.55);
  animation: cb-ring-ping 2.2s ease-out infinite;
}
.cb-success-ring--2 { animation-delay: 1.1s; }
@keyframes cb-ring-ping {
  0% { transform: scale(1); opacity: .6; }
  100% { transform: scale(1.9); opacity: 0; }
}

.cb-success-title { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.cb-success-thanks {
  font-size: 13px; color: var(--ink-dim); line-height: 1.5;
  margin: 0 auto 18px; max-width: 300px;
}

.cb-result-num {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-faint); text-align: center;
  padding: 10px 14px; margin-bottom: 18px;
  border: 1px dashed var(--line-soft); border-radius: 10px;
  background: rgba(255,255,255,.03);
}
.cb-result-num i { color: var(--accent); font-size: 13px; }
.cb-result-num strong { color: var(--accent-2); font-size: 14px; letter-spacing: .03em; }
.cb-final-actions {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.cb-final-actions .cb-btn { flex: 1; min-width: 150px; }

@media (prefers-reduced-motion: reduce) {
  .cb-success-ring { animation: none; opacity: 0; }
}

.cb-card, .cb-avatar { will-change: transform, opacity; }

@keyframes cb-typing-dot {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.cb-typing { display: flex; align-items: center; justify-content: center; gap: 5px; }
.cb-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint);
  animation: cb-typing-dot 1.1s ease-in-out infinite;
}
.cb-typing span:nth-child(2) { animation-delay: .15s; }
.cb-typing span:nth-child(3) { animation-delay: .3s; }

@media (max-width: 480px) {
  .cb-text { font-size: 15px; }
  .cb-chip { font-size: 12px; padding: 6px 13px 6px 11px; }
}

.cb-credit {
  text-align: center; font-size: 11px; color: var(--ink-faint);
  padding: 18px 0 4px; flex: none;
}
.cb-credit__line { margin: 0 0 4px; }
.cb-credit__line:last-child { margin-bottom: 0; }
.cb-credit a { color: var(--accent-2); font-weight: 700; text-decoration: none; }
.cb-credit a:hover { text-decoration: underline; }
