* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background: linear-gradient(to bottom, #d1f4ff, #a0dfff);
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px 20px 70px 20px;
}

/* Ensure the page never shrinks below a sensible phone width */
html, body { min-width: 320px; }

/* Make the main container responsive with a min + max */
.container {
  width: clamp(320px, 90vw, 600px);  /* min 320px, prefer 90% of viewport, cap at 600px */
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

header .top-bar {
  display: grid;
  grid-template-columns: auto 1fr auto; /* left btn | centered title | right btn */
  align-items: center;
  padding: 10px 20px;
  background: #f5f5f5;
}

header .top-bar h1 {
	font-size: 20px;
  margin: 0;
  text-align: center;
  justify-self: center; /* keeps it centered regardless of button widths */
}

header .top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #f5f5f5;
}

.clear-button, .save-button {
  background: transparent;
  border: none;
  font-size: 16px;
  color: #007aff;
  cursor: pointer;
}

main {
  padding: 20px;
}

.section {
  margin-bottom: 20px;
  background: #e8f7ff;
  border-radius: 8px;
  padding: 15px;
}

.section h2 {
  font-size: 16px;
  margin-bottom: 10px;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #ccc;
}

.row:last-child {
  border-bottom: none;
}

.row label {
  font-size: 14px;
}

.row span {
  display: flex;
  align-items: center;
}

.row input, .row select {
  font-size: 14px;
  padding: 5px;
}

.row input[type="number"] {
  text-align: right;
}

.hidden {
  display: none;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #fff;
  padding: 10px 0;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
}

footer button {
  background: transparent;
  border: none;
  font-size: 14px;
}

#results {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
}

.row .left-align {
  text-align: left;
}

.row .right-align {
  text-align: right;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #ccc;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row .text {
  flex: 1;
  text-align: left;
}

.result-row .amount {
  flex: 1;
  text-align: right;
  font-weight: bold;
}


.calculate-pay-button {
  display: block;
  margin: 15px auto;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #007aff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#miscBumpDescription {
  text-align: left;
}

#miscBump {
  text-align: right;
}

/* Base Rate Row */
.row-base-rate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.row-base-rate label {
  font-size: 14px;
  margin-right: 10px;
  white-space: nowrap;
}

.row-base-rate .inputs {
  display: flex;
  align-items: center;
  gap: 5px;
}

.row-base-rate .inputs span {
  display: inline-block;
  white-space: nowrap;
}

.row-base-rate .inputs input {
  font-size: 14px;
  padding: 5px;
  text-align: right;
  width: 80px;
}

#propsOptions, #wardrobeOptions, #uniformsOptions, #vehiclesOptions {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #f9f9f9;
}

#propsOptions label, #wardrobeOptions label, #uniformsOptions label, #vehiclesOptions label {
  display: block;
  margin-bottom: 5px;
}
.options-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Force brand block to center */
.brand-header {
  padding: 16px 20px 2px 20px;
  background: #fff;
}

/* Make the link a block with intrinsic width and center it */
.brand-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;     /* shrink to fit contents */
  margin: 0 auto;         /* center horizontally */
  text-decoration: none;
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
}

.brand-logo {
  width: 128px;
  height: 128px;
  display: block;
}

.brand-byline {
  flex-basis: auto;     /* or remove the property */
  align-self: center;
  opacity: 0.9;
  font-size: 14px;
  line-height: 1.2;
  font-style: italic;
}

/* Email signup layout: First Name | Email | Button */
.signup-form {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr auto;
  gap: 10px;
  align-items: center;
}

.signup-form input[type="text"],
.signup-form input[type="email"] {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
}

.signup-button {
  padding: 10px 14px;
  font-size: 14px;
  background-color: #007aff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

/* Copy + privacy rows full width */
.signup-proof, .signup-privacy, .signup-status {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.signup-status {
  font-size: 13px;
  min-height: 18px;
  color: #0a5;
}

/* Accessibility + honeypot */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.hp-field { display: none !important; }

/* Mobile stack */
@media (max-width: 520px) {
  .signup-form {
    grid-template-columns: 1fr;
  }
  .signup-button { width: 100%; }
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.result-row .text { flex: 1 1 auto; min-width: 0; }
.result-row .amount { flex: 0 0 auto; text-align: right; min-width: 8ch; }

hr.thick {
  border: 0;
  border-top: 3px solid #444; /* adjust weight/color to taste */
  margin: 10px 0;
}

/* NP breakdown: use single-column block, no two-column flex */
.result-row.np-line {
  display: block;              /* overrides flex */
  justify-content: flex-start; /* safety: neutralize space-between */
  gap: 0;                      /* no inter-column gap */
  width: 100%;
}
.result-row.np-line .text {
  display: block;
  width: 100%;
  min-width: 0;
}
.result-row.np-line .amount {
  display: none !important;    /* remove the right column entirely */
}
.spacer-row { height: 40px; }
