/* Calculator Container */
.calculator-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 24px;
  background-color: #f9f9ff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Heading and Paragraph */
.calculator-container h1 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 10px;
  color: #333;
}
.calculator-container p {
  text-align: center;
  font-size: 16px;
  color: #555;
}

/* Trait Groups (Mother/Father Sections) */
.parent-section {
  margin-top: 30px;
  padding: 20px;
  background-color: #eef4ff;
  border: 1px solid #cdd6f4;
  border-radius: 10px;
}

.parent-section h2 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #222;
}

.trait-group {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 10px;
}
.trait-group h4 {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}
.trait-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

/* Custom Input for Genotypes */
.parent-section input[type="text"] {
  margin-top: 10px;
  padding: 8px;
  width: 100%;
  max-width: 200px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* Allele Type Inputs */
.allele-type {
 margin-top: 30px;                 
  padding: 20px;                    
  background-color: #eef4ff;        
  border: 1px solid #cdd6f4;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);

  /* 2-column grid instead of flex */
  display: grid;
  grid-template-columns: repeat(2, max-content);   /* dominant | recessive */
  column-gap: 48px;   /* horizontal space between the two columns */
  row-gap: 28px;      /* vertical space between Trait 1 and Trait 2 */
}

.allele-type label {
  font-weight: 500;
  display: flex;
  flex-direction: column;   /* keep “Trait 1 – Dominant allele:” on its own line */
  font-size: 14px;
}

.allele-type input[type="text"] {
  width: 60px;       /* little square box */
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 5px;
  border: 1px solid #ccc;
  text-align: center;
}

/* Action Buttons */
.actions {
  margin-top: 30px;
  text-align: left;
}
.actions button {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 18px;
  margin: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.actions button:hover {
  background-color: #0056cc;
}

/* Results Section */
.results-section {
  margin-top: 40px;
}
.results-section h2,
.results-section h3 {
  margin-bottom: 12px;
  color: #333;
}

/* Punnett Square Table */
#punnett-table table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
#punnett-table th,
#punnett-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}
#punnett-table th {
  background-color: #ddeeff;
  font-weight: bold;
  text-transform: none;
  font-variant: normal;
}
#punnett-table {
  overflow-x: auto;      /* new */
  -webkit-overflow-scrolling: touch; /* smoother on mobile */
}

#punnett-table th:first-child {         /* top-left blank cell */
  position: sticky;
  left: 0;
  z-index: 2;
}
#punnett-table thead th {               /* every header across */
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Chance Boxes */
.chance-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 16px;
  color: #333;
  margin-bottom: 20px;
}
.chance-boxes div {
  background-color: #e8f0ff;
  padding: 10px 16px;
  border-radius: 8px;
  flex: 1 1 200px;
  text-align: center;
}

/* Ratios Box */
.ratios-boxes {
  margin-top:20px;
  padding: 10px;
  background-color: #e8f0ff;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  margin-bottom: 20px;
}

/* Genotype to Phenotype Table */
.geno-pheno-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #e8f0ff;
}
.geno-pheno-table th,
.geno-pheno-table td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: center;
}
.geno-pheno-table th {
  background-color: #ddeeff;
}