/* Global white text */
body, .container, header, h1, label, button, .msg-line {
  color: white;
}

/* Basic container layout */
.container {
  display: grid;
  grid-template-columns: 120px 12px 120px; /* Narrower columns so labels wrap */
  grid-template-rows: repeat(6, auto); /* extra row for message line */
  grid-gap: 10px;
  max-width: 264px; /* 120 + 12 + 120 + small breathing room */
  margin: 0 auto;
  padding: 16px;
}

/* Styling for header and app icon */
header {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: span 3;
  text-align: center;
}

.app-icon {
  width: 30px;
  height: 30px;
  margin-right: 10px;
}

h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: normal;
}

/* Label styling */
label {
  text-align: left;
  padding-left: 5px;
  white-space: normal; /* allow wrapping so words stack */
  line-height: 1.2;
}

/* Input field styling */
input {
  width: 120px; /* force all inputs to identical width */
  padding: 5px;
  box-sizing: border-box;
  color: black; /* Text inside input boxes remains black */
  background-color: white; /* Keeps good contrast for text fields */
  border: 1px solid #ccc;
  border-radius: 4px;
  -moz-appearance: textfield; /* hide spinners in Firefox */
}
/* manual background classes for dynamic coloring */
.bg-white { background-color: #ffffff !important; }
.bg-yellow { background-color: #ffeb3b !important; }
.bg-purple   { background-color: #ab32b6 !important; color: #fff; }

/* hide number input spinners in Chrome/Safari/Edge */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.editable {
  width: 120px;
}

.uneditable {
  background-color: #f0f0f0;
}

/* Button row styling */
.button-row {
  display: grid;
  grid-template-columns: 120px 12px 120px; /* match main grid so buttons size like inputs */
  grid-column: span 3;
  text-align: center;
  margin-top: 8px;
}

button {
  padding: 8px 10px;
  margin: 0;
  cursor: pointer;
  width: 120px; /* same width as inputs */
  background-color: transparent;
  border: 1px solid white;
  border-radius: 4px;
  color: white;
}

.msg-line {
  margin-top: 6px;
  font-weight: 500;
  text-align: center;
  color: white;
  grid-column: span 3; /* span full width */
  width: 100%;
}

/* Visibility for the Remaining Points field and label */
#tbRemainingTP, #remainingLabel {
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
}

#tbRemainingTP.visible, #remainingLabel.visible {
  visibility: visible;
  height: auto;
  padding: 5px 0;
}
