/* =========================
   OMS Growth Calculator CSS
   (A prueba de themes WP)
   - Texto de botones visible
   - Placeholder pálido
   - Responsive real (móvil)
   ========================= */

.oms-gc-wrap{
  max-width: 1000px;
  margin: 20px auto;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #111;
}

/* Asegura box-sizing consistente incluso si el theme lo cambia */
.oms-gc-wrap,
.oms-gc-wrap *{
  box-sizing: border-box !important;
}

/* Caja principal */
.oms-gc-wrap .oms-card{
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
}

/* Título */
.oms-gc-wrap .oms-title{
  margin: 0 0 10px 0;
  font-size: 22px;
  font-weight: 700;
}

/* Aviso privacidad */
.oms-gc-wrap .oms-privacy{
  padding: 10px;
  border: 1px solid #e7e7e7;
  background: #fafafa;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}

/* GRID base */
.oms-gc-wrap .oms-form-grid{
  display: grid !important;
  gap: 12px !important;
  margin-bottom: 12px;
  width: 100% !important;
}

/* 4 columnas en escritorio */
.oms-gc-wrap .oms-grid-patient{ grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.oms-gc-wrap .oms-grid-metrics{ grid-template-columns: repeat(4, minmax(0, 1fr)) !important; align-items: end !important; }
.oms-gc-wrap .oms-grid-obs{ grid-template-columns: 1fr !important; }

/* Labels e inputs */
.oms-gc-wrap .oms-form-grid label{
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 74px;
  margin: 0;
}

/* Inputs / selects */
.oms-gc-wrap .oms-form-grid input,
.oms-gc-wrap .oms-form-grid select{
  width: 100% !important;
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.2;
  background: #fff !important;
  color: #111 !important;
  outline: none;
}

/* Foco */
.oms-gc-wrap .oms-form-grid input:focus,
.oms-gc-wrap .oms-form-grid select:focus{
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,.08);
}

/* Hint */
.oms-gc-wrap .oms-hint{
  font-size: 11px;
  opacity: .75;
  line-height: 1.25;
}

/* Circunferencia cefálica ocupa fila completa */
.oms-gc-wrap .oms-hc{
  grid-column: 1 / -1 !important;
  min-height: 74px;
}

/* =========================
   Placeholders (pálidos)
   ========================= */

.oms-gc-wrap input::placeholder,
.oms-gc-wrap textarea::placeholder{
  color: rgba(17, 17, 17, 0.40) !important;
}

.oms-gc-wrap input::-webkit-input-placeholder,
.oms-gc-wrap textarea::-webkit-input-placeholder{
  color: rgba(17, 17, 17, 0.40) !important;
}

.oms-gc-wrap input::-moz-placeholder,
.oms-gc-wrap textarea::-moz-placeholder{
  color: rgba(17, 17, 17, 0.40) !important;
}

.oms-gc-wrap input:-ms-input-placeholder,
.oms-gc-wrap textarea:-ms-input-placeholder{
  color: rgba(17, 17, 17, 0.40) !important;
}

/* =========================
   Botones (texto visible)
   ========================= */

.oms-gc-wrap .oms-btns{
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.oms-gc-wrap .oms-btns button,
.oms-gc-wrap button#oms_btn,
.oms-gc-wrap button#oms_pdf,
.oms-gc-wrap button#oms_print{
  min-width: 180px;
  padding: 12px 16px;
  border: 2px solid #111;
  background: #fff !important;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;

  /* fuerza texto visible aunque el theme lo pise */
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  opacity: 1 !important;
  text-shadow: none !important;
  filter: none !important;

  transition: transform .05s ease, background .15s ease;
}

.oms-gc-wrap .oms-btns button:hover,
.oms-gc-wrap .oms-btns button:focus{
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  background: #f3f3f3 !important;
}

.oms-gc-wrap .oms-btns button:active{
  transform: translateY(1px);
}

.oms-gc-wrap .oms-btns button:disabled{
  opacity: .55 !important;
  cursor: not-allowed;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}

/* =========================
   Resultados
   ========================= */

.oms-gc-wrap .oms-summary{
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
}

.oms-gc-wrap .oms-error{
  padding: 12px;
  border: 1px solid #f1c40f;
  background: #fff8d6;
  border-radius: 12px;
  margin-top: 12px;
}

.oms-gc-wrap .oms-footnote{
  margin-top: 12px;
  font-size: 12px;
  opacity: .75;
}

/* =========================
   Barra Z
   ========================= */

.oms-gc-wrap .zbar{ margin-top: 12px; }
.oms-gc-wrap .zbar-title{ font-size: 14px; margin-bottom: 6px; }

.oms-gc-wrap .ztrack{
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #eee;
  overflow: hidden;
}

.oms-gc-wrap .zok{
  position: absolute;
  left: 16.6667%;
  width: 66.6667%;
  height: 12px;
  border-radius: 999px;
  background: #dff3df;
}

.oms-gc-wrap .zdot{
  position: absolute;
  top: -5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #111;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.oms-gc-wrap .zlabels{
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: .75;
  margin-top: 6px;
}

.oms-gc-wrap .zflag{
  margin-top: 6px;
  font-size: 12px;
  opacity: .85;
}

/* =========================
   Responsive
   ========================= */

/* Tablet / móvil grande: 2 columnas */
@media (max-width: 900px){
  .oms-gc-wrap .oms-grid-patient{ grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .oms-gc-wrap .oms-grid-metrics{ grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}

/* Móvil: 1 columna */
@media (max-width: 600px){
  .oms-gc-wrap{ padding: 0 12px; }

  .oms-gc-wrap .oms-card{
    padding: 14px;
    border-radius: 14px;
  }

  .oms-gc-wrap .oms-grid-patient{ grid-template-columns: 1fr !important; }
  .oms-gc-wrap .oms-grid-metrics{ grid-template-columns: 1fr !important; }
  .oms-gc-wrap .oms-grid-obs{ grid-template-columns: 1fr !important; }

  /* labels no tan altos en móvil */
  .oms-gc-wrap .oms-form-grid label{ min-height: auto !important; }

  /* Botones en columna y 100% */
  .oms-gc-wrap .oms-btns{
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .oms-gc-wrap .oms-btns button{
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Barras Z mejor en móvil */
  .oms-gc-wrap .zlabels{ font-size: 11px; }
  .oms-gc-wrap .zdot{ width: 18px; height: 18px; top: -3px; }

  /* Evita zoom automático en iPhone */
  .oms-gc-wrap input,
  .oms-gc-wrap select,
  .oms-gc-wrap textarea{
    font-size: 16px !important;
  }
}

/* =========================
   Impresión
   ========================= */

.oms-gc-wrap .oms-print{ display:none; }

.oms-gc-wrap .oms-print-title{
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.oms-gc-wrap .oms-print-block{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.oms-gc-wrap .oms-print-foot{
  margin-top: 14px;
  font-size: 12px;
  opacity: .75;
}

@media print{
  .oms-gc-wrap .oms-screen{ display:none !important; }
  .oms-gc-wrap .oms-print{ display:block !important; }
  body{ background:#fff !important; }
  .oms-gc-wrap .oms-card{ box-shadow:none !important; border:none !important; }
  .oms-gc-wrap{ max-width: 100% !important; margin: 0 !important; }
}
