.app {
  display: flex;
}

.content_wrapper {
  flex-grow: 1;
  width: 100%;
}

.chat-container {
  background-color: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Phase Styling */
.phase {
  display: none;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.phase.active {
  display: flex;
}

.chat-container h2 {
  color: #1d2129;
  text-align: center;
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.5em;
  font-weight: 700;
}

/* Chat subhead styling - dark theme for better readability */
.chat-subhead {
  color: #000000;  /* Pure black text */
  font-weight: 700;  /* Bold text */
}

.chat-container p {
  color: #4b4f56;
  line-height: 1.6;
  font-size: 0.95em;
  margin-bottom: 12px;
}

/* Symptom List and Items */
.symptom-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.symptom-item-container {
  padding: 12px 0;
  border-bottom: 1px solid #e9ebee;
}
.symptom-item-container:last-child {
  border-bottom: none;
}

.symptom-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
}

.symptom-item span {
  flex-grow: 1;
  margin-right: 12px;
  font-size: 0.9em;
  color: #1d2129;
}

/* Inline Follow-up Styling */
.inline-follow-up {
  display: none;
  padding: 10px 8px 5px 25px;
  margin-top: 10px;
  background-color: #f7f8fa;
  border-radius: 6px;
  border-top: 1px dashed #dde0e3;
}

.inline-follow-up span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85em;
  color: #333;
}
.inline-follow-up .follow-up-buttons {
  justify-content: flex-start;
}


/* Button Styling (General and Specific for chat component) */
.chat-container button,
.chat-container .btn { /* Target generic buttons and Bootstrap buttons within chat */
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 500;
  transition: background-color 0.25s ease, transform 0.15s ease, box-shadow 0.2s ease;
  text-align: center;
}
.chat-container button:not(.btn) { /* Specific for non-bootstrap buttons */
  border: none;
}


.chat-container button:hover,
.chat-container .btn:hover {
  opacity: 0.9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chat-container button:active,
.chat-container .btn:active {
  transform: scale(0.97);
  box-shadow: none;
}

.symptom-buttons, .follow-up-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.symptom-buttons button, .follow-up-buttons button {
  background-color: #e4e6eb;
  color: #050505;
  min-width: 65px;
  border: 1px solid #ced0d4; /* This will apply to non-bootstrap buttons */
}

.symptom-buttons button.selected,
.follow-up-buttons button.selected {
  color: white;
  border: 1px solid transparent;
}

.symptom-buttons button.selected[data-value="yes"],
.follow-up-buttons button.selected[data-value="yes"] {
  background-color: #36a420;
}

.symptom-buttons button.selected[data-value="no"],
.follow-up-buttons button.selected[data-value="no"] {
  background-color: #e02c32;
}


.chat-container .button-primary {
  background-color: var(--mkono-blue);
  color: white;
  width: 100%;
}
.chat-container .button-primary:not(.btn) { border: none; }


.chat-container .button-secondary {
  background-color: #6c757d;
  color: white;
  width: 100%;
}
.chat-container .button-secondary:not(.btn) { border: none; }

#confirm-no.button-secondary { /* This is a custom non-bootstrap button */
   background-color: #fa383e;
}

/* Confirmation Phase Styling */
#selected-symptoms-list {
  list-style: none;
  padding-left: 0;
  color: #1d2129;
  font-size: 0.9em;
  background-color: #f7f8fa;
  border: 1px solid #e9ebee;
  border-radius: 8px;
  padding: 12px 18px;
}

#selected-symptoms-list li {
  margin-bottom: 8px;
  padding-left: 18px;
  position: relative;
}
#selected-symptoms-list li::before {
  content: "✓";
  color: #36a420;
  font-weight: bold;
  display: inline-block;
  position: absolute;
  left: 0;
  top: 1px;
}

.confirmation-prompt {
  text-align: center;
  font-weight: 500;
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 1em;
}

.confirmation-buttons-container {
  display: flex;
  gap: 10px;
  width: 100%;
}
.confirmation-buttons-container button {
  flex-grow: 1;
}

/* Results Phase Styling */
#results-title {
  color: black;
  border-radius: 8px;
  font-size: 1.3em;
  text-align: center;
  padding: 1rem;
}
#results-title.no-symptoms {
  background-color: #39f36456;
}
#results-title:not(.no-symptoms) {
  background-color: #dc3545;
  color: white;
}


#recommendation-text {
  font-weight: 500;
  color: #1d2129;
  font-size: 1.05em;
  margin-bottom: 5px;
}

#results-message-container {
  background-color: #f0f2f5;
  padding: 15px;
  border: 1px solid #ced0d4;
  border-radius: 8px;
}
#results-message {
  font-size: 0.9em;
  line-height: 1.6;
  color: #050505;
  margin: 0;
}
#results-message strong {
  color: #e02c32;
}

.result-actions {
  display: grid;
  /* grid-template-columns will be set by JS */
  gap: 10px;
  margin-top: 20px;
}
.result-actions button, .result-actions .btn {
  width: 100%;
}


/* Responsive Adjustments */
@media (max-width: 767px) {
  /* This will apply if two buttons are visible in result-actions */
  .result-actions.two-buttons { 
      grid-template-columns: 1fr; /* Stack buttons */
  }
}


@media (max-width: 360px) {
  .chat-container h2 {
      font-size: 1.3em;
  }
  .chat-container p, .symptom-item span, #selected-symptoms-list, #results-message, .chat-container button, .inline-follow-up span {
      font-size: 0.85em;
  }
  .symptom-buttons button, .follow-up-buttons button {
      min-width: 55px;
      padding: 10px 12px;
  }
  .chat-container button {
      padding: 10px 15px;
  }
  .inline-follow-up {
      padding: 8px 8px 5px 15px;
  }
}

@media screen and (min-width: 768px) {
  .content_wrapper {
    width: calc(100vh - 18rem) !important;
  }
}

.step-item {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.step-item.completed {
  border-color: #28a745;
  background: #d4edda;
}

.step-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #dee2e6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  transition: all 0.3s ease;
}

.step-checkbox.checked {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.progress-indicator {
  background: #e9ecef;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin: 1rem 0;
}

.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  margin: 1rem 0;
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.progress-bar {
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.profile-form {
  display: none;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.continue-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: none;
  padding: 1rem 3rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.continue-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.continue-btn:not(:disabled):hover {
  transform: translateY(-2px);
}

.step-description {
  color: #6c757d;
  font-size: 0.9rem;
}

.btn-outline-primary {
  border-radius: 20px;
  padding: 0.5rem 1.5rem;
}

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: whitesmoke;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s ease-out;
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  color: black;
  transform: translateY(20px);
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
}

.splash-text {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.splash-subtitle {
  font-size: 1.8rem;
  font-weight: 400;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.3s forwards;
  transform: translateY(20px);
  opacity: 0;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-content {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.main-content.show {
  opacity: 1;
  transform: translateY(0);
}

.step-item {
  transition: opacity 0.3s ease-in-out;
}

.step-item.active {
  opacity: 1;
}

.step-item:not(.active) {
  opacity: 0;
}

@media (min-width: 768px) {
  .splash-text {
    font-size: 2.5rem;
  }

  .splash-subtitle {
    font-size: 1.8rem;
  }
}

#paedCancerSignsSummary,
#paedCancerSignsSummaryEdit {
  min-height: 2.2em;
  background: #f1f3f5;
  border: 1px solid #b0b6bb;
  border-radius: 0.5em;
  padding: 0.5em 0.75em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em;
  align-items: flex-start;
  overflow-x: auto;
}

#paedCancerSignsSummary .badge,
#paedCancerSignsSummaryEdit .badge {
  margin: 0 4px 4px 0;
  font-size: 0.95em;
  background: #3498db !important;
  color: #fff;
  border: none;
  padding: 0.5em 0.75em;
  border-radius: 1em;
  display: inline-block;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

/* Hover effect for the select button */
.paed-cancer-signs-btn:hover,
.paed-cancer-signs-btn:focus,
.paed-cancer-signs-btn-edit:hover,
.paed-cancer-signs-btn-edit:focus {
  background-color: #4D88D2 !important;
  color: #fff !important;
  border-color: #4D88D2 !important;
}
