/* Global Styles */
:root {
  --primary-blue: #0d47a1;
  --primary-hover: #083275;
  --text-color: #111;
  --light-text: #666;
  --border-color: #ddd;
  --bg-color: #f4f6f8;
  --card-bg: #fff;
  --red-text: #9b0620;
  --green-text: #008017;
  --input-border: #666;
  --input-bg: #fafafa;
  --results-bg: #f4f7ff;
  --bg-pink: rgba(155, 6, 32, 0.1);
  --bg-gray-lighter: #f9f9f9;
  --border-gray-light: #eee;
  --border-gray-lighter: #f0f0f0;
  --bg-warning-light: #fff9e6;
  --border-warning: #ffecb5;
  --color-red-dot: #d05548;
  --text-dark-gray: #333;

  /* Font Sizes */
  --font-size-xxs: 8px;
  --font-size-xs: 10px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;

  /* New Button Variables */
  --color-cyan: #05aec0;
  --color-blue-primary-transparent-1: rgba(13, 71, 161, 0.9);
  --color-blue-dark-transparent-1: rgba(8, 50, 117, 0.9);
  --gradient-primary: linear-gradient(180deg, #2979ff 0%, #0d47a1 100%);
  --color-white: #ffffff;
  --gradient-red: linear-gradient(180deg, #e57373 0%, #d32f2f 100%);
  --shadow-light: rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Open Sans", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0px;
  font-size: var(--font-size-base);
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
ul,
li {
  padding: 0;
  margin: 0;
  font-family: "Open Sans", sans-serif;
}

button {
  font-family: "Open Sans", sans-serif;
}

h1 {
  color: var(--text-color);
  font-size: var(--font-size-2xl);
  font-style: normal;
  font-weight: 600;
  line-height: normal;
}

h2 {
  font-size: var(--font-size-lg);
  margin: 0;
  color: var(--primary-blue);
  font-weight: 700;
}

h3 {
  color: var(--text-color);
  font-size: var(--font-size-lg);
  font-style: normal;
  font-weight: 600;
  line-height: normal;
}

h4 {
  color: var(--text-color);
  font-size: var(--font-size-md);
  font-style: normal;
  font-weight: 600;
  line-height: normal;
}

p {
  color: var(--text-color);
  font-size: var(--font-size-base);
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

@media (max-width: 1280px) {
  h1 {
    font-size: var(--font-size-md);
  }

  h2,
  h3 {
    font-size: var(--font-size-base);
  }
}

.header {
  background: var(--card-bg);
  box-shadow: 0 4px 30px 0 var(--shadow-light);
  height: 150px;
  margin-bottom: 24px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.header img {
  width: 100%;
  max-width: 80px;
  border-radius: 50%;
}
.header-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Layout Utilities */
.layout-wrapper {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.col-left,
.col-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 1280px) {
  .layout-wrapper {
    flex-direction: column;
  }
}

/* Card Styles */
.card {
  background: var(--card-bg);
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 30px 0 var(--shadow-light);
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.card-header.no-border {
  border-bottom: none;
  padding-bottom: 0;
}

.card-body {
  padding: 20px;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.form-row label {
  flex: 0 0 60%;
  margin-bottom: 0;
  padding-top: 8px;
  /* Align with input */
}

.form-row .input-container {
  flex: 0 0 35%;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-color);
  font-size: var(--font-size-base);
}

.required {
  color: var(--red-text);
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  overflow: hidden;
  color: var(--text-color);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Open Sans";
  font-size: var(--font-size-base);
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  /* 142.857% */
  box-sizing: border-box;
  height: 32px;
  transition: all 0.2s linear;
}

.form-control:focus {
  outline: none;
  border-color: #2979ff;
  box-shadow: 0 0 0 2px rgba(41, 121, 255, 0.2);
}

/* Custom Select Arrow */
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("images/arrow.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  /* Adjust size as needed */
  padding-right: 32px;
  /* Prevent text overlap */
}

/* Custom Number Input Spinner */
input[type="number"].form-control {
  background-image: url("images/spinner.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  /* Adjust based on svg size */
  padding-right: 32px;
  -moz-appearance: textfield;
  /* Hide default spinner in Firefox */
  appearance: textfield;
  /* Standard property */
}

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

.form-text {
  font-size: var(--font-size-sm);
  color: var(--light-text);
  margin-top: 4px;
  display: block;
  font-weight: 400;
}

/* Input Group (Separate Inputs) */
.input-group {
  display: flex;
  gap: 16px;
  /* Space between inputs */
  width: 100%;
}

/* Ensure inputs in a group have their normal styling restored */
.input-group .form-control {
  border-radius: 4px;
  /* Restore radius */
  flex: 1;
  /* Take available space */
  min-width: 0;
}

/* Specific styling for the unit dropdown if needed */
.input-group .input-group-append {
  flex: 1;
  /* Make same size as input */
  min-width: 0;
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
  }

  .none-mb {
    display: none;
  }
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-blue);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--font-size-base);
  width: 100%;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: 0.5s;
}

.btn-hover-effect {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: 0.5s;
}

.btn-hover-effect::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: all 0.5s linear;
  z-index: -1;
  border-radius: 4px;
}

.btn-hover-effect:hover {
  cursor: pointer;
  color: var(--color-white);
  border-color: transparent;
}

.btn-hover-effect:hover::before {
  top: 0;
}

.btn-hover-effect-red {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: 0.5s;
}

.btn-hover-effect-red::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-red);
  transition: all 0.5s linear;
  z-index: -1;
  border-radius: 4px;
}

.btn-hover-effect-red:hover {
  cursor: pointer;
  color: var(--color-white);
  border-color: transparent;
}

.btn-hover-effect-red:hover::before {
  top: 0;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: all 0.5s linear;
  z-index: -1;
  border-radius: 4px;
}

.btn-primary:hover {
  cursor: pointer;
}

.btn-primary:hover::before {
  top: 0;
}

.btn-primary > * {
  position: relative;
  z-index: 1;
}

.btn-reset {
  border-radius: 4px;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  cursor: pointer;
  background: transparent;
  display: flex;
  height: 32px;
  padding: 8px 12px;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  font-size: var(--font-size-base);
  font-style: normal;
  font-weight: 600;
  line-height: normal;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-blue);
  cursor: pointer;
  font-size: var(--font-size-sm);
  white-space: nowrap;
  text-decoration: underline;
  transition: all 0.3s ease;
}

.btn-link:hover {
  color: var(--red-text);
}

.btn-container {
  margin: 20px 0;
  display: flex;
  justify-content: flex-end;
}

.btn-container.right {
  text-align: right;
}

.btn-outline {
  background: white;
  border: 1px solid var(--border-color);
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-outline-small,
.btn-primary-small {
  padding: 8px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: var(--font-size-base);
  margin-left: 12px;
  font-weight: 600;
}

.btn-outline-small {
  background: white;
  border: 1px solid var(--border-color);
}

.btn-primary-small {
  background: var(--primary-blue);
  color: white;
  border: none;
}

/* Linear Animation Button */
.consider-button {
  background: var(--card-bg);
  color: var(--input-bg);
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: var(--font-size-base);
  cursor: pointer;
  position: relative;
  z-index: 1; /* Establish stacking context */
  overflow: visible; /* Allowing the border to extend outside */
  transition: color 0.3s;
  display: inline-block;
  margin: 4px; /* Space for the border */
  cursor: text;
}

.consider-button::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 6px; /* Slightly larger radius */
  background: linear-gradient(
    90deg,
    var(--primary-blue),
    var(--color-cyan),
    var(--primary-blue),
    var(--color-cyan)
  );
  background-size: 300% 300%;
  z-index: -1; /* Behind the button background */
  animation: border-flow 3s linear infinite;
}

@keyframes border-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* Results Section */
.results-summary {
  background-color: var(--results-bg);
  padding: 12px;
  border-radius: 8px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-row {
  display: flex;
  justify-content: start;
  align-items: flex-start;
  padding: 0;
  gap: 12px;
}

.result-row span:last-child {
  text-align: left;
  color: var(--text-color);
  line-height: 20px;
}

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

@media (max-width: 600px) {
  .result-row span:first-child {
    flex: 1;
    width: 100%;
  }

  .form-row .input-container {
    flex: 100%;
    width: 100%;
  }

  .input-with-reset {
    justify-content: start;
  }
}

/* Utils */
.row-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-with-reset {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.input-with-reset .form-control {
  width: 110px;
}

.green-text {
  color: var(--green-text);
}

/* Tables */
.factors-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.factors-table th {
  text-align: left;
  font-size: var(--font-size-sm);
  color: var(--text-color);
  padding: 8px;
  background-color: var(--bg-gray-lighter);
}

.factors-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border-gray-light);
}

.factors-table input[type="number"] {
  width: 100%;
}

.green-text {
  color: var(--green-text);
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Radio and Select Styles */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-group > label {
  display: inline-flex;
  align-items: flex-start; /* Align top for multi-line */
  margin-right: 0;
  font-weight: 400;
  cursor: pointer;
  position: relative;
  padding-left: 28px; /* Space for custom radio */
  line-height: 20px; /* Match input height/text */
  color: var(--text-color);
}

.radio-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Custom Radio Circle */
.radio-group label::before {
  content: "";
  position: absolute;
  top: 2px; /* Align with first line of text */
  left: 0;
  height: 18px;
  width: 18px;
  background-color: transparent;
  border: 1px solid var(--input-border);
  border-radius: 50%;
  transition: all 0.2s ease;
  box-sizing: border-box; /* Ensure border is included in size */
}

/* Custom Radio Checkmark/Dot */
.radio-group label::after {
  content: "";
  position: absolute;
  display: none;
  top: 6px; /* Center inside 18px circle */
  left: 4px; /* Center inside 18px circle */
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-blue);
}

/* Checked State */
.radio-group input[type="radio"]:checked ~ label::before {
  border-color: var(--primary-blue);
}

/* Correct approach assuming <label><input> Text</label> structure */
.radio-group label input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Create the checkmark container (the label itself acts as container) */
.radio-group label {
  position: relative;
  user-select: none;
}

/* Custom Radio - The Box (Outer Ring) */
.radio-group label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0; /* Aligned with text line-height */
  width: 18px;
  height: 18px;
  border: 1px solid var(--text-dark-gray); /* Darker border */
  border-radius: 50%;
  background-color: transparent;
  box-sizing: border-box;
}

/* When checked - Outer Ring becomes Blue Border */
.radio-group label:has(input[type="radio"]:checked)::before {
  border-color: var(--primary-blue);
  background-color: transparent; /* Keep transparent */
  border-width: 2px; /* Slightly thicker when active */
}

/* The Dot (Inner Circle) */
.radio-group label::after {
  content: "";
  position: absolute;
  display: none;
  left: 4px; /* Adjust for centered position (18 - 10) / 2 = 4 */
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-blue); /* Blue dot */
}

/* Show dot when checked */
.radio-group label:has(input[type="radio"]:checked)::after {
  display: block;
}

.age-group {
  display: flex;
  align-items: start;
  gap: 12px;
}

.help-text-small {
  font-size: var(--font-size-sm);
  color: var(--light-text);
  line-height: 1.2;
  margin-top: 4px;
}

.filter-controls {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  font-size: var(--font-size-sm);
}

.gender-select,
.age-select {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Custom Select Box Styles */
.custom-select-wrapper {
  position: relative;
  user-select: none;
  width: 100%;
}

.custom-select-wrapper select {
  display: none;
}

/* Container for the custom select */
.custom-select {
  position: relative;
  width: 100%;
}

.select-selected {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  color: var(--text-color);
  padding: 8px 12px;
  padding-right: 32px;
  /* Space for arrow */
  cursor: pointer;
  font-family: "Open Sans";
  font-size: var(--font-size-base);
  line-height: 20px;
  height: 32px;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

/* Arrow for Custom Select */
.select-selected:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 12px;
  height: 7px;
  background-image: url("images/arrow.svg");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  transition: transform 0.3s ease;
  transform: translateY(-50%);
}

/* Rotate arrow when open */
.select-selected.select-arrow-active:after {
  transform: translateY(-50%) rotate(180deg);
}

/* Dropdown Items Container */
.select-items {
  position: absolute;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 99;
  top: 100%;
  left: 0;
  right: 0;
  box-shadow: 0 4px 6px var(--shadow-light);
  max-height: 200px;
  overflow-y: auto;
}

/* Hide items when closed */
.select-hide {
  display: none;
}

/* Individual Option Styles */
.select-items div {
  color: var(--text-color);
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-gray-lighter);
  font-size: var(--font-size-base);
  display: flex;
  align-items: center;
}

.select-items div:last-child {
  border-bottom: none;
}

/* Hover state for options */
.select-items div:hover,
.same-as-selected {
  background-color: rgba(13, 71, 161, 0.1);
  /* Primary blue with opacity */
  color: var(--primary-blue);
}

.same-as-selected::before {
  content: "✓";
  margin-right: 8px;
  font-weight: bold;
}

/* Report Section Styles */
.section-title {
  margin-bottom: 16px;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Specific overrides for result-row inside report-list to match the design */
.report-list .result-row {
  align-items: baseline;
  /* Align text to top */
  gap: 20px;
}

.report-list .result-row span:first-child {
  flex: 0 0 35%;
  /* Fixed width for labels */
  max-width: 250px;
  color: var(--text-color);
  /* Per design image labels are dark */
  font-weight: 400;
  /* Regular weight based on image */
}

.result-row span:first-child {
  flex: 0 0 35%;
  max-width: 250px;
}

.report-list .result-row span:last-child {
  flex: 1;
  /* Allow value to take remaining space */
  text-align: left;
  /* Align left */
  white-space: normal;
  /* Allow text wrapping */
  font-weight: 400;
  color: var(--text-color);
}

.link {
  color: var(--text-color);
  text-decoration: underline;
  word-break: break-all;
}

.mt-4 {
  margin-top: 24px;
}

/* Aggravating Factors Styles */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.red-text {
  color: var(--red-text);
  font-weight: 700;
  font-size: var(--font-size-base);
}

/* Stack layout for left column items */
.factors-container input[type="number"].form-control {
  background-image: none;
}

.factors-container {
  display: flex;
  flex-direction: column;
  /* gap: 16px; */
  background: var(--input-bg);
  padding: 12px;
}

.factors-header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.header-col {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-color);
  text-align: left;
}

.header-col small {
  font-weight: 400;
  color: var(--light-text);
}

.factor-col-1 {
  flex: 0 0 35%;
}

.factor-col-2,
.factor-col-3 {
  flex: 0 0 32.5%;
}

.factor-row {
  display: flex;
  align-items: center;
  /* Center inputs vertically with text */
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

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

/* Numbered Arrow List for Aggravating Factors */
.aggravating-factors-list {
  counter-reset: agg-factor-counter;
}

.aggravating-factors-list .factor-row {
  position: relative;
}

.aggravating-factors-list .factor-name {
  display: flex;
  align-items: flex-start;
  color: var(--text-color);
}

.aggravating-factors-list .factor-name::before {
  counter-increment: agg-factor-counter;
  content: counter(agg-factor-counter) ". ";
  color: var(--text-color);
  margin-right: 8px;
  white-space: nowrap;
  background-image: url("images/arrow-up.svg");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 10px;
  padding-left: 16px;
}

.aggravating-factors-list .total-row .factor-name::before {
  content: none;
  counter-increment: none;
}

/* Numbered List for Mitigating Factors */
.mitigating-factors-list {
  counter-reset: mit-factor-counter;
}

/* 4-Column Layout for Mitigating and Aggravating Factors */
.mitigating-factors-list .factor-col-1,
.mitigating-factors-list .factor-name,
.aggravating-factors-list .factor-col-1,
.aggravating-factors-list .factor-name {
  flex: 0 0 55%;
}

.mitigating-factors-list .factor-col-2,
.mitigating-factors-list .factor-col-3,
.mitigating-factors-list .factor-col-4,
.mitigating-factors-list .factor-input-group,
.aggravating-factors-list .factor-col-2,
.aggravating-factors-list .factor-col-3,
.aggravating-factors-list .factor-col-4,
.aggravating-factors-list .factor-input-group {
  flex: 0 0 15%;
}

.mitigating-factors-list .factor-name {
  position: relative;
  align-items: start;
  color: var(--text-color);
}

/* Exclude Gender Row (First Item) from Numbering */

.mitigating-factors-list .factor-name::before {
  counter-increment: mit-factor-counter;
  content: counter(mit-factor-counter) ". ";
  color: var(--text-color);
  margin-right: 8px;
  white-space: nowrap;
  background-image: url("images/arrow-up-green.svg");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 10px;
  padding-left: 16px;
}

/* Exclude Total Row from Numbering */
.mitigating-factors-list .total-row .factor-name::before {
  content: none;
  counter-increment: none;
}

.factor-name {
  flex: 0 0 35%;
  padding-right: 0px;
  font-size: var(--font-size-base);
  color: var(--text-color);
  font-weight: 400;
  line-height: 20px;
}

.factor-input-group {
  flex: 0 0 32.5%;
}

.factor-input-group input.form-control {
  width: 90%;
  /* Slight gap */
}

.mobile-label {
  display: none;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
  width: 90px;
}

/* Mobile Responsive Factors */
@media (max-width: 768px) {
  .factor-row {
    flex-flow: row wrap;
    /* Allow wrapping */
    align-items: stretch;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 16px;
    gap: 12px;
    margin-bottom: 16px;
    /* Space between cards */
  }

  .factor-row:last-child {
    border-bottom: 1px solid var(--border-color);
  }

  .factor-name {
    flex: 0 0 100%;
    /* Force full width */
    width: 100%;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: var(--font-size-base);
    padding-right: 0;
    border-bottom: 1px solid var(--bg-color);
    padding-bottom: 8px;
  }

  .factor-input-group {
    flex: 0 0 calc(50% - 6px);
    /* 2 columns (Wait for gap: 12px / 2 = 6px) */
    width: calc(50% - 6px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .factor-input-group input.form-control {
    width: 100%;
  }

  .mobile-label {
    display: block;
    /* Show labels above inputs */
    margin-bottom: 12px;
  }
}

/* Disclaimer */
.disclaimer {
  background-color: var(--input-bg);
  color: var(--text-color);
  padding: 12px;
  border-radius: 8px;
  font-size: var(--font-size-base);
}

.flex {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.warning-icon {
  font-size: var(--font-size-lg);
}

/* Committee Section */
.committee-section {
  margin-top: 32px;
}

.section-heading {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 16px;
}

.text-center {
  text-align: center;
}

.scrollbar {
  height: 470px;
  overflow-y: scroll;
  overflow-x: hidden;
}

.mb-100 {
  margin-bottom: 100px;
}
.mitigating .factor-input-group input.form-control,
.aggravating-factors-list .factor-input-group input.form-control {
  width: 90%;
  text-align: right;
}
.court .form-row .input-container {
  flex: 0 0 15%;
}
@media (max-width: 1280px) {
  .mitigating .factor-input-group input.form-control,
  .aggravating-factors-list .factor-input-group input.form-control {
    width: 90%;
  }
  .col-left,
  .col-right {
    width: 100%;
  }
}
@media (max-width: 786px) {
  .court .form-row .input-container {
    flex: 0 0 100%;
  }
  .col-left,
  .col-right {
    width: 100%;
  }

  .input-with-reset {
    justify-content: start;
  }

  .btn-outline-small,
  .btn-primary-small {
    margin-left: 0;
  }

  .header,
  .card-body,
  .card-header,
  .results-summary,
  .factor-row,
  .factors-container {
    padding: 8px;
  }

  .container {
    padding: 0 8px;
  }

  .factor-col-1 {
    flex: 0 0 40%;
  }

  .mb-100 {
    margin-bottom: 0;
  }

  .results-summary,
  .result-row {
    column-gap: 2px;
    row-gap: 12px;
  }

  .result-row {
    justify-content: space-between;
  }

  .input-with-reset .form-control {
    width: 100% !important;
  }

  .result-row span:first-child {
    flex: 0 0 50%;
  }

  .factor-col-1 {
    flex: 0 0 100%;
  }

  .factor-col-2,
  .factor-col-3,
  .factor-col-4 {
    display: none;
  }
  .mitigating .factor-input-group input.form-control,
  .aggravating-factors-list .factor-input-group input.form-control {
    width: 100%;
  }

  /* Mobile Layout for Mitigating and Aggravating Factors: 2 columns for inputs */
  .mitigating-factors-list .factor-name,
  .aggravating-factors-list .factor-name {
    flex: 0 0 100%;
  }

  .mitigating-factors-list .factor-input-group,
  .aggravating-factors-list .factor-input-group {
    flex: 0 0 auto;
  }
  .mitigating-factors-list .factor-col-1,
  .mitigating-factors-list .factor-name,
  .aggravating-factors-list .factor-col-1,
  .aggravating-factors-list .factor-name,
  .factors-header .factor-col-1 {
    flex: 0 0 100%;
  }
  .mitigating-factors-list .factor-name {
    margin-left: 0;
  }
}

.sample2 .aggravating-factors-list .factor-name::before {
  display: none;
}
.sample2 .mitigating-factors-list .factor-name::before {
  display: none;
}

/* Footer Styles */

.site-footer {
  background-color: var(--primary-blue);
  color: var(--card-bg);
  padding: 15px 20px;
  font-size: var(--font-size-base);
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 99;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.site-footer a,
.site-footer span {
  color: #ffffff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Mobile Responsiveness for Footer */
@media (max-width: 900px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
.site-footer {
    position: inherit;
    padding: 0;
}
}
