/* Anesthguide Tools - Osmol gap */

.agto-tool,
.agto-tool * {
  box-sizing: border-box;
}

.agto-tool {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  font: inherit;
  color: inherit;
}

.agto-tool__header { margin: 0 0 .5rem; }
.agto-tool__title { margin: 0; font-size: 1.15rem; line-height: 1.2; }

.agto-card {
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.agto-form { margin: 0; }

.agto-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agto-grid > * { min-width: 0; }

@media (max-width: 720px) {
  .agto-grid { grid-template-columns: 1fr; }
}

.agto-field label {
  display: block;
  font-weight: 600;
  margin: 0 0 5px;
  font-size: .95rem;
}

.agto-field input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 16px;
  line-height: 1.2;
  background: #fff;
}

.agto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.agto-btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, .16);
  background: rgba(0, 0, 0, .03);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.1;
}

.agto-btn--primary {
  background: #0b66ff;
  color: #fff;
  border-color: transparent;
}

.agto-status {
  margin-top: 8px;
  font-size: .92rem;
}

.agto-result { margin-top: 10px; }

.agto-result__top {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agto-result__top > * { min-width: 0; }

@media (max-width: 920px) {
  .agto-result__top { grid-template-columns: 1fr; }
}

.agto-result__value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.agto-result[data-level="normal"] .agto-result__value { color: #0a7a2f; }
.agto-result[data-level="high"] .agto-result__value { color: #b00020; }
.agto-result[data-level="low"] .agto-result__value { color: #8a5b00; }

.agto-result__label {
  opacity: .85;
  font-size: .95rem;
}

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

.agto-result__bottom { font-size: .95rem; }
.agto-result__row { margin: 6px 0; }

.agto-details summary {
  cursor: pointer;
  font-weight: 700;
  margin-top: 6px;
}

.agto-details ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.agto-disclaimer {
  margin: 8px 0 0;
  font-size: .88rem;
  opacity: .75;
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .agto-result,
  .agto-result * {
    visibility: visible !important;
  }

  .agto-result {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 12mm !important;
  }

  .agto-actions,
  .agto-status,
  .agto-details summary {
    display: none !important;
  }

  .agto-result__value { font-size: 18pt !important; }
  .agto-result__label,
  .agto-result__bottom { font-size: 11pt !important; }

  @page { margin: 10mm; }
}
