h1 {
    color: #f0f0f0;
    margin-bottom: 20px;
    text-align: center; 
    display: block; 
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: fit-content;
    margin-top: 10px;
    background-color: #2c2c2c; 
    color: #fff; 
}

.container {
    text-align: center;
    padding: 20px;
    background-color: #333; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.button-container {
    display: flex;
    flex-direction: column; 
    align-items: center;
}

.output-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background-color: #012d07;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 0 4px rgba(255,255,255,0.05);
}

.input-group, .output-group {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: fit-content;
}

.input-group label, .output-group label {
    margin-bottom: 5px;
}

.input-group input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555; 
    background-color: #444;
    color: #f0f0f0;
    width: 100%;
    box-sizing: border-box;
}

.input-group_input_large {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
}

.input-group_input_large label {
    margin-bottom: 5px;
}

.input-group_input_large input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555; 
    background-color: #444; 
    color: #f0f0f0; 
    width: 100%;
    box-sizing: border-box;
}

.output-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Make all output items left-aligned */
    margin-bottom: 20px;
}

.output-group input {
    padding: 10px;
    border: none;
    background: none;
    color: #90ee90; /* Light green text color */
    font-weight: bold;
    width: 100%;
    box-sizing: border-box;
}

.output-label {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0; /* Remove margin-left */
    text-align: left; /* Explicitly align label text left */
}

.output-field {
    flex: 2;
    padding: 10px;
    border: none;
    background: none;
    color: #90ee90; /* Light green text color */
    font-weight: bold;
    font-size: 1.5em; /* Larger text size */
    text-align: right; /* Right align text */
    box-sizing: border-box;
}

.output-link {
    margin-top:10px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555; 
    width: min-content;
    box-sizing: border-box;
    background-color: #2c2c2c;
    color: #ffa500;
}

.output-group-normal {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Make all output items left-aligned */
    margin-bottom: 20px;
}

.output-group-normal input {
    padding: 10px;
    border: none;
    background: none;
    color: #90ee90; /* Light green text color */
    font-weight: normal;
    width: 100%;
    box-sizing: border-box;
}

.output-field-normal {
    flex: 2;
    padding: 10px;
    border: none;
    background: none;
    color: #b7f1b7; /* Light green text color */
    font-weight: normal;
    font-size: 1.5em; /* Larger text size */
    text-align: right; /* Right align text */
    box-sizing: border-box;
}

.output-label-normal {
    font-size: 16px;
    font-weight:normal;
    text-transform: uppercase;
    margin: 0; /* Remove margin-left */
    text-align: left; /* Explicitly align label text left */
    color: #b7f1b7; /* Light green text color */
}

/* Multi-selection group for form generators */
.radio-group {
    display: flex;
    flex-direction: row; /* Arrange radio buttons vertically */
    margin-bottom: 20px;
}

.radio-group input[type="radio"] {
    margin-right: 5px; /* Add spacing between radio button and label */
}

.radio-group label {
    display: inline-block;
    margin-right: 10px;
    margin-top: 5px;
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
}

/* Standard nav buttons */
.btn {
    background-color: #ffa500; /* Orange background for buttons */
    color: #2c2c2c; /* Dark gray text color for buttons */
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: left;
    gap: 10px;
    margin: 10px 0; /* Margin for vertical arrangement */
    width: 300px; /* Fixed width for uniform buttons */
    justify-content: left; /* Center content in buttons */
}

.btn i {
    font-size: 20px;
    margin-right: 10px; /* Add margin to the right of the icon */
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(255, 165, 0, 0.2); /* Orange shadow on hover */
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 165, 0, 0.1); /* Lighter orange shadow on active */
}

/* Main page bold buttons */
.main_btn {
    background-color: #ffa500; /* Orange background for buttons */
    color: #2c2c2c; /* Dark gray text color for buttons */
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: left;
    gap: 10px;
    margin: 10px 0; /* Margin for vertical arrangement */
    width: 200px; /* Fixed width for uniform buttons */
    justify-content: left; /* Center content in buttons */
}

.main_btn i {
    font-size: 20px;
    margin-right: 10px; /* Add margin to the right of the icon */
}

.main_btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(255, 165, 0, 0.2); /* Orange shadow on hover */
}

.main_btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 165, 0, 0.1); /* Lighter orange shadow on active */
}

/* Sub-page, calculator/function buttons */
.sub_btn {
    background-color: #ffa500;
    color: #2c2c2c;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0; /* Margin for vertical arrangement */
    width: fit-content; /* Fixed width for uniform buttons */
    justify-content: center; /* Center content in buttons */
}

.sub_btn i {
    font-size: 20px;
    margin-right: 10px; /* Add margin to the right of the icon */
}

.sub_btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(255, 165, 0, 0.2); /* Orange shadow on hover */
}

.sub_btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 165, 0, 0.1); 
}

/* Small button for calc functions */
.small_btn {
    background-color: #ffa500;
    color: #2c2c2c;
    border: none;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 5px 0;
    width: fit-content;
    justify-content: center;
}

.small_btn i {
    font-size: 12px;
    margin-right: 5px; /* Add margin to the right of the icon */
}

.small_btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(255, 165, 0, 0.2); /* Orange shadow on hover */
}

.small_btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 165, 0, 0.1); 
}

/* Awards sub-form */
.flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 10px;
    gap: 5px; 
}

.flex-row input, .flex-row label, .flex-row button {
    margin: 0 5px; 
}

.flex-row .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ff0000;
}

.flex-row .delete-btn i {
    font-size: 16px;
    width: fit-content; 
}

.small-input {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #555; /* Darker border */
    background-color: #444; /* Dark background for input */
    color: #f0f0f0; /* Off-white/light-orange text color */
    width: 100px; 
    box-sizing: border-box;
}

input[type="date"].small-input{
    width: 110px;
}
input[type="number"].small-input {
    width: 75px;
}

.small-output {
    width: fit-content;
    max-width: 11ch;
    padding: 0.5em;
    box-sizing: border-box;
    border: none;
    background: none;
    color: #90ee90; 
    font-weight: bold;
    font-size: 1.0em; 
    text-align: left; 
}

.small-output-short {
    width: fit-content;
    max-width: 7ch;
    padding: 0.5em;
    box-sizing: border-box;
    border: none;
    background: none;
    color: #90ee90; 
    font-weight: bold;
    font-size: 1.0em; 
    text-align: left; 
}

.header-logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto 30px auto; /* center the logo and add space below */
}

.special-output {
    display: flex;
    align-items: center;
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}

.special-output i {
    margin-right: 10px;
    font-size: 20px;
}

/* Orange Warning Style */
.orange-warning {
    background-color: #FFA50022; /* light transparent orange */
    color: #FF8C00; /* dark orange text */
    border: 1px solid #FF8C00;
}

/* Red Error Style */
.red-warning {
    background-color: #FF634722; /* light transparent red */
    color: #FF4500; /* oranger red text */
    border: 1px solid #FF4500;
}

.label-wrapper {
    display: inline-flex;
    align-items: center; /* Correct vertical centering */
    gap: 8px;
    white-space: nowrap; /* <- Important: Prevents wrapping */
}

/* Green Checkmark Icon */
.green-check {
    color: #228B22; /* forest green */
    font-size: 18px;
}

/* === calc_2018slu overrides & helpers === */

/* === SLU card + layout tweaks === */
.calc-slu .container {
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 1.25rem;
  text-align: center;
}

/* logo inside calculators */
.calc-slu .header-logo {
    max-height: 56px;
}

/* Header image */
.calc-slu .header-image img {
  width: 100%;
  max-width: 600px;
  display: block;
  margin: 0.75rem auto 0.25rem auto;
  border-radius: 8px;
}

/* results area */
.slu-results {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    margin: 1rem 0;
    font-size: 1.25rem;
    color: #90ee90; /* light green to match outputs */
}
.slu-results .label {
    font-weight: 700;
    margin-right: 0.25rem;
    color: #f0f0f0;
}

/* calculator button group */
.calc-buttons {
    display: flex;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

/* Center input groups, keep label close to input */
.calc-slu .input-group {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;   /* << center the whole pair */
  gap: 0.5rem;               /* << small space between label/input */
  margin: 0.5rem auto;
}
.calc-slu .input-group label {
  font-weight: 600;
  text-align: right;
  /* no fixed width so they stay tight */
}

/* faded unit label after input */
.unit {
    opacity: 0.7;
    font-size: 0.9em;
}

/* checkbox group already styled globally; add spacing */
.calc-slu .checkbox-group label {
    margin: 0.25rem 0;
}

/* Special Considerations: centered block, items stacked vertically and left-aligned */
.special-considerations {
  margin: 1rem auto 0 auto;
  max-width: 560px;
  text-align: left;
}
.special-considerations h3 {
  text-align: center;
  margin-bottom: 0.5rem;
}
.special-considerations .checkbox-group {
  display: flex;
  flex-direction: column;     /* << stack vertically */
  align-items: flex-start;     /* << left-align the items */
  gap: 0.25rem;
}

/* Details centered width */
.details {
  margin: 1rem auto 0 auto;
  max-width: 900px;
  text-align: left;
}
.details summary { cursor: pointer; }
.details pre {
  white-space: pre-wrap;
  background: #444;
  color: #f0f0f0;
  padding: 0.75rem;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Top "Schedule Loss" outputs card */
.slu-card {
  margin: 0 auto 1rem auto;
  padding: 1rem 1.25rem;
  background: #2c2c2c;
  border: 1px solid #555;
  border-radius: 12px;
  max-width: 560px;
}

/* Top "Schedule Loss" outputs card */
.slu-card .card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffa500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-bottom: 0.5rem;
}

/* Min/Max side-by-side, close together and centered */
.slu-row {
  display: inline-flex;
  gap: 1rem;              /* space between Min… and Max… blocks */
  align-items: baseline;
  justify-content: center;
}

/* Output items look consistent with your theme */
.output-item {
  display: inline-flex;   /* change from grid to inline-flex */
  flex-direction: row;
  align-items: baseline;
  gap: 0.5rem;            /* small gap between label and value */
}
.output-item .output-label {
  text-transform: uppercase;
  font-size: 0.95rem;
  color: #f0f0f0;
  letter-spacing: 0.04em;
  text-align: center;
}
.output-item .output-field {
  padding: 0;             /* keep it compact next to label */
  border: none;
  background: none;
  color: #90ee90;
  font-weight: bold;
  font-size: 1.5rem;
  text-align: center;
}

/* Buttons rows (used for Back only at bottom now) */
.calc-buttons {
  display: flex;
  gap: 0.75rem;
  margin: 0.75rem auto;
  justify-content: center;
  flex-wrap: wrap;
}

/* Place the Back button area farther down with extra space above */
.page-bottom {
  margin: 1.25rem 0 0.25rem 0;
}

/* Award rows layout */
#rowContainerAwards .flex-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;           /* lets fields wrap to new lines when tight */
  margin-bottom: 0.5rem;
}

/* Avoid date inputs forcing the row too wide on mobile */
.small-input[type="date"] {
  min-width: 0;              /* allow shrinking */
  width: 12rem;              /* reasonable default */
  max-width: 100%;
}

/* Date group: vertical by default (mobile-first) */
.date-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.date-stack .start-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;               /* space between Start input and "to" label */
}

.date-stack .to-label {
  white-space: nowrap;       /* keep "to" from wrapping alone */
}

/* Optional: on wider screens, put dates on a single line again */
@media (min-width: 700px) {
  .date-stack {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  .date-stack .start-wrap {
    margin-right: 0.25rem;
  }
}

/* Award rows layout */
#rowContainerSLU .flex-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;           /* wrap when space is tight */
  margin-bottom: 0.5rem;
}

/* The “Site” stack */
#rowContainerSLU .flex-row .inline-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 260px;           /* allow to grow and shrink */
  min-width: 220px;
}

#rowContainerSLU .flex-row .site-slot {
  flex: 1 1 260px;           /* give the select room to expand */
  min-width: 220px;
}

#rowContainerSLU .flex-row .site-select {
  width: 100%;               /* fill the slot */
  max-width: 100%;
  min-width: 0;              /* CRUCIAL in flex layouts to allow shrink */
}

/* Numeric / output fields */
.small-output-weeks {
  /* Replace min-content with a predictable width */
  inline-size: 8.5ch;        /* ~width for “0000.00” */
  min-inline-size: 7ch;      /* never smaller than this */
  text-align: right;

  padding: 0.25rem 0.5rem;
  box-sizing: border-box;
  border: none;
  background: transparent;
  color: #90ee90;
  font-weight: 700;
  font-size: 1rem;

  flex: 0 0 auto;            /* don't shrink below its width */
}

.small-input-percent {
  border-radius: 5px;
  border: 1px solid #555; /* Darker border */
  background-color: #444; /* Dark background for input */
  color: #f0f0f0; /* Off-white/light-orange text color */
  inline-size: 8.5ch;
  min-inline-size: 7ch; 
  box-sizing: border-box;
  inline-size: 6ch;
  text-align: right;
  padding: 0.25rem 0.5rem;
  box-sizing: border-box;
  flex: 0 0 auto;  
}

/* Optional: make readonly outputs feel like outputs */
.small-output-weeks[readonly] {
  opacity: 0.95;
}

/* Header row styling */
.slu-header-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #ccc;
  margin-bottom: 0.25rem;
}

.slu-header-row .col-header {
  text-align: center;
}

/* Align widths with actual input columns */
.slu-header-row .site-col      { flex: 1 1 260px; min-width: 220px; }
.slu-header-row .hp-col,
.slu-header-row .weeks-col,
.slu-header-row .percent-col,
.slu-header-row .netweeks-col  { width: 5rem; text-align: right; }

.mini-label {
  display: block;
  font-size: 0.7rem;
  color: #bbb;
  text-align: center;
  margin-bottom: 0.15rem;
}

.col-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 5rem;
}

.optional-fieldset {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px 15px 15px;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
}

.optional-fieldset legend {
    padding: 0 10px;
    font-size: 0.85em;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.5px;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px;
    font-size: 1em;
    background-color: #444;
    color: #f0f0f0;
    box-sizing: border-box;
}

select:focus {
    outline: none;
    border-color: #ffa500;
}