/* ===================================
   GLOBAL STYLES
   =================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background-green: #397c3f;
  --button-purple: #3e397c;
  --link-blue: #2196f3;
  --text-light: #ffffff;
  --text-dark: #1a1a1a;
  --card-bg: #ffffff;
  --shadow: rgba(0, 0, 0, 0.2);
  --transition-speed: 0.3s;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background-green);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===================================
   CONTAINER & LAYOUT
   =================================== */

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
}

header {
  text-align: center;
  padding: 20px 0;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px var(--shadow);
}

header .header-logo {
  max-width: 200px;
  width: 100%;
  height: auto;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
  header .header-logo {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  header .header-logo {
    max-width: 150px;
  }
}

main {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 8px 16px var(--shadow);
  color: var(--text-dark);
  margin-bottom: 30px;
}

footer {
  text-align: center;
  padding: 20px;
  margin-top: auto;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ===================================
   QUESTION SECTIONS
   =================================== */

.question-section {
  display: none;
  margin-bottom: 25px;
}

.question-section.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.question-section label {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-dark);
}

/* ===================================
   FORM ELEMENTS
   =================================== */

select.dropdown {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  color: var(--text-dark);
  cursor: pointer;
  transition: border-color var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233E397C' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.dropdown:hover {
  border-color: var(--button-purple);
}

.dropdown:focus {
  outline: none;
  border-color: var(--button-purple);
  box-shadow: 0 0 0 3px rgba(62, 57, 124, 0.1);
}

/* ===================================
   BUTTONS
   =================================== */

button,
.btn {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
  background-color: var(--button-purple);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--transition-speed) ease, transform 0.1s ease,
    box-shadow var(--transition-speed) ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:hover,
.btn:hover {
  background-color: #524c9e;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

button:active,
.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-reset {
  margin-top: 20px;
  display: block;
  width: 100%;
}

/* ===================================
   SOLUTION SECTION
   =================================== */

#solution-section {
  margin-top: 30px;
  padding: 25px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 5px solid var(--button-purple);
  display: none;
}

#solution-section.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

#solution-section h2 {
  color: var(--button-purple);
  margin-bottom: 15px;
  font-size: 1.8rem;
}

#solution-section h3 {
  color: var(--button-purple);
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

#solution-section p {
  margin-bottom: 15px;
  line-height: 1.8;
}

#solution-section ul {
  margin-left: 25px;
  margin-bottom: 15px;
}

#solution-section li {
  margin-bottom: 8px;
}

/* ===================================
   LINKS
   =================================== */

a {
  color: var(--link-yellow);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--transition-speed) ease;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Links in solution section need different styling for readability */
#solution-section a {
  color: var(--button-purple);
  text-shadow: none;
}

#solution-section a:hover {
  color: #524c9e;
}

/* ===================================
   SPECIAL CONTENT BOXES
   =================================== */

.parameter-input-group {
  margin-bottom: 20px;
}

.parameter-input-group label {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.unit-label {
  font-size: 0.9rem;
  font-weight: 400;
  color: #666;
  margin-left: 5px;
}

.optional-label {
  font-size: 0.85rem;
  font-weight: 400;
  color: #999;
  font-style: italic;
  margin-left: 5px;
}

.parameter-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  color: var(--text-dark);
}

.parameter-input:focus {
  outline: none;
  border-color: var(--button-purple);
  box-shadow: 0 0 0 3px rgba(62, 57, 124, 0.1);
}

.result-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.critical-text {
  color: #d32f2f;
  font-weight: 600;
}

.treatment-schedule {
  background-color: #fff;
  border: 2px solid var(--button-purple);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.treatment-schedule h4 {
  color: var(--button-purple);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.treatment-day {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.treatment-day:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.treatment-day strong {
  color: var(--button-purple);
  display: block;
  margin-bottom: 8px;
}

.warning-box {
  background-color: #fff3cd;
  border-left: 4px solid #ff9800;
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
}

.info-box {
  background-color: #e7f3ff;
  border-left: 4px solid #2196f3;
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  main {
    padding: 20px;
  }

  .container {
    padding: 15px;
  }

  .question-section label {
    font-size: 1rem;
  }

  #solution-section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.6rem;
  }

  main {
    padding: 15px;
  }

  .dropdown {
    font-size: 0.9rem;
    padding: 10px 12px;
  }

  button,
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid var(--link-yellow);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Button active state for toggle buttons */
.btn-active {
  background-color: #524c9e !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  transform: none !important;
}

.water-type-btn,
.substrate-btn {
  background-color: #6c63ac;
}

.water-type-btn:hover,
.substrate-btn:hover {
  background-color: #524c9e;
}

/* ===================================
   HARDNESS INPUT WITH UNIT TOGGLES
   =================================== */

.hardness-input-container {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.hardness-input {
  flex: 1;
}

.unit-toggle {
  display: flex;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.unit-btn {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  background-color: #f5f5f5;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-dark);
}

.unit-btn:first-child {
  border-right: 1px solid #ddd;
}

.unit-btn:hover {
  background-color: #e0e0e0;
}

.unit-btn.active {
  background-color: var(--button-purple);
  color: var(--text-light);
}

.hardness-warning {
  margin-top: 15px;
  padding: 15px;
  background-color: #fff3cd;
  border-left: 4px solid #ff9800;
  border-radius: 4px;
}

.hardness-warning p {
  margin-bottom: 10px;
  font-weight: 500;
}

/* ===================================
   BUTTON ACTIVE STATES FOR TOGGLES
   =================================== */

.btn-active {
  background-color: #524c9e !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  transform: none !important;
}

.water-type-btn,
.substrate-btn {
  background-color: #6c63ac;
  transition: all 0.2s ease;
}

.water-type-btn:hover,
.substrate-btn:hover {
  background-color: #524c9e;
}

.water-type-btn:not(.btn-active),
.substrate-btn:not(.btn-active) {
  background-color: var(--button-purple);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .hardness-input-container {
    flex-direction: column;
  }

  .unit-toggle {
    width: 100%;
  }

  .unit-btn {
    flex: 1;
  }

  .water-type-btn,
  .substrate-btn {
    font-size: 0.85rem;
    padding: 10px 16px;
  }
}

/* ===================================
   SHRIMP DEATHS - ADDITIONAL STYLES
   =================================== */

/* ===================================
   PARAMETER INPUT FORMS
   =================================== */

.parameter-row {
  display: grid;
  grid-template-columns: 1.5fr 120px 1.5fr 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.parameter-row:last-of-type {
  border-bottom: none;
}

.parameter-label {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #3e397c;
  color: white;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.help-icon:hover {
  background-color: #524c9e;
}

.parameter-input-field {
  width: 100%;
  max-width: 120px;
  padding: 10px 12px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  color: #1a1a1a;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.parameter-input-field:focus {
  outline: none;
  border-color: #3e397c;
  box-shadow: 0 0 0 3px rgba(62, 57, 124, 0.1);
}

.parameter-input-field:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.unit-display {
  font-size: 0.95rem;
  color: #666;
  text-align: center;
}

.unit-toggle {
  display: flex;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  height: 42px;
  min-width: 90px;
  max-width: 160px;
  justify-self: center;
}

.unit-btn {
  flex: 1;
  min-width: 45px;
  max-width: 80px;
  padding: 10px 5px;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: #f5f5f5;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #1a1a1a;
}

.unit-btn:first-child {
  border-right: 1px solid #ddd;
}

.unit-btn:hover:not(.active) {
  background-color: #e0e0e0;
}

.unit-btn.active {
  background-color: #3e397c;
  color: white;
}

.not-tested-btn {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  background-color: #6c63ac;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 120px;
  justify-self: center;
}

.not-tested-btn:hover {
  background-color: #524c9e;
}

.not-tested-btn.active {
  background-color: #d32f2f;
}

.not-tested-btn.active:hover {
  background-color: #b71c1c;
}

/* ===================================
     PARAMETER TABLE STYLES
     =================================== */

.parameter-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.parameter-table th,
.parameter-table td {
  padding: 14px;
  text-align: left;
  border: 1px solid #e0e0e0;
}

.parameter-table th {
  background-color: #3e397c;
  color: white;
  font-weight: 600;
}

/* Column widths */
.parameter-table th:first-child,
.parameter-table td:first-child {
  width: 30%;
}

.parameter-table th:nth-child(2),
.parameter-table td:nth-child(2),
.parameter-table th:nth-child(3),
.parameter-table td:nth-child(3),
.parameter-table th:nth-child(4),
.parameter-table td:nth-child(4) {
  width: 23.33%;
  text-align: center;
}

.parameter-table td {
  background-color: white;
}

/* Hover effect */
.parameter-table tbody tr:hover {
  background-color: #f0f0f0;
}

.parameter-table td.param-critical {
  background-color: #ef8690 !important;
}
.parameter-table td.param-borderline {
  background-color: #edea88 !important;
  color: #333;
}
.parameter-table td.param-ideal {
  background-color: #88ea91 !important;
}
.parameter-table td.param-acceptable-high {
  background-color: #efc58e !important;
}
.parameter-table td.param-not-tested {
  background-color: #e0e0e0 !important;
  color: #666;
  font-style: italic;
}

/* First column styling */
.parameter-table td:first-child {
  font-weight: 600;
}

.parameter-legend {
  display: block;
  margin: 5px auto;
  max-width: 100%;
  height: auto;
}

/* ===================================
   PARAMETER TABLE - MOBILE RESPONSIVE
   =================================== */

   /* Hide mobile cards by default - only show on mobile/tablet */
.parameter-mobile-cards {
  display: none;
}

/* Tablets and smaller (768px and below) - Horizontal scroll */
@media (max-width: 768px) {
  .parameter-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -15px;
    padding: 0 15px;
  }

  .parameter-table {
    min-width: 600px; /* Ensure table doesn't squish too much */
    font-size: 0.9em;
  }

  .parameter-table th,
  .parameter-table td {
    padding: 10px 8px;
  }

  .parameter-table th:first-child,
  .parameter-table td:first-child {
    width: 25%;
  }

  .parameter-table th:nth-child(2),
  .parameter-table td:nth-child(2),
  .parameter-table th:nth-child(3),
  .parameter-table td:nth-child(3),
  .parameter-table th:nth-child(4),
  .parameter-table td:nth-child(4) {
    width: 25%;
  }
}

@media (max-width: 768px) {
  /* Hide the entire table container on mobile */
  .parameter-table-container {
    display: none !important;
  }
  
  .parameter-table {
    display: none !important;
  }

  /* Ensure main container doesn't overflow */
  main {
    padding: 15px;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  /* Mobile card layout for parameters */
  .parameter-mobile-cards {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .parameter-mobile-card-header {
    font-weight: 600;
    font-size: 1.1em;
    color: #3e397c;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3e397c;
    word-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
  }

  .parameter-mobile-card-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    box-sizing: border-box;
  }

  .parameter-mobile-card-row:last-child {
    border-bottom: none;
  }

  .parameter-mobile-card-label {
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .parameter-mobile-card-value {
    text-align: right;
    padding: 4px 8px;
    border-radius: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
  }

  /* Apply same color coding as table */
  .parameter-mobile-card-value.param-critical {
    background-color: #ef8690;
  }

  .parameter-mobile-card-value.param-borderline {
    background-color: #edea88;
  }

  .parameter-mobile-card-value.param-ideal {
    background-color: #b4f5a8;
  }

  .parameter-mobile-card-value.param-acceptable-high {
    background-color: #b4f5a8;
  }

  .parameter-mobile-card-value.param-not-tested {
    background-color: #e0e0e0;
    color: #666;
  }
}

  /* Make clickable parameter names obvious on mobile */
  .parameter-mobile-card-header.clickable {
    color: #2196f3;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
  }

  .parameter-mobile-card-header.clickable:active {
    background-color: #e3f2fd;
  }
}

/* Desktop and larger - hide mobile cards, show table */
@media (min-width: 481px) {
  .parameter-mobile-cards {
    display: none;
  }
}

/* ===================================
     POPUPS & MODALS
     =================================== */

.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.popup-overlay.active {
  display: flex;
}

.popup-content {
  background-color: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.popup-content h2 {
  color: #3e397c;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.popup-content p {
  color: #1a1a1a;
  margin-bottom: 20px;
  line-height: 1.6;
}

.popup-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.popup-btn {
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-btn-primary {
  background-color: #3e397c;
  color: white;
}

.popup-btn-primary:hover {
  background-color: #524c9e;
}

.popup-btn-secondary {
  background-color: #e0e0e0;
  color: #1a1a1a;
}

.popup-btn-secondary:hover {
  background-color: #d0d0d0;
}

/* ===================================
     RESULTS PAGE STYLES
     =================================== */

.results-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.result-summary {
  background-color: white;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-summary h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #1a1a1a;
}

.result-summary.priority-critical h2 {
  color: #d32f2f;
}

.result-summary.priority-immediate h2 {
  color: #f57c00;
}

.result-summary.priority-general h2 {
  color: #1976d2;
}

.result-summary.priority-good h2 {
  color: #388e3c;
}

.result-summary p.description {
  font-style: italic;
  color: #666;
  margin-bottom: 15px;
}

.result-summary ul {
  margin-left: 25px;
}

.result-summary li {
  margin-bottom: 8px;
}

.result-info-section {
  background-color: white;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-info-section h2 {
  color: #3e397c;
  font-size: 1.6rem;
  margin-bottom: 15px;
  border-bottom: 2px solid #3e397c;
  padding-bottom: 10px;
}

.result-info-section h3 {
  color: #3e397c;
  font-size: 1.3rem;
  margin-top: 20px;
  margin-bottom: 10px;
}

.result-info-section h4 {
  color: #1a1a1a;
  font-size: 1.1rem;
  margin-top: 15px;
  margin-bottom: 8px;
}

.result-info-section p {
  margin-bottom: 15px;
  line-height: 1.8;
}

.result-info-section ul {
  margin-left: 25px;
  margin-bottom: 15px;
}

.result-info-section li {
  margin-bottom: 8px;
}

/* ===================================
     MOBILE RESPONSIVE
     =================================== */

@media (max-width: 465px) {
  .parameter-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 15px 0;
  }
  .parameter-input-controls {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .parameter-form-divider {
    border-bottom: 1px solid #e0e0e0;
    margin: 10px 0 15px 0;
  }

  .parameter-form-header {
    margin-bottom: 10px;
  }

  .parameter-label {
    font-size: 1.05rem;
  }

  .unit-display {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .unit-toggle {
    justify-self: start;
  }

  .not-tested-btn {
    width: 100%;
  }

}

/* ===================================
   PARAMETER DETAIL CARDS STYLING
   =================================== */
/* Add this to styles.css or shrimp-deaths-styles.css */

.parameter-detail {
  background-color: #f8f9fa;
  border-left: 4px solid #3e397c;
  border-radius: 6px;
  padding: 15px 20px;
  margin-bottom: 15px;
  transition: all 0.2s ease;
}

.parameter-detail:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.parameter-detail h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #3e397c;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.parameter-detail p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.parameter-detail p:last-child {
  margin-bottom: 0;
}

/* Status-based border colors */
.parameter-detail.status-ideal {
  border-left-color: #88ea91;
  background-color: #f1f8f4;
}

.parameter-detail.status-borderline {
  border-left-color: #edea88;
  background-color: #fffef5;
}

.parameter-detail.status-critical {
  border-left-color: #ef8690;
  background-color: #fef5f6;
}

.parameter-detail.status-acceptable-high {
  border-left-color: #efc58e;
  background-color: #fff9f3;
}

/* Status icon in header */
.status-icon {
  font-size: 1.2em;
  line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .parameter-detail {
    padding: 12px 15px;
  }

  .parameter-detail h4 {
    font-size: 1rem;
  }
}

/* ===================================
   HYPERLINK COLOR FIX FOR RESULTS
   =================================== */
/* Add this to the bottom of shrimp-deaths-styles.css or styles.css */

/* Results page links should be blue, not yellow */
.result-summary a,
.result-info-section a,
.warning-box a,
.info-box a {
  color: #2196f3 !important;
  text-shadow: none !important;
  text-decoration: underline;
}

.result-summary a:hover,
.result-info-section a:hover,
.warning-box a:hover,
.info-box a:hover {
  color: #1976d2 !important;
  opacity: 1;
}

/* Also update popup links to be blue */
.popup-content a {
  color: #2196f3 !important;
  text-shadow: none !important;
  text-decoration: underline;
}

.popup-content a:hover {
  color: #1976d2 !important;
}

#source-params-continue-btn {
  min-width: 200px;
  padding: 12px 30px;
  font-size: 1.1rem;
}

#source-params-continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(62, 57, 124, 0.3);
}

.result-summary-assessment {
  background-color: white;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #3e397c;
}

.result-summary-assessment h2 {
  color: #3e397c;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.result-summary-assessment ul {
  margin-left: 25px;
  list-style-type: disc;
}

.result-summary-assessment li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.result-info-section.priority-critical {
  background-color: #ffebee;
  border-left: 5px solid #d32f2f;
}

.result-info-section.priority-immediate {
  background-color: #fff3e0;
  border-left: 5px solid #f57c00;
}

.result-info-section.priority-general {
  background-color: #fff9c4;
  border-left: 5px solid #f9a825;
}

.result-info-section.priority-low {
  background-color: #e8f5e9;
  border-left: 5px solid #4caf50;
}

.result-summary .priority-section {
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
}

.result-summary .priority-section h3 {
  margin-top: 0;
}

.priority-section.priority-critical {
  background-color: #ffebee;
  border-left: 5px solid #d32f2f;
}

.priority-section.priority-immediate {
  background-color: #fff3e0;
  border-left: 5px solid #f57c00;
}

.priority-section.priority-general {
  background-color: #fff9c4;
  border-left: 5px solid #f9a825;
}

.result-info-section.collapsible .section-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  transition: background-color 0.2s ease;
}

.result-info-section.collapsible .section-header:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.result-info-section.collapsible .section-header h2 {
  margin: 0;
}

.collapse-arrow {
  font-size: 20px;
  transition: transform 0.3s ease;
  user-select: none;
}

.result-info-section.collapsible .section-content {
  max-height: 15000px;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 15px 15px 15px;
}

.result-info-section.collapsible.collapsed .section-content {
  max-height: 0;
  padding: 0 15px;
}

.tiny-shrimp {
  position: fixed;
  left: -8px;
  top: 50%;
  transform: translateY(-50%) rotate(112deg);
  width: 40px;
  height: auto;
  z-index: 100;
  opacity: 1;
}

/* Menu */
.menu-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.menu-icon {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.menu-icon:hover {
  background-color: #45a049;
}

.menu-dropdown {
  display: none;
  position: absolute;
  top: 50px;
  right: 0;
  background-color: white;
  min-width: 150px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  overflow: hidden;
}

.menu-dropdown.active {
  display: block;
}

.menu-item {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
  color: black !important;
  transition: background-color 0.2s, transform 0.2s; /* ADD transform to transition */
  text-decoration: none !important;
  font-family: inherit;
  font-weight: normal;
  line-height: normal;
  margin: 0;
  box-sizing: border-box;
  text-shadow: none !important;
  box-shadow: none !important;
  outline: none;
}

/* Force links to look exactly like buttons */
a.menu-item,
a.menu-item:link,
a.menu-item:visited,
a.menu-item:active {
  color: black !important;
  text-decoration: none !important;
  background: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: background-color 0.2s, transform 0.2s; /* ADD transform to transition */
}

button.menu-item {
  color: black !important;
  background: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  outline: none;
  transition: background-color 0.2s, transform 0.2s; /* ADD transform to transition */
}

.menu-item:hover,
a.menu-item:hover,
button.menu-item:hover {
  background-color: #f1f1f1 !important;
  text-decoration: none !important;
  color: black !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transform: translateY(-2px); /* ADD THIS LINE - bounce up effect */
}

/* Remove focus styles that might cause shadows */
.menu-item:focus,
a.menu-item:focus,
button.menu-item:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Feedback Popup */
.feedback-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.feedback-popup-overlay.active {
  display: flex;
}

.feedback-popup-content {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  color: black;
}

.feedback-popup-content h2 {
  margin-top: 0;
}

.feedback-form-group {
  margin-bottom: 20px;
}

.feedback-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.feedback-textarea {
  width: 100%;
  min-height: 150px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.feedback-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}

.feedback-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.feedback-btn-submit,
.feedback-btn-cancel {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.feedback-btn-submit {
  background-color: #4caf50;
  color: white;
}

.feedback-btn-submit:hover {
  background-color: #45a049;
}

.feedback-btn-cancel {
  background-color: #f44336;
  color: white;
}

.feedback-btn-cancel:hover {
  background-color: #da190b;
}

/* Hardness Warning Modal */
.hardness-warning-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  overflow: hidden;
}

.hardness-warning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.hardness-warning-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 3001;
}

.hardness-warning-content p {
  margin-top: 0;
  margin-bottom: 20px;
  color: black;
}

.hardness-warning-buttons {
  display: flex;
  gap: 10px;
}

.hardness-warning-buttons .btn {
  flex: 1;
}

/* Organism Images */
.organism-image-container {
  margin: 20px 0;
  text-align: center;
}

.organism-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-credit {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-top: 8px;
  text-align: center;
}

/* Side-by-side images */
.organism-images-side-by-side {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.organism-image-wrapper {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .organism-images-side-by-side {
    flex-direction: column;
  }

  .organism-image-wrapper {
    min-width: 100%;
  }
}

/* eBook Advertisement */
.ebook-ad {
  background-color: #397c3f;
  color: white;
  padding: 25px;
  border-radius: 10px;
  margin: 30px 0;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ebook-ad-content {
  flex: 1;
}

.ebook-ad-content p {
  margin: 0;
  color: white;
  line-height: 1.6;
}

.ebook-ad-button {
  flex-shrink: 0;
}

.ebook-btn {
  background-color: #3e397c;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  display: inline-block;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.ebook-btn:hover {
  background-color: #6a1fa8;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .ebook-ad {
    flex-direction: column;
    text-align: center;
  }

  .ebook-ad-button {
    width: 100%;
  }

  .ebook-btn {
    width: 100%;
  }
}

.parameter-table td.param-acceptable-high {
  background-color: #efc58e !important;
}
.parameter-table td.param-acceptable-low {
  background-color: #efc58e !important;
}

.parameter-detail.status-acceptable-high {
  border-left-color: #efc58e;
  background-color: #fff9f3;
}

.parameter-detail.status-acceptable-low {
  border-left-color: #efc58e;
  background-color: #fff9f3;
}

/* Clickable parameter names in table */
.parameter-table th.clickable-param {
  cursor: pointer;
  color: #2196f3;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.parameter-table th.clickable-param:hover {
  text-decoration-style: solid;
  background-color: #e3f2fd;
}

/* View all ranges link */
.view-all-ranges-link {
  display: block;
  text-align: center;
  margin: 15px 0 20px 0;
  font-size: 0.95em;
  color: #2196f3;
  cursor: pointer;
  text-decoration: underline;
}

.view-all-ranges-link:hover {
  color: #1976d2;
}

/* Parameter ranges popup */
.param-ranges-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.param-ranges-overlay.active {
  display: flex;
}

.param-ranges-popup {
  background: white;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  padding: 25px;
  position: relative;
}

.param-ranges-popup h2 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #2196f3;
  padding-bottom: 10px;
}

.param-ranges-popup h3 {
  margin-top: 20px;
  color: #555;
}

.param-ranges-popup .close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
}

.param-ranges-popup .close-btn:hover {
  color: #333;
}

.param-ranges-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.param-ranges-table th,
.param-ranges-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.param-ranges-table th {
  background-color: #f5f5f5;
  font-weight: bold;
  color: #333;
}

.param-ranges-table td {
  color: #555;
}

.param-ranges-table .range-critical-low {
  background-color: #ffebee;
}

.param-ranges-table .range-borderline-low {
  background-color: #fff3e0;
}

.param-ranges-table .range-good {
  background-color: #e8f5e9;
  font-weight: 500;
}

.param-ranges-table .range-borderline-high {
  background-color: #fff3e0;
}

.param-ranges-table .range-critical-high {
  background-color: #ffebee;
}

.ranges-disclaimer {
  margin-top: 20px;
  padding: 12px;
  background-color: #f5f5f5;
  border-left: 4px solid #ff9800;
  font-size: 0.9em;
  color: #666;
  font-style: italic;
}

/* Required field highlighting */
.question-section.required-missing {
  border: 3px solid #d32f2f !important;
  border-radius: 8px;
  background-color: #ffebee;
  padding: 15px;
  margin: 15px 0;
  animation: shake 0.5s;
}

.question-section.required-missing label {
  color: #d32f2f !important;
  font-weight: bold !important;
}

.question-section.required-missing .dropdown,
.question-section.required-missing input,
.question-section.required-missing select {
  border-color: #d32f2f !important;
  border-width: 2px !important;
}

/* Specific styling for parameter rows */
.parameter-row.required-missing {
  background-color: #ffebee !important;
  border: 2px solid #d32f2f !important;
  border-radius: 8px;
  padding: 15px 10px !important;
  margin-bottom: 15px;
}

.parameter-row.required-missing .parameter-input-field {
  border-color: #d32f2f !important;
  background-color: #fff !important;
}

.parameter-row.required-missing .parameter-label {
  color: #d32f2f !important;
}

/* For parameter input groups (single parameter assessment) */
.parameter-input-group.required-missing {
  border: 3px solid #d32f2f !important;
  border-radius: 8px;
  background-color: #ffebee;
  padding: 15px;
  margin: 15px 0;
  animation: shake 0.5s;
}

.parameter-input-group.required-missing label {
  color: #d32f2f !important;
  font-weight: bold !important;
}

.parameter-input-group.required-missing input,
.parameter-input-group.required-missing select {
  border-color: #d32f2f !important;
  border-width: 2px !important;
}

.required-field-message {
  background-color: #ffebee;
  border: 2px solid #d32f2f;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  color: #d32f2f;
  font-weight: bold;
  text-align: center;
  animation: shake 0.5s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Prevent headings from overflowing on mobile */
h2 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  white-space: normal; /* Allow normal wrapping */
}

/* Specific fix for result section headings */
.result-section h2,
.solution-section h2 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  white-space: normal;
}

/* Extra mobile-specific fix */
@media (max-width: 768px) {
  h2 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 1.3em; /* Slightly smaller on mobile */
    white-space: normal;
  }
  
  .result-section h2,
  .solution-section h2 {
    font-size: 1.2em;
  }
}