/*
 * MOBILE-FIRST STYLES (Default)
 * These styles apply to mobile devices by default
 */

/* Global and Typography */
body {
  font-family: 'Nunito', sans-serif;
  font-size: 24px; /* A good base for mobile readability */
  line-height: 1.5;
}

h1 {
  font-size: 28px;
  font-weight: bold;
}

h2 {
  font-size: 24px;
  font-weight: bold;
}

.banner {
  background-color: #003087;
  color: white;
  font-size: 24px;
  padding: 16px 24px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.glossary {
    display: block; /* Show desktop glossary */
    margin-top: 10px;
    background-color: #f0f4f8;
    padding: 10px;
    border-radius: 6px;
  }

/* Layout */
.main-content {
  padding: 0 15px;
}

.container {
  display: flex;
  flex-direction: column; /* Stacks items vertically on mobile */
  gap: 20px;
  padding: 20px;
}

.input-group {
  width: 100%;
  padding-bottom: 20px; /* Adds space below each input group */
  margin-bottom: 20px; /* Creates more space between groups */
  border-bottom: 1px solid #e9e9e9; /* A subtle, light gray dividing line */
}

/* Add this to remove the border from the very last item in the form */
.input-group:last-of-type {
  border-bottom: none;
}

/* Input, Label, and Button Styles */
.label,
.input,
select,
.button {
  font-size: 16px;
  padding: 10px;
  border-radius: 4px;
}

.button {
  padding: 14px 20px;
  background-color: #007DBA;
  color: white;
  border: none;
  border-radius: 6px;
  width: 100%;
  cursor: pointer;
}

select {
  border: 1px solid #ccc;
  background-color: #f2f2f2;
}

#apgar {
  width: 100px;
}

#birth_weight {
  width: 150px;
}


/*
 * DESKTOP/TABLET STYLES
 * These styles override the mobile styles for larger screens
 */
@media (min-width: 768px) {
  body {
    font-size: 18px; /* Slightly larger font for desktop */
  }

  /* Layout */
  .main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
  }

  .container {
    flex-direction: row; /* Arrange items in a row on desktop */
    padding: 40px;
  }

  .input-group {
    width: 50%; /* Use 50% width on desktop */
  }

  .button {
    font-size: 24px; /* The requested larger font size for desktop */
    width: auto; /* The button's width will be based on its content */
    margin: 0 auto; /* This will center the button horizontally */
  }

  /* Glossary and Tooltips */
  .optional-fields {
    display: block; /* Show optional fields on desktop */
  }

  .tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted #888;
  }

  .tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 0;
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
  }

  .tooltip:hover::after {
    opacity: 1;
  }
}



/* Styling for the box around the risk results */
.risk-results-box {
    display: block;
    margin-top: 10px;
    background-color: #007DBA;
    color: white;
    padding: 10px;
    border: 1px solid #66b2e0;
    border-radius: 6px;
}







