/* Update color variables */
:root {
  --icc-primary: #15bece;
  --icc-primary-text: #000;
  --icc-secondary: #a4ce4c;
  --icc-secondary-text: #00425d;
  --icc-light-bg: #f8f9fa;
  --icc-border: #e9ecef;
  --icc-border-dark: #dee2e6;
}

/* Fix for site navigation covering the calculator when scrolling */
.injury-cost-calculator-container {
  position: relative;
  z-index: 1;
}

/* Progress bar and navigation improvements */

/* Steps navigation */
.injury-cost-calculator-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--icc-border);
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.injury-cost-calculator-step {
  flex: 1;
  text-align: center;
  padding: 12px 15px;
  position: relative;
  cursor: pointer;
  font-size: 14px;
  color: var(--icc-secondary-text);
  white-space: nowrap;
  transition: color 0.3s;
}

.injury-cost-calculator-step.active {
  font-weight: 600;
  color: var(--icc-primary);
}

.injury-cost-calculator-step.completed {
  color: var(--icc-secondary);
}

.injury-cost-calculator-step:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: transparent;
  transition: background-color 0.3s;
}

.injury-cost-calculator-step.active:after {
  background-color: var(--icc-primary);
}

.injury-cost-calculator-step.completed:after {
  background-color: var(--icc-secondary);
}

/* Progress bar */
.injury-cost-calculator-progress {
  margin-bottom: 30px;
}

.injury-cost-calculator-progress-bar {
  height: 8px;
  background-color: var(--icc-border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.injury-cost-calculator-progress-bar-inner {
  height: 100%;
  background-color: var(--icc-primary);
  border-radius: 4px;
  transition: width 0.3s ease;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 40px 40px;
  animation: progress-bar-stripes 2s linear infinite;
}

@keyframes progress-bar-stripes {
  from {
    background-position: 40px 0;
  }
  to {
    background-position: 0 0;
  }
}

/* Navigation buttons */
.injury-cost-calculator-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.injury-cost-calculator-button {
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  text-align: center;
}

/* Fix for single navigation button (Next/Previous) alignment */
.injury-cost-calculator-navigation:has(
    .injury-cost-calculator-button:only-child
  ) {
  justify-content: flex-end;
}

.injury-cost-calculator-navigation .injury-cost-calculator-button:only-child {
  min-width: 150px;
}

/* Fix for the Previous/Next buttons that appear to be plain HTML */
button[type="button"] {
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  min-width: 150px;
  text-align: center;
}

button[type="button"]:first-child {
  background-color: var(--icc-light-bg);
  color: var(--icc-secondary-text);
  border: 1px solid var(--icc-border-dark);
}

button[type="button"]:first-child:hover {
  background-color: var(--icc-border);
}

button[type="button"]:last-child {
  background-color: var(--icc-primary);
  color: var(--icc-primary-text);
  border: none;
  margin-left: 10px;
}

button[type="button"]:last-child:hover {
  background-color: #12a8b7; /* Slightly darker primary */
}

/* When there's only one button (Next), ensure it's properly aligned */
.injury-cost-calculator-container
  > div
  > div:last-child:has(button:only-child) {
  display: flex;
  justify-content: flex-end;
}

.injury-cost-calculator-container > div > div:last-child button:only-child {
  min-width: 150px;
}

/* Cost Summary section improvements */
.injury-cost-calculator-container .summary-of-costs {
  width: 100%;
  overflow-x: hidden;
  padding: 0;
}

.injury-cost-calculator-container .summary-of-costs h2,
.injury-cost-calculator-container .summary-of-costs h3 {
  text-align: left;
  color: var(--icc-secondary-text);
  margin-bottom: 20px;
  margin-top: 30px;
}

.injury-cost-calculator-container .summary-of-costs h3:first-child {
  margin-top: 0;
  color: var(--icc-primary);
  font-size: 24px;
  text-align: left;
}

/* Cost Summary grid layout */
.injury-cost-calculator-cost-grid {
  display: grid;
  grid-template-columns: 70% 30%;
  width: 100%;
  margin-bottom: 30px;
  border-top: 1px solid #e9ecef;
}

.injury-cost-calculator-cost-grid-header {
  display: contents;
}

.injury-cost-calculator-cost-grid-header div {
  background-color: var(--icc-light-bg);
  color: var(--icc-secondary-text);
  border-bottom: 2px solid var(--icc-border-dark);
}

.injury-cost-calculator-cost-grid-header div:first-child {
  text-align: left;
}

.injury-cost-calculator-cost-grid-header div:last-child {
  text-align: right;
}

.injury-cost-calculator-cost-grid-row {
  display: contents;
}

.injury-cost-calculator-cost-grid-row div {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
}

.injury-cost-calculator-cost-grid-row div:first-child {
  color: var(--icc-primary);
  text-align: left;
}

.injury-cost-calculator-cost-grid-row div:last-child {
  text-align: right;
}

.injury-cost-calculator-cost-grid-row.subtotal-row div {
  font-weight: 600;
  border-top: 2px solid #dee2e6;
  border-bottom: none;
}

.injury-cost-calculator-cost-grid-row.subtotal-row div:first-child {
  color: var(--icc-secondary-text);
}

/* Cost Summary blue text styling */
.injury-cost-calculator-container .summary-of-costs .cost-summary-title {
  color: var(--icc-primary);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: left;
}

/* Step indicator improvements */
.injury-cost-calculator-container {
  position: relative;
}

/* Improve the step indicator list */
.injury-cost-calculator-container > div > div:nth-child(2) {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 0;
  list-style: none;
}

.injury-cost-calculator-container > div > div:nth-child(2) > div {
  padding: 8px 15px;
  margin-right: 5px;
  margin-bottom: 5px;
  background-color: var(--icc-light-bg);
  border-radius: 4px;
  font-size: 14px;
  color: var(--icc-secondary-text);
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.injury-cost-calculator-container > div > div:nth-child(2) > div:hover {
  background-color: var(--icc-border);
}

.injury-cost-calculator-container > div > div:nth-child(2) > div.active {
  background-color: var(--icc-primary);
  color: var(--icc-primary-text);
}

/* Specific fix for the Previous/Next buttons at the bottom */
.injury-cost-calculator-container > div > div:last-child {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.injury-cost-calculator-container > div > div:last-child button:first-child {
  background-color: var(--icc-light-bg);
  color: var(--icc-secondary-text);
  border: 1px solid var(--icc-border-dark);
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.injury-cost-calculator-container > div > div:last-child button:last-child {
  background-color: var(--icc-primary);
  color: var(--icc-primary-text);
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* Additional styling for the overall container */
.injury-cost-calculator-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.injury-cost-calculator-header {
  margin-bottom: 30px;
}

.injury-cost-calculator-header h2 {
  color: var(--icc-secondary-text);
  margin-bottom: 10px;
  font-size: 28px;
}

.injury-cost-calculator-header p {
  color: #6c757d;
  font-size: 16px;
  margin-bottom: 0;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .injury-cost-calculator-container {
    padding: 15px 10px;
  }

  .injury-cost-calculator-container table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .injury-cost-calculator-container table th,
  .injury-cost-calculator-container table td {
    white-space: normal;
    font-size: 13px;
    padding: 8px 6px;
  }

  .injury-cost-calculator-container table th:first-child,
  .injury-cost-calculator-container table td:first-child {
    min-width: 200px;
  }

  .injury-cost-calculator-container table th:nth-child(2),
  .injury-cost-calculator-container table td:nth-child(2),
  .injury-cost-calculator-container table th:nth-child(3),
  .injury-cost-calculator-container table td:nth-child(3) {
    min-width: 80px;
  }

  .injury-cost-calculator-container table th:nth-child(4),
  .injury-cost-calculator-container table td:nth-child(4) {
    min-width: 80px;
  }

  .injury-cost-calculator-container input[type="number"],
  .injury-cost-calculator-container input[type="text"] {
    padding: 6px 8px;
    font-size: 13px;
  }

  .injury-cost-calculator-container .summary-of-costs h3 {
    font-size: 20px;
  }

  .injury-cost-calculator-container .summary-of-costs h4 {
    font-size: 18px;
  }

  .injury-cost-calculator-container .summary-of-costs td,
  .injury-cost-calculator-container .summary-of-costs th {
    font-size: 13px;
    padding: 8px 10px;
  }

  .injury-cost-calculator-container .summary-of-costs tr:last-child td {
    font-size: 14px;
  }

  .injury-cost-calculator-container
    .summary-of-costs
    .injury-cost-calculator-summary-item
    span:first-child {
    font-size: 14px;
  }

  .injury-cost-calculator-container
    .summary-of-costs
    .injury-cost-calculator-summary-item
    span:last-child {
    font-size: 13px;
  }

  .injury-cost-calculator-container .print-report,
  .injury-cost-calculator-container button.print-report {
    padding: 10px 20px;
    font-size: 14px;
  }

  /* Fix for text wrapping in headings and paragraphs */
  .injury-cost-calculator-container h1,
  .injury-cost-calculator-container h2,
  .injury-cost-calculator-container h3,
  .injury-cost-calculator-container h4,
  .injury-cost-calculator-container p,
  .injury-cost-calculator-container label,
  .injury-cost-calculator-container li,
  .injury-cost-calculator-container [class$="-step"] > p:first-of-type,
  .injury-cost-calculator-container [class$="-costs"] > p:first-of-type,
  .injury-cost-calculator-container .summary-of-costs > p:first-of-type,
  .injury-cost-calculator-email-section h4,
  .injury-cost-calculator-email-section p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    -ms-word-break: break-all;
    word-break: break-word;
    hyphens: auto;
    text-wrap: wrap;
  }

  /* Adjust step navigation for mobile */
  .injury-cost-calculator-steps {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .injury-cost-calculator-step {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 12px;
    margin-bottom: 5px;
  }

  /* Improve form layout on mobile */
  .injury-cost-calculator-form-group {
    margin-bottom: 12px;
  }

  .injury-cost-calculator-form-group label {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .injury-cost-calculator-form-group input {
    padding: 8px;
    font-size: 14px;
  }

  /* Adjust button sizes for better touch targets */
  .injury-cost-calculator-button {
    min-height: 44px;
    padding: 10px 15px;
    font-size: 15px;
  }

  /* Improve email section spacing */
  .injury-cost-calculator-email-section {
    padding: 15px;
    margin: 20px 0;
  }

  /* Adjust navigation buttons for mobile */
  .injury-cost-calculator-navigation {
    flex-wrap: wrap;
    gap: 10px;
  }

  .injury-cost-calculator-navigation .injury-cost-calculator-button {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* Fix navigation buttons on mobile */
  .injury-cost-calculator-navigation {
    margin-top: 20px;
    padding-top: 15px;
  }

  .injury-cost-calculator-button,
  button[type="button"] {
    min-width: 120px;
    padding: 10px 15px;
  }

  /* Improve cost summary on mobile */
  .injury-cost-calculator-cost-grid {
    margin-bottom: 20px;
  }

  .injury-cost-calculator-cost-grid-header div,
  .injury-cost-calculator-cost-grid-row div {
    padding: 10px;
    font-size: 14px;
  }

  .injury-cost-calculator-container .summary-of-costs .cost-summary-title {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .injury-cost-calculator-container .summary-of-costs h3:first-child {
    font-size: 20px;
  }
}

/* Additional responsive improvements for very small screens */
@media (max-width: 480px) {
  .injury-cost-calculator-container {
    padding: 10px 8px;
  }

  .injury-cost-calculator-header h2 {
    font-size: 22px;
  }

  .injury-cost-calculator-header p {
    font-size: 14px;
  }

  .injury-cost-calculator-step {
    padding: 6px 8px;
    font-size: 11px;
  }

  .injury-cost-calculator-container [class$="-step"] > p:first-of-type,
  .injury-cost-calculator-container [class$="-costs"] > p:first-of-type {
    font-size: 16px;
    line-height: 1.4;
  }

  .injury-cost-calculator-container table th,
  .injury-cost-calculator-container table td {
    padding: 6px 4px;
    font-size: 12px;
  }

  /* Ensure buttons are properly sized on very small screens */
  .injury-cost-calculator-button {
    width: 100%;
    margin: 5px 0;
  }

  /* Adjust navigation for very small screens */
  .injury-cost-calculator-navigation {
    flex-direction: column;
    gap: 10px;
  }

  .injury-cost-calculator-navigation .injury-cost-calculator-button,
  .injury-cost-calculator-navigation button[type="button"] {
    width: 100%;
    margin: 5px 0;
    min-width: 0;
  }

  button[type="button"]:last-child {
    margin-left: 0;
  }

  /* Improve cost summary on very small screens */
  .injury-cost-calculator-cost-grid-header div,
  .injury-cost-calculator-cost-grid-row div {
    padding: 8px 6px;
    font-size: 12px;
  }

  .injury-cost-calculator-container .summary-of-costs .cost-summary-title {
    font-size: 16px;
  }

  .injury-cost-calculator-container .summary-of-costs h3:first-child {
    font-size: 18px;
  }
}

/* Fix for blue text headers that overflow */
.injury-cost-calculator-container [class$="-step"] > p:first-of-type,
.injury-cost-calculator-container [class$="-costs"] > p:first-of-type,
.injury-cost-calculator-container .summary-of-costs > p:first-of-type,
.injury-cost-calculator-email-section h4,
.injury-cost-calculator-email-section p {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  text-wrap: wrap;
  max-width: 100%;
}

/* Ensure all text elements wrap properly */
.injury-cost-calculator-container p,
.injury-cost-calculator-container label,
.injury-cost-calculator-container li,
.injury-cost-calculator-container span,
.injury-cost-calculator-container div,
.injury-cost-calculator-container h1,
.injury-cost-calculator-container h2,
.injury-cost-calculator-container h3,
.injury-cost-calculator-container h4 {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

/* Form styling improvements */
.introduction-step p,
.introduction-step label,
.introduction-step .description-help,
.introduction-step .description-prompts li {
  text-align: left;
  color: #2c3e50;
}

.introduction-step p {
  margin-bottom: 20px;
  font-size: 16px;
}

.introduction-step .form-group {
  margin-bottom: 24px;
}

.introduction-step label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 16px;
}

.introduction-step input[type="text"],
.introduction-step textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.2s;
  background-color: #fff;
  color: #2c3e50;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.introduction-step input[type="text"]:focus,
.introduction-step textarea:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

.introduction-step .description-help {
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #6c757d;
}

.introduction-step .description-prompts {
  margin-bottom: 12px;
  padding-left: 20px;
}

.introduction-step .description-prompts li {
  margin-bottom: 4px;
  font-size: 14px;
}

/* Table styling improvements */
.injury-cost-calculator-container table,
.injury-cost-calculator-container tbody,
.injury-cost-calculator-container tr,
.injury-cost-calculator-container td {
  text-align: left;
}

/* Cost tables styling */
.injury-cost-calculator-container [class$="-costs"] {
  width: 100%;
}

.injury-cost-calculator-container [class$="-costs"] p {
  text-align: left;
  margin-bottom: 20px;
  font-size: 16px;
  color: #2c3e50;
}

/* Activity and costs table layout */
.injury-cost-calculator-container [class$="-costs"] table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.injury-cost-calculator-container [class$="-costs"] th {
  text-align: left;
  padding: 10px;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #495057;
}

.injury-cost-calculator-container [class$="-costs"] td {
  padding: 10px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

/* Specific table layout fixes for cost steps */
.injury-cost-calculator-container .incident-costs-step table,
.injury-cost-calculator-container .investigation-costs-step table,
.injury-cost-calculator-container .damage-costs-step table,
.injury-cost-calculator-container .replacement-costs-step table,
.injury-cost-calculator-container .productivity-costs-step table {
  table-layout: fixed;
  width: 100%;
}

/* Column widths for better alignment */
.injury-cost-calculator-container
  [class$="-costs-step"]
  table
  .activity-column {
  width: 50%;
  text-align: left;
}

.injury-cost-calculator-container [class$="-costs-step"] table .time-column,
.injury-cost-calculator-container [class$="-costs-step"] table .wage-column {
  width: 20%;
}

.injury-cost-calculator-container [class$="-costs-step"] table .total-column {
  width: 10%;
  text-align: right;
}

/* Activity labels styling */
.injury-cost-calculator-container [class$="-costs-step"] .activity-label {
  font-weight: 500;
  color: #2c3e50;
  text-align: left;
  padding-left: 0;
}

/* Subtotal row styling */
.injury-cost-calculator-container [class$="-costs-step"] .subtotal-row td {
  font-weight: 600;
  border-top: 2px solid #dee2e6;
}

/* Input fields in tables */
.injury-cost-calculator-container [class$="-costs"] input[type="number"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.injury-cost-calculator-container [class$="-costs"] input[type="number"]:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

/* Cost display */
.injury-cost-calculator-container .total-cost {
  text-align: right;
  font-weight: 600;
  color: #2c3e50;
}

/* Summary page improvements */
.injury-cost-calculator-container .summary-of-costs {
  width: 100%;
  overflow-x: hidden;
}

.injury-cost-calculator-container .summary-of-costs h2,
.injury-cost-calculator-container .summary-of-costs h3 {
  text-align: left;
  color: #2c3e50;
  margin-bottom: 20px;
}

.injury-cost-calculator-container .summary-of-costs table {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 30px;
  border-collapse: collapse;
}

.injury-cost-calculator-container .summary-of-costs th {
  text-align: left;
  padding: 10px;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.injury-cost-calculator-container .summary-of-costs td {
  padding: 10px;
  border-bottom: 1px solid #e9ecef;
}

.injury-cost-calculator-container .summary-of-costs tr:last-child td {
  font-weight: 600;
  border-top: 2px solid #dee2e6;
}

.injury-cost-calculator-container .summary-of-costs p.disclaimer {
  text-align: left;
  margin: 30px 0;
  padding: 15px 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  font-size: 14px;
  color: #6c757d;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Specific fix for the disclaimer in the Summary component */
.injury-cost-calculator-disclaimer {
  margin: 30px 0;
  padding: 15px 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  width: 100%;
}

.injury-cost-calculator-disclaimer p {
  text-align: left;
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

/* Improved styling for the print button */
.injury-cost-calculator-container .print-report,
.injury-cost-calculator-container button.print-report {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--icc-primary);
  color: var(--icc-primary-text);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  margin: 0 auto;
  box-shadow: 0 2px 5px rgba(21, 190, 206, 0.3);
}

.injury-cost-calculator-container .print-report:hover,
.injury-cost-calculator-container button.print-report:hover {
  background-color: #12a8b7; /* Slightly darker primary */
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(21, 190, 206, 0.4);
}

/* Consistent styling for all input fields */
.injury-cost-calculator-container input[type="number"],
.injury-cost-calculator-container input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
  background-color: #fff;
  color: #2c3e50;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.injury-cost-calculator-container input[type="number"]:focus,
.injury-cost-calculator-container input[type="text"]:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

/* Make sure the table uses the fixed layout */
.injury-cost-calculator-container table {
  table-layout: fixed !important;
  width: 100% !important;
}

/* Ensure inputs don't overflow their cells */
.injury-cost-calculator-container table input[type="number"] {
  width: 95% !important;
  box-sizing: border-box !important;
}

/* Fix for the Summary table */
.injury-cost-calculator-container .summary-of-costs table th:first-child,
.injury-cost-calculator-container .summary-of-costs table td:first-child {
  width: 70% !important;
}

.injury-cost-calculator-container .summary-of-costs table th:last-child,
.injury-cost-calculator-container .summary-of-costs table td:last-child {
  width: 30% !important;
}

/* Fix for all steps to ensure left alignment and consistent styling */
.injury-cost-calculator-container [class$="-step"] p,
.injury-cost-calculator-container [class$="-step"] label,
.injury-cost-calculator-container [class$="-step"] li,
.injury-cost-calculator-container [class$="-step"] div,
.injury-cost-calculator-container [class$="-step"] h3,
.injury-cost-calculator-container [class$="-step"] h4,
.injury-cost-calculator-container [class$="-costs"] p,
.injury-cost-calculator-container [class$="-costs"] label,
.injury-cost-calculator-container [class$="-costs"] li,
.injury-cost-calculator-container [class$="-costs"] div,
.injury-cost-calculator-container [class$="-costs"] h3,
.injury-cost-calculator-container [class$="-costs"] h4,
.injury-cost-calculator-container .summary-of-costs p,
.injury-cost-calculator-container .summary-of-costs label,
.injury-cost-calculator-container .summary-of-costs li,
.injury-cost-calculator-container .summary-of-costs div,
.injury-cost-calculator-container .summary-of-costs h3,
.injury-cost-calculator-container .summary-of-costs h4 {
  text-align: left;
}

/* Improved table structure for all cost steps */
.injury-cost-calculator-container [class$="-costs-step"] table,
.injury-cost-calculator-container [class$="-costs"] table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 20px;
}

/* Consistent header styling for all steps */
.injury-cost-calculator-container [class$="-step"] > p:first-of-type,
.injury-cost-calculator-container [class$="-costs"] > p:first-of-type,
.injury-cost-calculator-container .summary-of-costs > p:first-of-type {
  font-size: 18px;
  font-weight: 500;
  color: var(--icc-primary);
  margin-bottom: 25px;
  margin-top: 10px;
}

/* Consistent styling for activity labels */
.injury-cost-calculator-container .activity-label,
.injury-cost-calculator-container [class$="-costs-step"] td:first-child,
.injury-cost-calculator-container [class$="-costs"] td:first-child {
  font-weight: 500;
  color: #2c3e50;
  text-align: left;
  padding-left: 0;
  padding-right: 10px;
  text-wrap: auto;
}

/* Better structure for bullet points and their content */
.injury-cost-calculator-container [class$="-costs-step"] li,
.injury-cost-calculator-container [class$="-costs"] li {
  margin-bottom: 15px;
  color: var(--icc-primary);
  font-weight: 500;
  font-size: 14px;
}

.injury-cost-calculator-container [class$="-costs-step"] li span,
.injury-cost-calculator-container [class$="-costs"] li span {
  color: var(--icc-secondary-text);
  font-weight: normal;
}

/* Fix for table layout in cost steps */
.injury-cost-calculator-container [class$="-costs-step"] table,
.injury-cost-calculator-container [class$="-costs"] table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 20px;
}

/* Fix for activity labels and descriptions */
.injury-cost-calculator-container [class$="-costs-step"] td.activity-label,
.injury-cost-calculator-container [class$="-costs"] td.activity-label {
  width: 66%;
  text-align: left;
  padding-left: 0;
  padding-right: 10px;
  font-size: 14px;
  line-height: 1.5;
  vertical-align: top;
  padding-top: 15px;
}

/* Ensure all text in tables has consistent size and doesn't overflow */
.injury-cost-calculator-container [class$="-costs-step"] td,
.injury-cost-calculator-container [class$="-costs"] td {
  padding: 10px 5px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.5;
}

/* Improve input field positioning */
.injury-cost-calculator-container [class$="-costs"] input[type="number"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
  margin-top: 5px;
}

/* Ensure table cells with inputs have proper spacing */
.injury-cost-calculator-container [class$="-costs-step"] td.input-cell,
.injury-cost-calculator-container [class$="-costs"] td.input-cell {
  padding-top: 15px;
}

/* Improve spacing for long text descriptions */
.injury-cost-calculator-container [class$="-costs-step"] .activity-description,
.injury-cost-calculator-container [class$="-costs"] .activity-description {
  font-size: 14px;
  color: #2c3e50;
  line-height: 1.5;
  margin-bottom: 10px;
  max-width: 100%;
  word-wrap: break-word;
  display: block;
  padding-right: 15px;
}

/* Specific improvements for the Summary step */
.injury-cost-calculator-container .summary-of-costs {
  width: 100%;
}

.injury-cost-calculator-container .summary-of-costs h2,
.injury-cost-calculator-container .summary-of-costs h3,
.injury-cost-calculator-container .summary-of-costs h4 {
  text-align: left;
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* Fix for the Summary headings */
.injury-cost-calculator-container .summary-of-costs h3 {
  font-size: 24px;
  color: var(--icc-primary);
  margin-top: 30px;
  margin-bottom: 20px;
  font-weight: 700;
}

.injury-cost-calculator-container .summary-of-costs h4 {
  font-size: 20px;
  margin-top: 25px;
  margin-bottom: 15px;
  color: var(--icc-secondary-text);
  font-weight: 600;
}

/* Fix for the Summary table */
.injury-cost-calculator-container .summary-of-costs table {
  width: 100%;
  max-width: 800px;
  margin: 0 0 30px 0;
  border-collapse: collapse;
}

.injury-cost-calculator-container .summary-of-costs th {
  text-align: left;
  padding: 12px 15px;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #495057;
  font-size: 16px;
  line-height: 1.5;
}

.injury-cost-calculator-container .summary-of-costs td {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
  text-align: left;
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.injury-cost-calculator-container .summary-of-costs tr:last-child td {
  font-weight: 700;
  border-top: 2px solid #dee2e6;
  font-size: 16px;
}

/* Fix for the Cost Summary section in Summary */
.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-cost-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-cost-table
  th,
.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-cost-table
  td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-cost-table
  th:first-child,
.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-cost-table
  td:first-child {
  width: 70%;
}

.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-cost-table
  th:last-child,
.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-cost-table
  td:last-child {
  width: 30%;
  text-align: right;
  font-weight: 600;
}

.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-cost-table
  tr:last-child
  td {
  font-weight: 700;
  border-top: 2px solid #dee2e6;
  font-size: 16px;
}

/* Fix for the Company Information and Injury Description sections in Summary */
.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-summary-section {
  margin-bottom: 25px;
  text-align: left;
}

.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-summary-item {
  margin-bottom: 15px;
  text-align: left;
  line-height: 1.5;
}

.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-summary-item
  span:first-child {
  font-weight: 600;
  margin-right: 10px;
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
  color: #495057;
}

.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-summary-item
  span:last-child {
  font-size: 15px;
  color: #2c3e50;
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Fix for the disclaimer text in Summary */
.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-disclaimer,
.injury-cost-calculator-disclaimer {
  margin: 30px 0;
  padding: 15px 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  width: 100%;
}

.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-disclaimer
  p,
.injury-cost-calculator-disclaimer p {
  text-align: left;
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.6;
}

/* Center align the print button container but keep text left-aligned */
.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-print-button {
  text-align: center;
  margin: 30px 0;
}

.injury-cost-calculator-container
  .summary-of-costs
  .injury-cost-calculator-print-button
  p {
  text-align: left;
  margin-bottom: 15px;
  font-size: 16px;
  color: #2c3e50;
  line-height: 1.5;
}

/* Force column widths with !important and add text wrapping */
.injury-cost-calculator-container table th:first-child,
.injury-cost-calculator-container table td:first-child {
  width: 66% !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

/* Email form styles */
.injury-cost-calculator-email-section {
  margin: 30px 0;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 5px;
  border-left: 4px solid var(--icc-primary);
}

.injury-cost-calculator-email-form {
  margin-top: 15px;
}

.injury-cost-calculator-form-group {
  margin-bottom: 15px;
}

.injury-cost-calculator-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.injury-cost-calculator-form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.injury-cost-calculator-button {
  background-color: var(--icc-primary);
  color: var(--icc-primary-text);
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.injury-cost-calculator-button:hover {
  background-color: #12a8b7; /* Slightly darker primary */
}

.injury-cost-calculator-button:disabled {
  background-color: #999;
  cursor: not-allowed;
}

.injury-cost-calculator-button.secondary {
  background-color: var(--icc-secondary);
  color: var(--icc-primary-text);
  border: none;
}

.injury-cost-calculator-button.secondary:hover {
  background-color: #93b943; /* Slightly darker secondary */
}

.injury-cost-calculator-message {
  margin-top: 15px;
  padding: 15px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

.injury-cost-calculator-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.injury-cost-calculator-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  font-weight: bold;
}

/* Print styles */
@media print {
  /* Hide all unnecessary elements */
  body * {
    visibility: hidden;
  }

  /* Only show the summary report */
  .injury-cost-calculator-summary-report,
  .injury-cost-calculator-summary-report * {
    visibility: visible;
  }

  /* Position the summary report at the top of the page */
  .injury-cost-calculator-summary-report {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 20px;
    margin: 0;
    background-color: white;
  }

  /* Hide elements we don't want in the print version */
  .injury-cost-calculator-email-section,
  .injury-cost-calculator-print-button,
  .injury-cost-calculator-navigation,
  .injury-cost-calculator-steps,
  .injury-cost-calculator-progress {
    display: none !important;
  }

  /* Style the table for better print layout */
  .injury-cost-calculator-cost-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
  }

  .injury-cost-calculator-cost-table th,
  .injury-cost-calculator-cost-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
  }

  .injury-cost-calculator-cost-table th {
    background-color: #f2f2f2;
  }

  /* Style the summary sections */
  .injury-cost-calculator-summary-section {
    margin-bottom: 20px;
  }

  /* Add page break control */
  .injury-cost-calculator-summary-section {
    page-break-inside: avoid;
  }

  /* Ensure text is black for better printing */
  .injury-cost-calculator-summary-report * {
    color: black !important;
  }

  /* Add a footer with page numbers */
  @page {
    margin: 0.5cm;
  }
}
