:root {
  --blue-main: #3a7be0;
  --blue-main-dark: #2356a8;
  --blue-main-light: #6eaaff;
  --blue-main-hover: #4d97ff;
  --blue-main-gradient: linear-gradient(135deg, #3a7be0, #2356a8);
  --blue-main-gradient-hover: linear-gradient(135deg, #6eaaff, #3a7be0);
  --blue-font: #b5d6ff;
  --blue-bg-light: #223a5e;
  --blue-bg-chat: #223a5e;
}

body {
  font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background: #1a1a1b; /* Slightly adjusted dark background */
  color: var(--blue-font); /* Light default text */
  /* Remove flex centering from body, apply to wrapper */
  /* display: flex; */
  /* justify-content: center; */
  /* align-items: center; */
  /* min-height: 100vh; */
}

/* New App Wrapper */
.app-wrapper {
  display: flex;
  flex-direction: column; /* Stack settings bar and chat container vertically */
  min-height: 100vh;
  width: 100%;
  /* Remove min-height if present, let .chat-container control height */
}

/* Remove sidebar styles */
.sidebar {
  display: none !important;
}

/* Settings bar at the top */
.settings-bar {
  display: flex;
  gap: 0.5em; /* Reduce gap between buttons */
  padding: 0.7em 1.2em 0.3em 1.2em; /* Reduce top/bottom padding */
  background: linear-gradient(to right, #23232a, #23232a 80%, #23232a 100%);
  border-bottom: 1px solid #383838;
  align-items: flex-start; /* Align buttons to the top */
  justify-content: flex-start;
  z-index: 10;
}

.settings-bar h1 {
  color: #ffffff;
  font-weight: 500;
  font-size: 1.5em;
  margin: 0 1.2em 0 0; /* Reduce right margin */
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  flex-shrink: 0;
  line-height: 1;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
}

.settings-btn {
  font-family: inherit;
  padding: 0.5em 0.9em; /* Smaller buttons */
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.92em;
  font-weight: 500;
  color: #c5c7ca;
  display: flex;
  align-items: center;
  gap: 0.7em;
  transition: color 0.2s, background-color 0.2s, transform 0.1s;
}

.settings-btn:hover {
  color: #ffffff;
  background-color: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.settings-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}


@media (max-width: 768px) {
  .settings-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3em;
    padding: 0.5em 0.5em 0.2em 0.5em; /* Reduce padding on mobile */
  }
}

h1 {
  color: #ffffff; /* White heading */
  font-weight: 500;
  margin: 0;
  font-size: 1.8em;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2); /* Subtle text shadow */
}

label {
  display: block;
  margin-bottom: 0.5em; /* Slightly more space */
  font-weight: 500;
  font-size: 0.9em;
  color: #b0b0b0; /* Lighter grey label */
}

/* Apply styles to select element as well */
input[type="text"], textarea, select {
  width: 100%;
  padding: 0.9em 1.1em; /* Slightly more padding */
  margin-top: 0;
  border-radius: 10px; /* Slightly more rounded */
  border: 1px solid #444; /* Darker border */
  font-size: 1em;
  box-sizing: border-box;
  background-color: #2a2a2a; /* Dark input background */
  color: #e0e0e0; /* Light input text */
  transition: border-color 0.2s ease, box-shadow 0.2s ease; /* Smooth transition */
  font-family: inherit; /* Ensure font consistency */
  appearance: none; /* Remove default system appearance */
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23b0b0b0" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'); /* Custom dropdown arrow */
  background-repeat: no-repeat;
  background-position: right 1.1em center;
  background-size: 1.2em;
  padding-right: 3em; /* Make space for the arrow */
  height: 3.5em; /* Explicit height for consistency */
  line-height: 1.5; /* Adjust line height */
}

/* Specific styles for date input */
input[type="date"].date-input {
  width: auto; /* Adjusted from 50% to auto or a fixed width if preferred */
  min-width: 150px; /* Ensure it has a minimum width */
  padding: 1em 1.2em; /* Increased padding */
  margin-top: 0;
  border-radius: 10px;
  border: 1px solid #444;
  font-size: 1em; /* Increased font size */
  box-sizing: border-box;
  background-color: #2a2a2a;
  color: #e0e0e0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  height: 2.4em; /* Increased height */
  line-height: 1.5;
  color-scheme: dark; /* Helps with browser-native date picker theme */
}

input[type="date"].date-input::-webkit-calendar-picker-indicator {
  filter: invert(0.8); /* Make the calendar icon lighter on dark background */
}

/* New styles for the date and age display container */
.date-age-container {
  display: flex;
  align-items: center; /* Vertically align items */
  gap: 1em; /* Space between date input and age display */
}

.date-input-container {
  flex-shrink: 0; /* Prevent date input from shrinking too much */
}

.age-display {
  font-size: 0.9em;
  color: #c0c0c0; /* Light grey for age text */
  padding: 0.5em;
  background-color: #2a2a2a; /* Match input background */
  border-radius: 8px;
  border: 1px solid #444;
  white-space: nowrap; /* Prevent text from wrapping */
  flex-shrink: 0;
}

/* Style for disabled option */
select option[disabled] {
    color: #888;
}

/* Style for options */
select option {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

textarea {
  resize: vertical;
  min-height: 45px; /* Slightly taller */
  line-height: 1.5; /* Better text spacing */
}

/* Apply focus styles to select */
input[type="text"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue-main-light);
  box-shadow: 0 0 0 2px rgba(58, 123, 224, 0.18);
}

/* General button styling (can apply to reset/instructions/modal buttons) */
/* Keep this for modal buttons, but sidebar buttons are styled separately now */
button {
  font-family: inherit;
  padding: 0.5em 1em;
  border-radius: 8px;
  border: 1px solid #444;
  background-color: #2a2a2a;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.loading {
  color: #ffffff; /* Change from blue to white for loading text */
  font-style: italic;
  display: flex;
  align-items: center;
  animation: pulse 1.5s infinite;
}

/* New loading spinner animation */
.loading:before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to {transform: rotate(360deg);}
}

@keyframes pulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 1em;
  border: 1px solid #444; /* Darker border */
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  border: 1px solid #444; /* Darker border */
  padding: 0.8em 1em;
  text-align: left;
  font-size: 0.95em;
}

th {
  background: #2a2a2a; /* Dark header background */
  font-weight: 500;
  color: #e0e0e0; /* Light header text */
}

td {
  background: #1e1e1e; /* Slightly lighter dark for cells */
  color: #d0d0d0; /* Slightly dimmer text in cells */
}

.error {
  color: #ff8a80; /* Lighter red for errors */
  margin-top: 1em;
  font-weight: 500;
}

.chat-container {
  flex-grow: 1;
  background: #1e1e1f; /* Slightly adjusted chat area background */
  padding: 1em 1.2em 1em 1.2em; /* Reduce padding */
  border-radius: 0; /* Remove radius if it's full height */
  box-shadow: none; /* Remove shadow if sidebar has it */
  display: flex;
  flex-direction: column;
  height: calc(100vh - 54px); /* Subtract top bar height (adjust as needed) */
  box-sizing: border-box;
  position: relative; /* Needed for modal positioning context if not full screen */
  overflow: hidden; /* Prevent content overflow issues */
  width: 100%;
}

/* Main content layout */
.main-content {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 54px); /* Subtract top bar height */
  width: 100%;
  position: relative;
}

.left-section {
  flex: 0 0 40%;       /* Use 40% of the width */
  min-width: 320px;    /* Increased minimum width for better usability */
  max-width: 600px;    /* Increased maximum width for larger screens */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #202024;
  border-right: none;
  padding: 1.2em 1.5em 1.2em 1.5em;
  justify-content: flex-start;
}

.right-section {
  flex: 1 1 60%;      /* Use 60% of the width */
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
  padding: 1.2em 1.5em 1.2em 1.5em;
  justify-content: flex-start;
  position: relative;
  color: #e0e0e0;
  border-left: 1px solid #333;
}

.section-title {
  font-size: 1.15em;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 1em 0;
  letter-spacing: 0.01em;
  padding-bottom: 0.2em;
  border-bottom: 1px solid #333;
}

.left-section .section-title {
  color: #ffffff;
  border-bottom: 1px solid #23232a;
}

.right-section .section-title {
  color: #ffffff;
  border-bottom: 1px solid #333;
}

/* Vaccine selection panel */
.vaccine-selection-panel {
  max-height: 400px;
  min-height: 200px;
  overflow-y: auto;
  overflow-x: hidden; /* Prevent horizontal scroll */
  padding: 0.5em;
  border: 1px solid #444;
  border-radius: 10px;
  background-color: #2a2a2a;
  width: 100%;
  box-sizing: border-box; /* Include padding in width calculation */
  flex: 1 1 auto;
  color: #e0e0e0;
}

.vaccine-selection-panel .vaccine-item {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Align items to the left instead of space-between */
  gap: 0.8em; /* Add consistent spacing between elements */
  margin-bottom: 0.7em;
  padding: 0.3em 0.5em;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap; /* Allow wrapping if needed */
}

.vaccine-selection-panel .vaccine-item:last-child {
  margin-bottom: 0;
}

.vaccine-selection-panel .vaccine-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 1em;
}

.vaccine-selection-panel .dose-select {
  width: auto;
  min-width: 100px;
  max-width: 120px;
  height: 2.5em;
  padding: 0.3em 2em 0.3em 0.8em;
  margin-left: 0.5em;
  flex: 0 0 auto;
}

/* Add visual indication for items where a dose is selected */
.vaccine-selection-panel .vaccine-item.selected {
  background-color: rgba(58, 123, 224, 0.15);
  border: 1px solid rgba(58, 123, 224, 0.3);
}

.vaccine-selection-panel .all-up-to-date-option {
  border-bottom: 1px solid #444;
  margin-bottom: 1em;
  padding-bottom: 0.7em;
}

.vaccine-selection-panel .all-up-to-date-option label {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  cursor: pointer;
  color: #e0e0e0;
}

.vaccine-selection-panel .all-up-to-date-option label input[type="checkbox"] {
  margin-right: 8px; /* Add space between checkbox and text */
}

/* Additional styles for vaccine item visibility */
.vaccine-selection-panel .vaccine-item,
.vaccine-selection-panel .vaccine-item label,
.vaccine-selection-panel .vaccine-item span,
.vaccine-selection-panel .vaccine-name {
  color: #e0e0e0 !important;
}

.vaccine-selection-panel input[type="checkbox"] {
  margin-right: 0.5em;
}

/* Ensure dose selects are visible */
.vaccine-selection-panel .dose-select {
  background-color: #333;
  color: #e0e0e0;
  border: 1px solid #555;
}

/* Force vaccine names to be visible */
.vaccine-selection-panel .vaccine-item .vaccine-name,
.vaccine-selection-panel .vaccine-item span.vaccine-name {
  color: #ffffff !important;
  font-weight: 500;
  background: none !important;
}

/* Make sure commercial names are visible too */
.vaccine-selection-panel .commercial-names-list .commercial-name {
  color: #b0b0b0 !important;
}

/* Ultimate override for vaccine panel text visibility */
#vaccine-selection-panel * {
  color: #e0e0e0 !important;
}

#vaccine-selection-panel .vaccine-name {
  color: #ffffff !important;
  font-size: 14px !important;
  display: inline-block !important;
  min-width: 100px !important;
}

#vaccine-selection-panel .all-up-to-date-option label {
  color: #e0e0e0 !important;
  font-size: 14px !important;
}

.header {
  display: flex;
  /* Adjust alignment if only title remains */
  justify-content: flex-start; /* Or center */
  align-items: center;
  margin-bottom: 1em; /* Keep this */
  padding-bottom: 1em; /* Keep this */
  border-bottom: 1px solid #383838; /* Slightly lighter border */
  flex-shrink: 0; /* Prevent header from shrinking */
}

/* Remove header-buttons styles */
/* .header-buttons { ... } */

.description {
  font-size: 0.95em;
  color: #a0a0a0; /* Lighter secondary text */
  margin-bottom: 1.5em;
  flex-shrink: 0; /* Prevent description from shrinking */
}

.child-info-form {
  flex-direction: column;
  gap: 1em;
  margin-bottom: 1.5em;
  align-items: stretch;
}

#initial-form {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  flex: 1 1 auto;
}

#initial-send-btn {
  align-self: flex-end;
  margin-top: 1em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  background: linear-gradient(135deg, #3ecf8e, #2eb872);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1em;
  font-weight: 500;
  padding: 0;
  box-shadow: 0 1px 3px rgba(46, 184, 114, 0.15);
  transition: background 0.2s, transform 0.1s;
  cursor: pointer;
  justify-content: center;
}

#initial-send-btn:hover {
  background: linear-gradient(135deg, #43e697, #38c47c);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
}

#initial-send-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.form-group {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5em;
  width: 100%;
}

.age-group {
  width: 100%;
}

.date-age-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.vaccine-selection-panel .vaccine-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7em;
  padding: 0.3em 0.5em;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.vaccine-selection-panel .vaccine-item:last-child {
  margin-bottom: 0;
}

.vaccine-selection-panel .vaccine-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 1em;
}

.vaccine-selection-panel .dose-select {
  width: auto;
  min-width: 100px;
  max-width: 120px;
  height: 2.5em;
  padding: 0.3em 2em 0.3em 0.8em;
  margin-left: 0.5em;
  flex: 0 0 auto;
}

.vaccine-selection-panel .vaccine-item.selected {
  background-color: rgba(58, 123, 224, 0.15);
  border: 1px solid rgba(58, 123, 224, 0.3);
}

.vaccine-selection-panel .all-up-to-date-option {
  border-bottom: 1px solid #444;
  margin-bottom: 1em;
}

/* Commercial vaccine display styles */
.vaccine-item.commercial-mode .vaccine-name {
  font-size: 0.85em;
  font-style: italic;
  font-weight: 500;
  margin-bottom: 0.3em;
}

.vaccine-item .commercial-names-list {
  display: none;
  margin-top: 0.3em;
  padding-left: 1em;
  font-size: 0.8em;
  color: #b0b0b0;
  border-left: 2px solid #444;
  padding-left: 0.8em;
  margin-left: 0.2em;
}

.vaccine-item.commercial-mode .commercial-names-list {
  display: block;
}

.commercial-names-list .commercial-name {
  display: block;
  margin-bottom: 0.2em;
}

.commercial-names-list .commercial-name:before {
  content: "• ";
  color: #3c6ed1;
}

.vaccine-item.commercial-mode {
  padding: 0.8em 0;
  border-left: 3px solid #3c6ed1;
  padding-left: 0.8em;
  margin-left: -0.8em;
  background-color: rgba(60, 110, 209, 0.05);
}

.vaccine-item.commercial-mode.selected {
  background-color: rgba(60, 110, 209, 0.1);
}

/* Wizard Styles */
.wizard-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: calc(100vh - 120px);
}

.wizard-header {
  flex-shrink: 0;
  margin-bottom: 2em;
}

.wizard-title {
  font-size: 1.15em;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 1em 0;
  text-align: left;
  letter-spacing: 0.01em;
  padding-bottom: 0.2em;
  border-bottom: 1px solid #23232a;
}

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1em;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  min-width: 80px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #3a3a3a;
  color: #b0b0b0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.step-indicator.active .step-number {
  background-color: var(--blue-main);
  color: white;
}

.step-indicator.completed .step-number {
  background-color: #2eb872;
  color: white;
}

.step-label {
  font-size: 0.8em;
  text-align: center;
  color: #b0b0b0;
  font-weight: 400;
}

.step-indicator.active .step-label {
  color: var(--blue-main);
  font-weight: 500;
}

.step-indicator.completed .step-label {
  color: #2eb872;
  font-weight: 500;
}

.step-connector {
  flex: 1;
  height: 2px;
  background-color: #ddd;
  margin: 0 1em;
  position: relative;
  top: -8px;
}

.step-connector.completed {
  background-color: #2eb872;
}

.wizard-form {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wizard-step {
  display: none;
  flex: 1 1 auto;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.wizard-step.active {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.step-content {
  flex: 1 1 auto;
  padding: 1.5em 0;
  overflow-y: auto;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: 1.3em;
  font-weight: 500;
  color: var(--blue-main);
  margin-bottom: 0.5em;
  width: 100%;
}

.step-description {
  color: #666;
  margin-bottom: 1.5em;
  font-size: 0.95em;
  line-height: 1.4;
  width: 100%;
}

.selected-vaccines-summary {
  background-color: rgba(58, 123, 224, 0.05);
  border-left: 3px solid var(--blue-main);
  padding: 1em;
  margin-bottom: 1.5em;
  border-radius: 0 6px 6px 0;
  width: 100%;
  box-sizing: border-box;
}

.selected-vaccines-summary h4 {
  margin: 0 0 0.8em 0;
  color: var(--blue-main);
  font-size: 1em;
  font-weight: 500;
}

.vaccine-selection-section {
  margin-top: 1em;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.review-section {
  background-color: #2a2a2a;
  border-radius: 8px;
  padding: 1.5em;
  border: 1px solid #444;
  width: 100%;
  flex: 1 1 auto;
  box-sizing: border-box;
}

.review-item {
  margin-bottom: 1.5em;
  width: 100%;
}

.review-item:last-child {
  margin-bottom: 0;
}

.review-item h4 {
  margin: 0 0 0.5em 0;
  color: var(--blue-main);
  font-size: 1em;
  font-weight: 500;
  width: 100%;
}

.review-value {
  color: #e0e0e0;
  padding: 0.5em;
  background-color: #1a1a1a;
  border-radius: 4px;
  border: 1px solid #444;
  min-height: 1.2em;
  width: 100%;
  box-sizing: border-box;
}

.wizard-navigation {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5em 0 0 0;
  border-top: 1px solid #444;
  margin-top: 1em;
}

.wizard-btn {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8em 1.5em;
  border: none;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  justify-content: center;
}

.wizard-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wizard-btn-primary {
  background-color: var(--blue-main);
  color: white;
}

.wizard-btn-primary:hover:not(:disabled) {
  background-color: var(--blue-main-dark);
  transform: translateY(-1px);
}

.wizard-btn-secondary {
  background-color: #2a2a2a;
  color: #e0e0e0;
  border: 1px solid #444;
}

.wizard-btn-secondary:hover:not(:disabled) {
  background-color: #3a3a3a;
  color: #ffffff;
}

.wizard-btn-success {
  background: linear-gradient(135deg, #3ecf8e, #2eb872);
  color: white;
}

.wizard-btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #43e697, #38c47c);
  transform: translateY(-1px);
}

.wizard-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Responsive wizard styles */
@media (max-width: 768px) {
  .wizard-progress {
    padding: 0 0.5em;
  }
  
  .step-indicator {
    min-width: 60px;
  }
  
  .step-number {
    width: 28px;
    height: 28px;
    font-size: 0.8em;
  }
  
  .step-label {
    font-size: 0.7em;
  }
  
  .step-connector {
    margin: 0 0.5em;
  }
  
  .wizard-btn {
    padding: 0.6em 1em;
    font-size: 0.8em;
    min-width: 100px;
  }
  
  .wizard-navigation {
    flex-direction: column;
    gap: 1em;
  }
  
  .wizard-navigation .wizard-btn {
    width: 100%;
  }
}

/* Responsive layout for mobile devices */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 54px);
  }
  
  .left-section {
    flex: none;
    width: 100%;
    min-width: auto;
    max-width: none;
    height: auto;
    min-height: 50vh;
  }
  
  .right-section {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 50vh;
  }
}

/* Additional wizard full-width styles */
.wizard-step .form-group {
  width: 100%;
  box-sizing: border-box;
}

.wizard-step input,
.wizard-step select,
.wizard-step textarea {
  width: 100%;
  box-sizing: border-box;
}

.date-input-container {
  width: 100%;
}

.date-input {
  width: 100%;
  box-sizing: border-box;
}

.age-display {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5em;
  background-color: #2a2a2a;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 4px;
  margin-top: 0.5em;
}

.vaccine-selection-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}

.vaccine-display-toggle {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* Use media query for larger screens */
@media (min-width: 768px) { /* Adjusted breakpoint for better layout */
  .child-info-form {
    flex-direction: row; /* Side-by-side on larger screens */
    gap: 1.5em;
    align-items: flex-end; /* Align items to the bottom */
  }
  .age-group {
      flex: 1 1 30%; /* Adjust flex basis for age */
  }
  .vaccine-group {
      flex: 1 1 70%; /* Adjust flex basis for vaccines */
      /* Remove default flex alignment if needed */
      /* align-self: auto; */
  }
}

.form-group {
  flex: 1;
  /* Add min-width for better wrapping behavior if needed */
  min-width: 150px;
  display: flex; /* Use flexbox for label + input alignment */
  flex-direction: column; /* Stack label above input */
  margin-bottom: 0.5em; /* Reduce bottom margin */
}

.chat-history {
  flex: 1 1 auto; /* Keep this */
  overflow-y: auto;
  margin-bottom: 1.5em;
  padding-right: 10px;
  /* Remove height adjustments if flex handles it */
}

/* Style scrollbar for dark theme */
.chat-history::-webkit-scrollbar {
  width: 8px;
}
.chat-history::-webkit-scrollbar-track {
  background: #2a2a2a; /* Dark track */
  border-radius: 4px;
}
.chat-history::-webkit-scrollbar-thumb {
  background: var(--blue-main-dark);
  border-radius: 4px;
}
.chat-history::-webkit-scrollbar-thumb:hover {
  background: var(--blue-main);
}

.chat-message {
  margin-bottom: 1.5em;
  display: flex;
}

.chat-message.user { /* Ensure user messages align to the right */
  justify-content: flex-end;
}

.chat-message.assistant { /* Ensure assistant messages align to the left */
  justify-content: flex-start;
}

/* Chat bubble general styles - keep for user messages only */
.chat-bubble {
  max-width: 80%;
  padding: 0.8em 1.2em;
  border-radius: 18px;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15); /* Add subtle shadow to bubbles */
}

/* User chat bubble (keep the bubble style) */
.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, var(--blue-main), var(--blue-main-dark));
  color: #e3f2fd; /* Light blue text */
  border-bottom-right-radius: 4px; /* Tail on the right */
}

/* Assistant message - make text white for better contrast */
.chat-message.assistant .chat-bubble {
  background: #2a2a2a !important;
  color: #e0e0e0;
  border-bottom-left-radius: 0;
  box-shadow: none;
  padding: 1em;
  border: 1px solid #333;
  border-radius: 8px;
  max-width: 95%; /* Allow more width for assistant messages */
}

/* Style for the plan-answer is already set to have no background, so we can keep it as is */
.chat-message.assistant.plan-answer .chat-bubble {
  background: #2a2a2a !important;
  border-bottom-left-radius: 8px;
  box-shadow: none;
  padding: 1em;
  border: 1px solid #333;
}

/* Remove background from the parent message div as well */
.chat-message.assistant {
  background: none !important;
}

/* Markdown elements in assistant messages - adjust strong color if needed */
.chat-message.assistant .chat-bubble p { margin: 0 0 0.8em 0; line-height: 1.5; }
.chat-message.assistant .chat-bubble p:last-child { margin-bottom: 0; }
.chat-message.assistant .chat-bubble ul, 
.chat-message.assistant .chat-bubble ol { margin: 0.8em 0 0.8em 1.5em; padding-left: 0.5em; }
.chat-message.assistant .chat-bubble li { margin-bottom: 0.4em; line-height: 1.5; }
.chat-message.assistant .chat-bubble strong { font-weight: 500; color: #ffffff; }

/* Tables need borders even without bubble background */
.chat-message.assistant .chat-bubble table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
  background-color: rgba(30, 30, 35, 0.3); /* Very subtle background for tables */
}

.chat-message.assistant .chat-bubble th {
  background-color: #444;
  color: #f0f0f0;
  font-weight: 600;
  border: 1px solid #555;
  padding: 0.7em 0.8em;
}

.chat-message.assistant .chat-bubble td {
  background-color: #333;
  color: #e0e0e0;
  border: 1px solid #555;
  padding: 0.7em 0.8em;
}

/* Markdown elements in dark theme */
.chat-bubble p { margin: 0 0 0.8em 0; line-height: 1.5; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-bubble ul, .chat-bubble ol { margin: 0.8em 0 0.8em 1.5em; padding-left: 0.5em; }
.chat-bubble li { margin-bottom: 0.4em; line-height: 1.5; }
.chat-bubble strong { font-weight: 500; color: #ffffff; } /* Brighter bold */
.chat-bubble code {
  background-color: #444; /* Darker code background */
  color: #c5c8c6; /* Light code text */
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.9em;
}
.chat-bubble pre {
  background-color: #2a2a2a; /* Dark pre background */
  color: #c5c8c6; /* Light pre text */
  padding: 1em;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9em;
  border: 1px solid #444;
}
.chat-bubble pre code {
  background-color: transparent;
  padding: 0;
  border: none;
}
.chat-bubble table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
}
.chat-bubble th, .chat-bubble td {
  border: 1px solid #555;
  padding: 0.7em 0.8em;
  text-align: left;
  font-size: 0.93em;
  line-height: 1.4;
}
.chat-bubble th {
  background-color: #444;
  color: #f0f0f0;
  font-weight: 600;
}
.chat-bubble td {
  background-color: #333;
  color: #e0e0e0;
}
.chat-bubble h1, .chat-bubble h2, .chat-bubble h3, 
.chat-bubble h4, .chat-bubble h5, .chat-bubble h6 {
  margin: 1.2em 0 0.7em 0;
  line-height: 1.3;
}
.chat-bubble h1:first-child, .chat-bubble h2:first-child, 
.chat-bubble h3:first-child, .chat-bubble h4:first-child {
  margin-top: 0.4em;
}

.chat-input-row {
  display: flex;
  gap: 0.8em;
  align-items: center;
  padding: 0.6em;
  border: 1px solid #333;
  border-radius: 28px;
  background-color: #2a2a2a;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.chat-input { /* Input field within the row */
  flex: 1 1 auto;
  padding: 0.8em 1em;
  border-radius: 0;
  border: none;
  background-color: transparent;
  font-size: 1em;
  margin: 0;
  outline: none;
  color: #e0e0e0;
}

.chat-input::placeholder { /* Style placeholder */
    color: #888;
}

.chat-send-btn {
  background: linear-gradient(135deg, #6a95ff, #6289ff); /* Gradient for send button */
  color: #121212; /* Dark icon for contrast */
  border: none;
  border-radius: 50%;
  padding: 0;
  width: 44px; /* Slightly larger */
  height: 44px; /* Slightly larger */
  font-size: 1em;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.chat-send-btn:hover {
  background: linear-gradient(135deg, #7ca5ff, #7095ff); /* Brighter gradient on hover */
  transform: scale(1.05); /* Slight scale effect */
}

.chat-send-btn:disabled {
  background: #444; /* Dark grey disabled */
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.chat-send-btn svg {
  fill: #1e1e1e; /* Dark icon */
  width: 22px; /* Adjust icon size */
  height: 22px;
}

.chat-send-btn:disabled svg {
  fill: #888; /* Dimmer icon when disabled */
}

/* Remove specific styles for buttons now in sidebar */
/* .reset-btn { ... } */
/* .instructions-btn { ... } */
/* .files-btn { ... } */

/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
  padding-top: 60px; /* Location of the box */
}

.modal-content {
  background-color: #2e2e30; /* Slightly adjusted modal background */
  color: #e0e0e0;
  margin: 5% auto; /* 5% from the top and centered */
  padding: 25px;
  border: 1px solid #5a5a5a; /* Slightly lighter border */
  border-radius: 12px;
  width: 80%; /* Could be more or less, depending on screen size */
  max-width: 600px; /* Maximum width */
  position: relative;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5); /* Enhanced modal shadow */
  display: flex; /* Use flexbox for layout */
  flex-direction: column; /* Stack content vertically */
}

.modal-content.large { /* Style for wider modals */
    max-width: 800px;
    width: 90%;
}

.modal-close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  color: #fff;
  text-decoration: none;
}

.modal h2 {
  margin-top: 0;
  color: #ffffff;
  border-bottom: 1px solid #444;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

.modal p {
  color: #b0b0b0;
  font-size: 0.95em;
  margin-bottom: 1em;
}

.modal textarea { /* Style textarea within modal */
  width: 100%;
  padding: 0.8em 1em;
  margin-bottom: 1.5em;
  border-radius: 8px;
  border: 1px solid #444;
  background-color: #1e1e1e; /* Slightly darker than modal bg */
  color: #e0e0e0;
  font-size: 0.95em;
  min-height: 150px;
  box-sizing: border-box;
}

.modal textarea:focus {
  border-color: #6289ff;
  box-shadow: 0 0 0 2px rgba(98, 137, 255, 0.3);
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1em;
  margin-top: 1em;
}

.modal-save-btn {
  background-color: var(--blue-main); /* Blue save button */
  color: #121212;
  border-color: var(--blue-main-dark);
}

.modal-save-btn:hover {
  background-color: var(--blue-main-hover);
  border-color: var(--blue-main-light);
}

.modal-cancel-btn {
  background-color: #444; /* Grey cancel button */
  color: #e0e0e0;
  border-color: #555;
}

.modal-cancel-btn:hover {
  background-color: #555;
  border-color: #666;
}

.modal-status {
    margin-top: 1em;
    font-size: 0.9em;
    min-height: 1.2em; /* Reserve space */
    text-align: right;
    color: #8ab4f8; /* Default status color */
}

.modal-status.error {
    color: #ff8a80; /* Error status color */
}

/* Files Modal Specific Styles */
.file-list-container {
    margin-bottom: 1.5em;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1em;
    background-color: #1e1e1e; /* Slightly darker background for list area */
    max-height: 300px; /* Limit height and make scrollable */
    overflow-y: auto;
}

.file-list-container h3 {
    margin-top: 0;
    margin-bottom: 0.8em;
    color: #e0e0e0;
    font-size: 1.1em;
}

#file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6em 0.8em;
    border-bottom: 1px solid #333;
    font-size: 0.95em;
}

#file-list li:last-child {
    border-bottom: none;
}

#file-list span { /* Filename */
    flex-grow: 1;
    margin-right: 1em;
    word-break: break-all; /* Prevent long filenames from overflowing */
}

#file-list .file-actions button {
    margin-left: 0.5em;
    padding: 0.3em 0.8em;
    font-size: 0.85em;
}

.file-actions .view-edit-btn {
    background-color: #4a4a4a;
    color: #e0e0e0;
    border-color: #555;
}
.file-actions .view-edit-btn:hover {
    background-color: #5a5a5a;
}

.file-actions .delete-btn {
    background-color: #7d3c3c; /* Dark red */
    color: #f0d0d0;
    border-color: #8d4c4c;
}
.file-actions .delete-btn:hover {
    background-color: #9d4c4c;
}

.upload-section {
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid #333;
}

.upload-section h3 {
    margin-top: 0;
    margin-bottom: 0.8em;
    color: #e0e0e0;
    font-size: 1.1em;
}

#file-upload-input {
    display: block;
    margin-bottom: 1em;
    color: #b0b0b0; /* Style file input text */
}

/* Style file input button */
#file-upload-input::file-selector-button {
    font-family: inherit;
    padding: 0.5em 1em;
    border-radius: 8px;
    border: 1px solid #444;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    background: #303134;
    color: #bdc1c6;
    margin-right: 1em;
}

#file-upload-input::file-selector-button:hover {
    background: #3c4043;
    border-color: #555;
}

.modal-action-btn { /* General style for action buttons like Upload */
    background-color: var(--blue-main);
    color: #121212;
    border-color: var(--blue-main-dark);
}
.modal-action-btn:hover {
    background-color: var(--blue-main-hover);
    border-color: var(--blue-main-light);
}

/* File Editor Modal Styles */
#file-editor-title {
    margin-top: 0;
    color: #ffffff;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}

#file-editor-textarea {
    width: 100%;
    padding: 0.8em 1em;
    margin-bottom: 1.5em;
    border-radius: 8px;
    border: 1px solid #444;
    background-color: #1e1e1e;
    color: #e0e0e0;
    font-size: 0.95em;
    min-height: 300px; /* Taller editor */
    box-sizing: border-box;
    font-family: monospace; /* Use monospace for editing */
}

#file-editor-textarea:focus {
    border-color: #6289ff;
    box-shadow: 0 0 0 2px rgba(98, 137, 255, 0.3);
}

/* Ensure button base styles are defined if needed elsewhere */
button {
  /* Basic button reset if needed */
  font-family: inherit;
}


/* New styles for age selection */
.age-group label {
  margin-bottom: 0.5em; /* Consistent spacing */
}

.age-selects {
  display: flex;
  gap: 0.8em; /* Space between year and month dropdowns */
}

.age-selects select {
  flex: 1; /* Make dropdowns share space */
  min-width: 80px; /* Ensure dropdowns don't get too small */
}

/* Adjust padding for select with arrow */
select {
  /* ... existing select styles ... */
  padding: 0.9em 3em 0.9em 1.1em; /* Ensure right padding accommodates arrow */
}

/* New styles for vaccine selection */
.vaccine-group { /* Adjust vaccine group layout */
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.vaccine-group label {
  margin-bottom: 0.3em;
}

#previous-vaccines-list {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  margin-bottom: 0; /* Ensure space between list and button */
  width: 100%;
  min-height: 60px;
  padding: 0.8em;
  border: 1px solid #444;
  border-radius: 6px;
  background-color: #2a2a2a;
  box-sizing: border-box;
}

#previous-vaccines-list .no-selection {
  color: #b0b0b0;
  font-style: italic;
  text-align: center;
  padding: 1em;
}

.vaccine-entry {
  display: flex;
  gap: 0.5em;
  align-items: center;
  padding: 0.5em;
  background-color: rgba(58, 123, 224, 0.1);
  border-radius: 4px;
  margin-bottom: 0.5em;
  color: #e0e0e0;
}

.vaccine-entry {
  display: flex;
  gap: 0.5em;
  align-items: center; /* Vertically center items in the row */
  padding: 0.2em 0.1em;
  font-size: 0.97em;
}

.vaccine-entry select {
  flex: 1; /* Allow dropdowns to grow */
  height: 3.5em; /* Ensure consistent height */
}

.vaccine-entry .vaccine-select {
  min-width: 200px; /* Give more space to vaccine name */
}

.vaccine-entry .dose-select {
  min-width: 80px;
}

.remove-vaccine-btn {
  background-color: #7d3c3c; /* Dark red */
  color: #f0d0d0;
  border-color: #8d4c4c;
  padding: 0.4em 0.8em; /* Slightly smaller padding */
  font-size: 0.85em;
  flex-shrink: 0; /* Prevent button from shrinking */
}
.remove-vaccine-btn:hover {
    background-color: #9d4c4c;
}

.add-btn { /* Style for Add Vaccine button (now opens modal) */
  /* Match select styles */
  background-color: #2a2a2a; /* Match select background */
  color: #e0e0e0; /* Match select text color */
  border: 1px solid #444; /* Match select border */
  border-radius: 10px; /* Match select border-radius */
  padding: 0 0.9em; /* Match horizontal padding of select */
  font-size: 0.97em; /* Match select font-size */
  cursor: pointer;
  font-weight: 500; /* Keep button font-weight */
  transition: background-color 0.2s ease, border-color 0.2s ease;
  display: inline-block; /* Make it fit content width */
  height: 2.6em; /* Match height of selects */
  line-height: 2.6em; /* Vertically center text using line-height */
  text-align: center; /* Center text horizontally */
  margin-top: 0; /* Keep or adjust as needed */
  /* Remove align-self: flex-start; */
  white-space: nowrap; /* Prevent text wrapping */
}

.add-btn:hover {
  background: #3c4043; /* Slightly lighter grey on hover */
  border-color: #555; /* Slightly lighter border on hover */
  color: #ffffff; /* Slightly brighter text on hover */
}

/* Add Vaccine Modal Styles */
#add-vaccine-modal .modal-content {
    max-width: 500px; /* Adjust width as needed */
}

.add-vaccine-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin-bottom: 1.5em;
}

.add-vaccine-form .form-group {
    flex: 1;
    min-width: 0; /* Override previous min-width if needed */
}

/* New styles for medical conditions container */
#medical-conditions-container {
  max-height: 250px;
  min-height: 150px;
  overflow-y: auto;
  padding: 0.8em;
  border: 1px solid #444;
  border-radius: 8px;
  background-color: #2a2a2a; /* Match other input backgrounds */
  margin-top: 0.3em; /* Align with other inputs */
  display: block; /* Changed from flex to block for proper vertical stacking */
  width: 100%;
  flex: 1 1 auto;
  box-sizing: border-box;
}

#medical-conditions-container label {
  display: flex; /* I want the to be inline */
  justify-content: space-between; /* Space between checkbox and label */
  width: 100%; /* Full width for label */
  padding: 0.5em 0.8em; /* Padding for each item */
  align-items: center;
  margin-bottom: 0.6em; /* Space between items */
  font-size: 0.95em;
  color: #e0e0e0; /* Light text */
  cursor: pointer;
}

#medical-conditions-container input[type="checkbox"] {
  margin-right: 0.7em;
  /* Optional: Style checkbox appearance if desired, though browser defaults are often fine */
  width: 16px;
  height: 16px;
  accent-color: var(--blue-main); /* Color the checkbox when checked */
}
/* New styles for vaccine display toggle */
.vaccine-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}

.vaccine-display-toggle {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #e0e0e0;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #3c6ed1;
}

input:focus + .slider {
  box-shadow: 0 0 1px #3c6ed1;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

.toggle-label {
  font-size: 0.9em;
  color: #e0e0e0;
  font-weight: 500;
}

/* New styles for commercial vaccine names display */
.vaccine-item.commercial-mode .vaccine-name {
  font-size: 0.85em;
  font-style: italic;
}

.vaccine-item .commercial-names-list {
  display: none;
  margin-top: 0.3em;
  padding-left: 1em;
  font-size: 0.8em;
  color: #b0b0b0;
}

.vaccine-item.commercial-mode .commercial-names-list {
  display: block;
}

.commercial-names-list .commercial-name {
  display: block;
  margin-bottom: 0.2em;
}

.commercial-names-list .commercial-name:before {
  content: "• ";
  color: #3c6ed1;
}

/* Additional styles for better commercial names visibility */
.vaccine-item.commercial-mode .vaccine-name {
  font-weight: 500;
  margin-bottom: 0.3em;
}

.vaccine-item.commercial-mode {
  padding: 0.8em 0;
  border-left: 3px solid #3c6ed1;
  padding-left: 0.8em;
  margin-left: -0.8em;
  background-color: rgba(60, 110, 209, 0.05);
}

.commercial-names-list {
  border-left: 2px solid #444;
  padding-left: 0.8em;
  margin-left: 0.2em;
}

.vaccine-item.commercial-mode.selected {
  background-color: rgba(60, 110, 209, 0.1);
  border-left-color: #5a8bff;
}

/* Safari-specific fixes */
@supports (-webkit-appearance: none) {
  .vaccine-selection-panel .vaccine-item {
    display: flex !important;
    -webkit-flex-direction: row !important;
    flex-direction: row !important;
    -webkit-align-items: center !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .vaccine-selection-panel .vaccine-name {
    display: inline-block !important;
    visibility: visible !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }
  
  /* Force Safari to show form elements */
  .vaccine-selection-panel input[type="checkbox"] {
    display: inline-block !important;
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .vaccine-selection-panel select {
    display: inline-block !important;
    -webkit-appearance: menulist !important;
    appearance: menulist !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Fix horizontal overflow in vaccine selection */
.vaccine-selection-panel .vaccine-item {
  justify-content: flex-start !important;
  gap: 0.8em !important;
  flex-wrap: nowrap !important; /* Keep everything on one line */
  width: 100% !important;
  box-sizing: border-box !important;
  align-items: center !important; /* Ensure vertical alignment */
}

.vaccine-selection-panel .vaccine-name {
  flex: 1 1 auto !important;
  white-space: nowrap !important; /* Keep name on one line */
  word-wrap: normal !important;
  max-width: none !important; /* Remove width restriction */
  overflow: hidden !important;
  text-overflow: ellipsis !important; /* Show ... if text is too long */
  padding-right: 0.5em !important;
}

.vaccine-selection-panel .dose-select {
  flex: 0 0 auto !important;
  max-width: 120px !important;
  min-width: 80px !important;
}

.vaccine-selection-panel input[type="checkbox"] {
  flex: 0 0 auto !important;
  margin: 0 !important;
  width: auto !important;
  height: auto !important;
}

/* Ensure commercial names don't break the layout */
.vaccine-selection-panel .commercial-names-list {
  display: none !important; /* Hide by default to keep single line */
}

.vaccine-selection-panel .vaccine-item.commercial-mode .commercial-names-list {
  display: block !important;
  flex: 0 0 auto !important;
  max-width: 200px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

/* === THINKING STEPS PROCESSING WIDGET === */
.thinking-steps {
  background: var(--blue-bg-chat);
  border: 1px solid #444;
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
  max-width: 500px;
}

.thinking-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--blue-main);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.thinking-title svg {
  color: var(--blue-main);
  animation: pulse 2s infinite;
}

.thinking-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.thinking-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.thinking-step.active {
  opacity: 1;
  color: var(--blue-main);
}

.thinking-step.completed {
  opacity: 0.8;
  color: #4CAF50;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
}

.step-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #555;
  border: 2px solid #555;
  transition: all 0.3s ease;
}

.thinking-step.active .step-circle {
  background: var(--blue-main);
  border-color: var(--blue-main);
  animation: pulse 2s infinite;
}

.thinking-step.completed .step-circle {
  background: #4CAF50;
  border-color: #4CAF50;
}

.step-line {
  width: 2px;
  height: 20px;
  background: #444;
  margin-top: 4px;
  transition: all 0.3s ease;
}

.thinking-step.completed .step-line {
  background: #4CAF50;
}

.step-content {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Hide the last step line */
.thinking-step:last-child .step-line {
  display: none;
}
