/* Calculadoras gratuitas de Control ObraX: complementa /blog.css, sin dependencias externas. */
.en-corto { background: #f0f7ff; border: 1px solid #bfdbfe; border-left: 4px solid #0f4c81; border-radius: 12px; padding: 18px 22px 10px; margin: 24px 0; }
.en-corto h2 { margin-top: 0; font-size: 1.15rem; }
.en-corto h2::before { display: none; }
.en-corto p { margin: 0 0 8px; }
.privacidad { font-size: 14px; color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; margin: 0 0 22px; }

.calc { border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px; margin: 24px 0 30px; background: #fbfcfe; }
.calc fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.calc legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; color: #0a1628; }
.calc .fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 14px; }
.calc label { display: block; font-weight: 600; font-size: 14px; color: #1e293b; margin-bottom: 4px; line-height: 1.35; }
.calc .ayuda { display: block; font-weight: 400; font-size: 13px; color: #64748b; margin-top: 3px; line-height: 1.4; }
.calc input[type=text], .calc input[type=date], .calc select, .calc textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; color: #0a1628; }
.calc textarea { min-height: 110px; resize: vertical; }
.calc input:focus, .calc select:focus, .calc textarea:focus { outline: 3px solid #fdba74; outline-offset: 1px; border-color: #f26a1b; }
.calc .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.calc .check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: #0f4c81; }
.calc .opciones { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.calc .opciones label { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; }
.calc .opciones input { width: 18px; height: 18px; accent-color: #0f4c81; }
.calc button { font: inherit; font-weight: 700; font-size: 16px; background: #f26a1b; color: #fff; border: 0; border-radius: 10px; padding: 12px 26px; cursor: pointer; box-shadow: 0 8px 20px rgba(242,106,27,.3); }
.calc button:hover { background: #d9590e; }
.calc button:focus-visible { outline: 3px solid #0f4c81; outline-offset: 2px; }
.calc button.sec { background: #fff; color: #0f4c81; border: 1px solid #bfdbfe; box-shadow: none; margin-left: 8px; }
.calc [hidden] { display: none !important; }

.resultado { margin-top: 18px; }
.resultado:empty { display: none; }
.res-caja { background: #fff; border: 1px solid #cbd5e1; border-left: 4px solid #0f4c81; border-radius: 12px; padding: 16px 18px; }
.res-caja h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.3; }
.res-grande { font-family: var(--display, inherit); font-size: 30px; font-weight: 800; color: #0f4c81; line-height: 1.15; margin: 0 0 8px; }
.res-lista { list-style: none; padding: 0; margin: 0; }
.res-lista li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #e2e8f0; padding: 6px 0; margin: 0; font-size: 15px; }
.res-lista li:last-child { border-bottom: 0; }
.res-lista li span:last-child { font-weight: 700; text-align: right; white-space: nowrap; }
.res-lista li.total { font-size: 16px; border-top: 2px solid #0f4c81; border-bottom: 0; padding-top: 8px; }
.res-nota { font-size: 14px; color: #475569; margin: 10px 0 0; }
.res-error { background: #fef2f2; border: 1px solid #fecaca; border-left: 4px solid #dc2626; border-radius: 12px; padding: 12px 16px; color: #7f1d1d; }
.res-aviso { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; color: #78350f; font-size: 14px; margin-top: 10px; }

.tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabla-scroll table { margin: 12px 0 6px; font-size: 14px; }
td.num, th.num { text-align: right; white-space: nowrap; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1f5f9; border-radius: 8px; padding: 10px 12px; font-size: 14px; overflow-x: auto; white-space: pre-wrap; }
.cta-box a.btn-sec { background: transparent; color: #fff; border: 1px solid #bfdbfe; margin-left: 8px; box-shadow: none; }
details { margin: 12px 0; }
details > summary { cursor: pointer; padding: 6px 0; }
details > summary:focus-visible { outline: 3px solid #fdba74; outline-offset: 2px; border-radius: 4px; }
.herr-lista { display: grid; gap: 16px; margin: 20px 0; }

@media (max-width: 520px) {
  .calc { padding: 16px 14px; }
  .calc button { width: 100%; }
  .calc button.sec { margin: 10px 0 0; }
  .res-grande { font-size: 25px; }
  .res-lista li { font-size: 14px; }
  .cta-box a.btn { display: block; text-align: center; }
  .cta-box a.btn-sec { margin-left: 0; margin-top: 10px; }
}
