/* General Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  }

body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
padding: 20px;
}

/* Screen Only Elements */
.screen-only {
display: block;
}

.print-only {
display: none;
}

#printSection {
display: none;
}

/* Header Styles */
.header {
background: white;
color: #333;
padding: 20px;
text-align: center;
border-radius: 10px;
margin-bottom: 30px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-logo {
max-width: 400px;
width: 100%;
height: auto;
margin-bottom: 15px;
}

.header h2 {
font-size: 1.5em;
margin-top: 10px;
color: #FFC107;
font-weight: bold;
text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Form Container */
.form-container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
max-width: 1200px;
margin: 0 auto;
}

.form-container h3 {
color: #dc143c;
margin-bottom: 20px;
font-size: 1.5em;
border-bottom: 2px solid #dc143c;
padding-bottom: 10px;
}

/* Form Grid */
.form-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-bottom: 20px;
}

.form-group {
display: flex;
flex-direction: column;
}

.form-group.full-width {
grid-column: 1 / -1;
}

/* Gestation Input Styling */
.gestation-group {
    grid-column: 1 / -1;
}

.gestation-input {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 450px;
}

.gestation-input input {
    width: 100px;
    text-align: center;
}

.gestation-separator {
    font-size: 1.8em;
    font-weight: bold;
    color: #dc143c;
    padding: 0 5px;
}

.gestation-unit {
    color: #666;
    font-size: 1em;
    margin-left: 5px;
}

.form-group label {
font-weight: bold;
margin-bottom: 5px;
color: #333;
}

.form-group input,
.form-group select {
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1em;
}

.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: #dc143c;
box-shadow: 0 0 5px rgba(220, 20, 60, 0.3);
}

/* Checkbox Group */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.checkbox-group label:hover {
    background-color: #f8f9fa;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Buttons */
.button-group {
display: flex;
gap: 15px;
justify-content: center;
margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.btn-print {
padding: 12px 30px;
border: none;
border-radius: 5px;
font-size: 1em;
cursor: pointer;
transition: all 0.3s ease;
}

.btn-primary {
background-color: #dc143c;
color: white;
}

.btn-primary:hover {
background-color: #b01030;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
background-color: #6c757d;
color: white;
}

.btn-secondary:hover {
background-color: #5a6268;
}

.btn-print {
background-color: #28a745;
color: white;
}

.btn-print:hover {
background-color: #218838;
}

/* Print Styles */
@media print {
body {
background: white;
padding: 0;
margin: 0;
}

.screen-only {
    display: none !important;
}

.print-only {
    display: block !important;
}

#printSection {
    width: 100%;
    max-width: 100%;
}

/* Print Header */
.print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    color: #333;
    padding: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid #dc143c;
}

.print-logo-img {
    max-width: 150px;
    height: auto;
}

.print-title {
    text-align: right;
}

.print-title h2 {
    font-size: 1.2em;
    margin-bottom: 3px;
    color: #dc143c;
    font-weight: bold;
}

.print-title p {
    font-size: 0.8em;
    color: #666;
}

/* Information Table */
.info-section {
    margin-bottom: 10px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.info-table td {
    padding: 4px 8px;
    border: 1px solid #333;
}

.info-table .label {
    font-weight: bold;
    background-color: #f0f0f0;
    width: 18%;
}

.info-table .value {
    width: 32%;
}

/* Reference Tables */
.reference-section {
    margin-bottom: 10px;
    page-break-inside: avoid;
}

.reference-section h3 {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: #dc143c;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.65em;
    margin-bottom: 8px;
}

.reference-table th {
    background-color: #dc143c;
    color: white;
    padding: 3px;
    border: 1px solid #333;
    font-size: 0.85em;
}

.reference-table td {
    padding: 2px;
    border: 1px solid #333;
    text-align: center;
}

.reference-table .age-col {
    font-weight: bold;
    background-color: #f0f0f0;
}

/* Monitoring Table */
.monitoring-section {
    page-break-inside: avoid;
}

.monitoring-section h3 {
    font-size: 0.95em;
    margin-bottom: 5px;
    color: #dc143c;
}

.monitoring-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75em;
}

.monitoring-table th {
    background-color: #4a90e2;
    color: white;
    padding: 5px;
    border: 1px solid #333;
    font-weight: bold;
}

.monitoring-table td {
    padding: 8px;
    border: 1px solid #333;
    height: 30px;
}

.monitoring-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Risk Factors Note */
.risk-factors-note {
    font-size: 0.65em;
    margin-top: 5px;
    padding: 5px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 3px;
}

.risk-factors-note ul {
    margin-left: 15px;
    margin-top: 3px;
}

/* Page Break Control */
.no-break {
    page-break-inside: avoid;
}

/* Hide buttons when printing */
.print-footer {
    display: none !important;
}

/* Website URL at bottom when printing */
.print-website {
    text-align: center;
    font-size: 0.7em;
    color: #666;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #ddd;
}

}

/* Print Preview Mode (when not actually printing) */
@media screen {
#printSection {
max-width: 1200px;
margin: 20px auto;
background: white;
padding: 20px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    color: #333;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    border-bottom: 2px solid #dc143c;
}

.print-logo-img {
    max-width: 250px;
    height: auto;
}

.print-title {
    text-align: right;
}

.print-title h2 {
    font-size: 1.3em;
    margin-bottom: 5px;
    color: #dc143c;
    font-weight: bold;
}

.print-title p {
    font-size: 0.9em;
    color: #666;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.info-table td {
    padding: 8px;
    border: 1px solid #333;
}

.info-table .label {
    font-weight: bold;
    background-color: #f0f0f0;
    width: 20%;
}

.reference-section h3 {
    font-size: 1.1em;
    margin: 15px 0 10px 0;
    color: #dc143c;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 0.85em;
}

.reference-table th {
    background-color: #dc143c;
    color: white;
    padding: 8px;
    border: 1px solid #333;
}

.reference-table td {
    padding: 6px;
    border: 1px solid #333;
    text-align: center;
}

.reference-table .age-col {
    font-weight: bold;
    background-color: #f0f0f0;
}

.monitoring-section h3 {
    font-size: 1.1em;
    margin: 15px 0 10px 0;
    color: #dc143c;
}

.monitoring-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.monitoring-table th {
    background-color: #4a90e2;
    color: white;
    padding: 10px;
    border: 1px solid #333;
}

.monitoring-table td {
    padding: 12px;
    border: 1px solid #333;
    height: 40px;
}

.monitoring-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.risk-factors-note {
    font-size: 0.85em;
    margin-top: 10px;
    padding: 10px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
}

.risk-factors-note ul {
    margin-left: 20px;
    margin-top: 5px;
}

.print-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

.print-website {
    text-align: center;
    font-size: 0.85em;
    color: #666;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

}

/* Responsive Design */
@media (max-width: 768px) {
.form-grid {
grid-template-columns: 1fr;
}

.checkbox-group {
    grid-template-columns: 1fr;
}

.button-group {
    flex-direction: column;
}

.header h1 {
    font-size: 1.8em;
}

.header h2 {
    font-size: 1.2em;
}

}