/* =====================================================================
   QWOOD - Helper Wizard Mini-Box
   Premium Natural Bold — Nordic Craft polish 2026-04-03
   ===================================================================== */

.qwood-helper-wizard,
.qwood-helper-wizard *{
  box-sizing: border-box;
}

.qwood-helper-wizard{
  --qw-green: var(--qwood-color-primary, #1bcf17);
  --qw-green2: var(--qwood-color-primary-dark, #1bcf17);
  --qw-text: var(--qwood-color-text, #0f172a);
  --qw-muted: var(--qwood-color-muted, rgba(15,23,42,.55));
  --qw-radius: 22px;
  --qw-border: rgba(15,23,42,.08);
  --qw-card: #ffffff;
  --qw-shadow: 0 18px 42px rgba(15,23,42,.08);

  font-family: var(--qwood-font-sans, "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  color: var(--qw-text);
}

/* ===== Mini-box container — única card visible, sin border, full width ===== */
body.qwood-parquet-single .qwood-helper-wizard.qw-mini-box,
.qwood-helper-wizard.qw-mini-box{
  margin: 0;
  width: 100%;
  background: var(--qw-card);
  border-radius: 22px;
  border: none;
  padding: 18px 20px 20px;
  box-shadow: 0 16px 38px rgba(15,23,42,.08);
  position: relative;
  overflow: hidden;
}

.qwood-helper-wizard.qw-mini-box::before{
  content: none;
}

/* ===== Header: dot + title + m2 badge inline ===== */
.qwood-helper-wizard .qw-mini-head{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  position: relative;
  z-index: 1;
}

.qwood-helper-wizard .qw-mini-head .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--qw-green);
  flex: 0 0 auto;
}

.qwood-helper-wizard .qw-mini-head h3{
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: var(--qw-green);
  line-height: 1.2;
  letter-spacing: -.01em;
  flex: 1;
}

/* ===== Description text — compact ===== */
.qwood-helper-wizard .qw-mini-desc{
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--qw-muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.qwood-helper-wizard .qw-mini-desc strong{
  color: var(--qw-text);
  font-weight: 800;
}

/* ===== Grid: m2 input + m2 necesarios ===== */
.qwood-helper-wizard .qw-mini-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.qwood-helper-wizard label{
  display: block;
  font-weight: 900;
  color: var(--qw-text);
  font-size: 12px;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.qwood-helper-wizard input[type="number"]{
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: none;
  background: #fff;
  font-size: 16px; /* 2026-06-11: <16px provoca zoom automático iOS al focar */
  font-weight: 800;
  color: var(--qw-text);
  outline: none;
  font-family: inherit;
  box-shadow:
    0 6px 16px -6px rgba(15,23,42,.22),
    0 2px 6px -2px rgba(15,23,42,.14);
  transition: box-shadow .15s ease;
}

.qwood-helper-wizard input[type="number"]:focus{
  box-shadow:
    0 0 0 2.5px rgba(27,207,23,.72),
    0 10px 24px -8px rgba(27,207,23,.28),
    0 4px 10px -4px rgba(15,23,42,.18);
}

/* m2 necesarios pill — blanco con sombra negra (audit 2026-05-07) */
.qwood-helper-wizard .qw-pill{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 14px;
  border: none;
  box-shadow: 0 6px 16px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.06);
  font-size: 12px;
  width: 100%;
}

.qwood-helper-wizard .qw-pill .label{
  color: var(--qw-muted);
  font-weight: 700;
  line-height: 1.3;
}

.qwood-helper-wizard .qw-pill .value{
  font-weight: 900;
  font-size: 15px;
  color: var(--qw-green2);
  white-space: nowrap;
  letter-spacing: -.01em;
}


/* ===== CTA Button ===== */
.qwood-helper-wizard .qw-mini-wizard{
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

.qwood-helper-wizard .qw-mini-btn,
.qwood-helper-wizard .qw-open-wizard-btn{
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  border-radius: 999px;
  border: none !important;
  background: var(--qw-green) !important;
  background-color: #1bcf17 !important;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 14px 20px;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  line-height: 1.15;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 22px rgba(27,207,23,.20);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.qwood-helper-wizard .qw-mini-btn[disabled],
.qwood-helper-wizard .qw-open-wizard-btn[disabled]{
  opacity: .55;
  cursor: not-allowed;
  background: rgba(15,23,42,.08) !important;
  background-color: rgba(15,23,42,.08) !important;
  color: rgba(15,23,42,.4) !important;
  -webkit-text-fill-color: rgba(15,23,42,.4) !important;
  box-shadow: none !important;
  transform: none !important;
}

.qwood-helper-wizard .qw-mini-btn:not([disabled]):hover,
.qwood-helper-wizard .qw-open-wizard-btn:not([disabled]):hover{
  background-color: var(--qw-green2) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(27,207,23,.32);
}

.qwood-helper-wizard .qw-mini-btn:not([disabled]):active,
.qwood-helper-wizard .qw-open-wizard-btn:not([disabled]):active{
  transform: translateY(0) scale(.98);
  box-shadow: 0 4px 16px rgba(27,207,23,.2);
}

.qwood-helper-wizard .qw-mini-btn:focus-visible,
.qwood-helper-wizard .qw-open-wizard-btn:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255,255,255,.92),
    0 0 0 6px rgba(27,207,23,.30),
    0 6px 22px rgba(27,207,23,.25);
}

/* Enabled pulse — FIX 2026-07-05 (audit helper-wizard): la animación is-enabled
   solo existía en el CSS fallback inline (con el diseño viejo); portada aquí con
   el shadow del diseño plano. El JS pone la clase en el propio botón. */
@keyframes qwood-helper-wizard-pulse-in{
  0%{
    transform: scale(.985);
    box-shadow: 0 0 0 0 rgba(27,207,23,0);
  }
  65%{
    transform: scale(1.01);
    box-shadow: 0 0 0 8px rgba(27,207,23,.16);
  }
  100%{
    transform: scale(1);
    box-shadow: 0 6px 22px rgba(27,207,23,.20);
  }
}

.qwood-helper-wizard .qw-open-wizard-btn.is-enabled{
  animation: qwood-helper-wizard-pulse-in .38s ease-out;
}

/* ===== Responsive ===== */
@media (max-width: 640px){
  body.qwood-parquet-single .qwood-helper-wizard.qw-mini-box,
  .qwood-helper-wizard.qw-mini-box{
    padding: 14px 16px 16px;
    border-radius: 18px;
  }

  .qwood-helper-wizard .qw-mini-grid{
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .qwood-helper-wizard .qw-mini-head h3{
    font-size: 14px;
  }

  .qwood-helper-wizard .qw-mini-btn,
  .qwood-helper-wizard .qw-open-wizard-btn{
    min-height: 46px;
    font-size: 13px;
    padding: 12px 16px;
  }
}

@media (max-width: 400px){
  .qwood-helper-wizard .qw-mini-grid{
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce){
  .qwood-helper-wizard input[type="number"],
  .qwood-helper-wizard .qw-mini-btn,
  .qwood-helper-wizard .qw-open-wizard-btn{
    transition: none;
  }

  .qwood-helper-wizard .qw-open-wizard-btn.is-enabled{
    animation: none;
  }
}
