/* Calculadora ReforMijas v1.0 - styles isolated with crm- prefix */

.crm-wrap{font-family:inherit;}
.crm-inner{display:grid;grid-template-columns: 7fr 3fr;gap:18px;align-items:start;}

.crm-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:14px;box-shadow:0 6px 18px rgba(0,0,0,.06);overflow:hidden;}
.crm-card-header{padding:18px 18px 8px 18px;}
.crm-h{margin:0 0 6px 0;font-size:18px;line-height:1.25;}
.crm-sub{margin:0;color:rgba(0,0,0,.65);font-size:13px;}

.crm-col-form .crm-card{padding-bottom:10px;}

.crm-field{padding:14px 18px;}
.crm-label{display:block;font-weight:600;margin:0 0 8px 0;font-size:13px;}

.crm-input{width:100%;border:1px solid rgba(0,0,0,.14);border-radius:10px;padding:11px 12px;font-size:14px;outline:none;transition:all .15s ease;background:#fff;}
.crm-input:focus{border-color:var(--crm-primary);box-shadow:0 0 0 3px rgba(254,121,12,.18);}

.crm-help{margin-top:6px;font-size:12px;color:rgba(0,0,0,.55);}

.crm-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 18px;}
.crm-grid-2 .crm-field{padding:10px 0;}

.crm-toggle{display:flex;gap:10px;align-items:flex-start;font-size:14px;color:rgba(0,0,0,.85);cursor:pointer;user-select:none;}
.crm-toggle input{margin-top:3px;accent-color:var(--crm-primary);}
.crm-toggle em{font-style:normal;color:rgba(0,0,0,.6);}

.crm-note{margin:8px 18px 18px 18px;padding:12px 12px;border-radius:12px;background:rgba(254,121,12,.08);border:1px solid rgba(254,121,12,.22);font-size:13px;color:rgba(0,0,0,.75);}

.crm-summary{position:sticky;top:18px;}
.crm-summary-rows{padding:8px 18px 8px 18px;}

.crm-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px dashed rgba(0,0,0,.10);}
.crm-row:last-child{border-bottom:none;}
.crm-row span{font-size:13px;color:rgba(0,0,0,.72);}
.crm-row strong{font-size:13px;font-weight:700;color:#111;white-space:nowrap;}

.crm-divider{height:1px;background:rgba(0,0,0,.10);margin:6px 18px;}

.crm-totals{padding:6px 18px 16px 18px;}
.crm-row-total span{font-weight:700;color:#111;}
.crm-row-grand{border-bottom:none;padding-top:12px;}
.crm-row-grand strong{font-size:18px;color:var(--crm-primary);}

.crm-range{margin-top:8px;padding:10px 12px;border-radius:12px;background:rgba(0,0,0,.04);font-size:12px;color:rgba(0,0,0,.65);}

.crm-legal{padding:0 18px 18px 18px;font-size:12px;color:rgba(0,0,0,.55);}

/* Responsive */
@media (max-width: 991px){
  .crm-inner{grid-template-columns:1fr;}
  .crm-summary{position:static;top:auto;}
  .crm-row-grand strong{font-size:17px;}
  .crm-grid-2{grid-template-columns:1fr;}
}

/* Keep it compatible with themes that set box-sizing */
.crm-wrap, .crm-wrap *{box-sizing:border-box;}


/* Inline fields (e.g., largo/ancho) */
.crm-inline{display:flex;gap:10px;}
.crm-inline input{flex:1;min-width:0;}

/* --- Compatibility: style inputs/selects even if crm-input class is missing (older modules) --- */
.crm-wrap .crm-card > h3{
  margin:0;
  padding:18px 18px 8px 18px;
  font-size:18px;
  line-height:1.25;
}

.crm-wrap .crm-card label{
  font-weight:600;
  font-size:13px;
}

/* Inputs/selects inside calculator cards (exclude checkboxes/radios) */
.crm-wrap .crm-card input:not([type="checkbox"]):not([type="radio"]),
.crm-wrap .crm-card select,
.crm-wrap .crm-card textarea{
  width:100%;
  border:1px solid rgba(0,0,0,.14);
  border-radius:10px;
  padding:11px 12px;
  font-size:14px;
  outline:none;
  transition:all .15s ease;
  background:#fff;
}

.crm-wrap .crm-card input:not([type="checkbox"]):not([type="radio"]):focus,
.crm-wrap .crm-card select:focus,
.crm-wrap .crm-card textarea:focus{
  border-color:var(--crm-primary);
  box-shadow:0 0 0 3px rgba(254,121,12,.18);
}

/* Checkbox rows used by some modules */
.crm-wrap .crm-check label{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:14px;
  color:rgba(0,0,0,.85);
  cursor:pointer;
  user-select:none;
  font-weight:600;
}

.crm-wrap .crm-check input{
  margin-top:3px;
  accent-color:var(--crm-primary);
}

/* Spacing parity: if a module uses .crm-lines, treat it like summary rows */
.crm-lines{padding:8px 18px 8px 18px;}
