/* Container styling - updated for full screen like B31.3 style */
#bkStressTab {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  width: 100%;             /* full width */
  max-width: 100%;         /* no max-width limit */
  margin: -30px 0 0 0;               /* no horizontal auto margin */
  padding: 25px 30px;      /* padding inside container */
  background-color: white; /* white background */
  border-radius: 0;        /* flat edges for full screen */
  box-shadow: none;        /* no shadow */
  box-sizing: border-box;  /* include padding in width */
  color: #2c3e50;
}

/* Headings */
#bkStressTab h2 {
  font-size: 22px;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 4px solid #2980b9; /* thicker blue underline */
  padding-bottom: 8px;
  font-weight: 700;
}

/* Labels */
#bkStressTab label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #2c3e50;
}

/* Select dropdowns and input fields */
#bkStressTab select,
#bkStressTab input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #ced6e0;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  background-color: #fff;
}

/* Disabled inputs style */
#bkStressTab select:disabled,
#bkStressTab input:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  color: #6c757d;
}

/* Focus & hover effect for enabled inputs */
#bkStressTab select:hover:not(:disabled),
#bkStressTab input:hover:not(:disabled),
#bkStressTab select:focus:not(:disabled),
#bkStressTab input:focus:not(:disabled) {
  border-color: #2980b9;
  outline: none;
  box-shadow: 0 0 8px rgba(41, 128, 185, 0.3);
}

/* Flex containers spacing */
#bkStressTab > form > div {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

/* Each input container */
#bkStressTab > form > div > div {
  flex: 1;
  min-width: 200px;
}

/* Output container */
#bkStressTab #bkOutputDiv {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  color: #34495e;
  font-weight: 600;
  display: none; /* hidden by default */
}

/* Output paragraphs */
#bkStressTab #bkOutputDiv p {
  margin: 10px 0;
  font-size: 1.1rem;
  border-bottom: 1px solid #e1e8f0;
  padding-bottom: 8px;
}

/* Remove border from last paragraph */
#bkStressTab #bkOutputDiv p:last-child {
  border-bottom: none;
}

/* Highlight the stress values */
#bkStressTab #bkOutputDiv span {
  color: #2980b9;
  font-weight: 700;
}

/* ======= Responsive for Mobile ======= */
@media (max-width: 480px) {
  #bkStressTab {
    max-width: 100%;
    padding: 15px 20px;  /* slightly less padding on mobile */
    margin-top: 20px;
    border-radius: 0;    /* flat edges on mobile */
    box-shadow: none;
  }

  /* Stack inputs vertically */
  #bkStressTab > form > div {
    flex-direction: column;
    gap: 15px;
  }

  #bkStressTab > form > div > div {
    min-width: auto;
    flex: unset;
  }

  /* Slightly larger font on inputs for easier tapping */
  #bkStressTab select,
  #bkStressTab input[type="number"] {
    font-size: 1.15rem;
    padding: 12px 15px;
  }

  /* Output container padding */
  #bkStressTab #bkOutputDiv {
    padding: 20px 15px;
    font-size: 1.15rem;
  }

  /* Output paragraphs spacing */
  #bkStressTab #bkOutputDiv p {
    margin: 12px 0;
  }
}

/* Warning & error input styling */
.bk-warning {
  color: red;
  font-weight: bold;
  display: none;
  margin-top: 5px;
}

/* Shake animation */
.error-border {
  border-color: red !important;
}

.shake {
  animation: shakeAnim 0.4s;
}

@keyframes shakeAnim {
  0% { transform: translateX(0px); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0px); }
}
