/* Hydrop Compatibility Checker - Frontend Styles */

.hydrop-checker,
.hydrop-checker * {
  box-sizing: border-box;
}

.hydrop-checker {
  background: inherit;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: inherit;
  text-align: left;
  direction: ltr;
}

/* Reset button-specific WordPress theme interference */
.hydrop-checker button,
.hydrop-checker input[type="button"],
.hydrop-checker input[type="submit"],
.hydrop-checker a {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  background: transparent;
  color: inherit;
  border: 0;
  margin: 0;
  padding: 0;
  text-decoration: none;
}

/* CSS Custom Properties for brand theming */
:root {
  --hydrop-checker-primary: #023c83;        /* Dark blue - primary actions, headings */
  --hydrop-checker-primary-dark: #01205f;   /* Darker blue - hover states */
  --hydrop-checker-primary-light: #0079c6;  /* Medium blue - secondary elements */
  --hydrop-checker-accent: #03e06e;         /* Light green - success states, highlights */
  --hydrop-checker-accent-dark: #02c55f;    /* Darker green - hover states */
  --hydrop-checker-accent-light: #32c4f8;   /* Light blue - info states, progress */
  --hydrop-checker-text: #1f2937;           /* Dark text - main content */
  --hydrop-checker-text-light: #6b7280;     /* Medium text - secondary content */
  --hydrop-checker-text-muted: #c1c1c1;     /* Medium gray - muted text */
  --hydrop-checker-bg: #ffffff;             /* White - main backgrounds */
  --hydrop-checker-bg-light: #f0f0f0;       /* Light gray - secondary backgrounds */
  --hydrop-checker-bg-dark: #e5e5e5;        /* Slightly darker gray - borders */
  --hydrop-checker-border: #c1c1c1;         /* Medium gray - borders */
  --hydrop-checker-border-light: #f0f0f0;   /* Light gray - subtle borders */
  
  /* Modern shadow system - layered depth */
  --hydrop-shadow-sm: 0 2px 4px rgba(2, 60, 131, 0.04), 0 1px 2px rgba(2, 60, 131, 0.06);
  --hydrop-shadow-md: 0 4px 8px rgba(2, 60, 131, 0.08), 0 2px 4px rgba(2, 60, 131, 0.06);
  --hydrop-shadow-lg: 0 10px 25px rgba(2, 60, 131, 0.12), 0 4px 10px rgba(2, 60, 131, 0.08);
  --hydrop-shadow-xl: 0 20px 40px rgba(2, 60, 131, 0.15), 0 8px 16px rgba(2, 60, 131, 0.1);
  --hydrop-shadow-inner: inset 0 2px 4px rgba(2, 60, 131, 0.06);
  
  /* Gradient definitions */
  --hydrop-gradient-primary: linear-gradient(135deg, #023c83 0%, #0079c6 100%);
  --hydrop-gradient-accent: linear-gradient(135deg, #03e06e 0%, #02c55f 100%);
  --hydrop-gradient-soft: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --hydrop-gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  
  --hydrop-checker-radius: 16px;
  --hydrop-checker-radius-lg: 24px;
  --hydrop-checker-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --hydrop-checker-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main container */
.hydrop-checker {
  width: 100%;
  padding: 2rem;
  background: var(--hydrop-gradient-glass);
  backdrop-filter: blur(10px);
  border-radius: var(--hydrop-checker-radius-lg);
  box-shadow: var(--hydrop-shadow-xl);
  position: relative;
  overflow: visible;
  font-family: inherit;
  line-height: inherit;
  color: var(--hydrop-checker-text);
  display: flex;
  flex-direction: column;
  min-height: auto;
  max-height: none;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Mobile optimization */
@media (max-width: 768px) {
  .hydrop-checker {
    margin: 0;
    padding: 1rem;
    overflow: visible; /* Ensure shadows are not clipped on mobile */
  }
}

/* Title and description */
.hydrop-checker-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--hydrop-checker-primary);
  margin: 0 0 1rem 0;
  text-align: center;
}

/* Start Screen */
.hydrop-start-screen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(240, 246, 255, 0.8) 0%, rgba(255, 255, 255, 0.95) 60%);
  backdrop-filter: blur(20px);
  border-radius: var(--hydrop-checker-radius-lg);
  box-shadow: var(--hydrop-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

/* Start screen inner layout wrapper */
.hydrop-start-inner {
  position: relative;
  z-index: 2; /* Above decorative gradients */
  max-width: 780px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Graphic container (icon / illustration) */
.hydrop-start-graphic {
  width: 160px; /* Content box (icon area) */
  height: 160px; /* Content box (icon area) */
  padding: 14px; /* Expands outer circle to 188px while preserving icon visual size */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  background: radial-gradient(circle at 30% 30%, rgba(0,121,198,0.15), rgba(2,60,131,0.08) 50%, transparent 75%);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 8px 24px rgba(2,60,131,0.2), 0 2px 8px rgba(2,60,131,0.12);
}

.hydrop-start-graphic::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(255,255,255,0.1));
  z-index: -1;
  filter: blur(8px);
}

.hydrop-start-graphic::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%);
  pointer-events: none;
}

.hydrop-start-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(2,60,131,0.20));
}

/* Title on start screen */
.hydrop-start-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.75rem 0;
  color: var(--hydrop-checker-primary);
  text-shadow: 0 1px 2px rgba(255,255,255,0.7);
}

@media (max-width: 768px) {
  .hydrop-start-title { font-size: 1.65rem; }
  .hydrop-start-graphic { width: 120px; height: 120px; padding: 10px; margin-bottom: 1.25rem; }
}

/* Description text under title */
.hydrop-start-description {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--hydrop-checker-text-light);
  margin: 0 0 0.75rem 0;
  max-width: 680px;
}

@media (max-width: 768px) {
  .hydrop-start-description { font-size: 0.975rem; }
}

/* Start intro paragraph replacing highlights list */
.hydrop-start-intro {
  margin-bottom: 2rem;
  font-size: .95rem;
  line-height: 1.45rem;
  color: #1e293b;
  font-weight: 500;
}

.hydrop-start-btn {
  margin-top: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--hydrop-gradient-primary);
  color: #ffffff;
  cursor: pointer;
  transition: var(--hydrop-checker-transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--hydrop-shadow-lg);
  border: none;
}

.hydrop-start-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: var(--hydrop-checker-transition);
}

.hydrop-start-btn:hover,
.hydrop-start-btn:focus {
  background: linear-gradient(135deg, #01205f 0%, #023c83 100%);
  transform: translateY(-2px);
  box-shadow: var(--hydrop-shadow-xl);
  outline: none;
}

.hydrop-start-btn:hover::before {
  opacity: 1;
}

.hydrop-start-btn:active {
  transform: translateY(0px);
  box-shadow: var(--hydrop-shadow-md);
}

/* Decorative blurred shapes */
.hydrop-start-screen::before,
.hydrop-start-screen::after {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle at center, rgba(2,60,131,0.18), transparent 70%);
  top: -160px;
  right: -160px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

.hydrop-start-screen::after {
  top: auto;
  bottom: -180px;
  left: -200px;
  right: auto;
  background: radial-gradient(circle at center, rgba(16,185,129,0.15), transparent 70%);
}

@media (max-width: 768px) {
  .hydrop-start-screen {
    padding: 1.75rem 1.25rem 2rem;
  }
  .hydrop-start-title {
    font-size: 1.6rem;
  }
  .hydrop-start-description {
    font-size: 1rem;
  }
  .hydrop-start-graphic {
    width: 120px;
    height: 120px;
  }
  .hydrop-start-btn {
    width: 100%;
  }
}

/* Hide progress + navigation until started */
.hydrop-checker[data-started="false"] .hydrop-progress-container,
.hydrop-checker[data-started="false"] .hydrop-navigation {
  display: none !important;
}

/* Hide duplicate title/description under start screen until started */
.hydrop-checker[data-started="false"] .hydrop-checker-title,
.hydrop-checker[data-started="false"] .hydrop-checker-description {
  display: none !important;
}

/* Smooth height transition support for question container */
.hydrop-questions-container {
  position: relative;
  overflow: visible; /* Changed from hidden to prevent shadow cutoff */
  flex: 1;
  min-height: auto; /* Let content determine minimum height */
  max-height: none; /* Remove viewport constraints - let content expand freely */
  display: flex; /* Use flexbox to contain the active question */
  flex-direction: column;
}

.hydrop-questions-container.hydrop-animating .hydrop-question.active.incoming {
  opacity: 0;
  animation: hydrop-fade-in 180ms ease forwards 60ms;
}

@keyframes hydrop-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Results screen fade-in & upload expansion */
.hydrop-results.active.incoming { opacity: 0; animation: hydrop-fade-in 220ms ease forwards 80ms; }
.hydrop-results.expanding-upload .hydrop-upload-form { animation: hydrop-fade-in 240ms ease forwards; }

.hydrop-checker-description {
  font-size: 1.125rem;
  color: var(--hydrop-checker-text-light);
  margin: 0 0 1.5rem 0;
  text-align: center;
}

/* Mobile optimization for title and description */
@media (max-width: 768px) {
  .hydrop-checker-title {
    font-size: 1.5rem;
    margin: 0 0 0.75rem 0;
  }
  
  .hydrop-checker-description {
    font-size: 1rem;
    margin: 0 0 1rem 0;
  }
}

/* Progress bar */
.hydrop-progress-container {
  margin-bottom: 2rem;
}

.hydrop-progress-bar {
  width: 100%;
  height: 10px;
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.6) 0%, rgba(241, 245, 249, 0.8) 100%);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: var(--hydrop-shadow-inner);
  position: relative;
}

.hydrop-progress-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.hydrop-progress-fill {
  height: 100%;
  background: var(--hydrop-gradient-primary);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
  position: relative;
  box-shadow: 0 0 12px rgba(2, 60, 131, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hydrop-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  border-radius: 999px;
}

.hydrop-progress-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--hydrop-checker-text-light);
  font-weight: 500;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .hydrop-questions-container {
    min-height: auto; /* Let content determine height */
    max-height: none; /* Remove viewport constraints */
    overflow: visible; /* Ensure content is never hidden */
  }
  
  /* Enhanced mobile layout for binary questions - now more compact */
  .hydrop-checker.binary-question .hydrop-questions-container {
    max-height: none; /* Remove constraints for binary questions */
    min-height: auto; /* Content-driven height */
    overflow: visible; /* Never hide content */
  }
}

/* Individual question */
.hydrop-question {
  display: none; /* Hide inactive questions */
  flex-direction: column;
  overflow: visible; /* Allow content to expand beyond container bounds */
  opacity: 0;
  transform: translateX(50px);
  transition: var(--hydrop-checker-transition);
}

.hydrop-question.active {
  display: flex; /* Show active question in flex layout */
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hydrop-question.prev {
  display: none; /* Hide previous questions */
  transform: translateX(-50px);
}

.hydrop-question-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  height: auto; /* Let content determine height */
}

/* Removed .hydrop-question-icon (no current markup usage) */

.hydrop-question-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--hydrop-checker-text);
  margin: 0 0 1.5rem 0;
  text-align: center;
}

/* Mobile optimization for question title */
@media (max-width: 768px) {
  .hydrop-question-title {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
  }
}

/* Options */
.hydrop-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.hydrop-option {
  cursor: pointer;
  display: block;
  position: relative;
}

.hydrop-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hydrop-option-content {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.8) 100%);
  backdrop-filter: blur(10px);
  border-radius: var(--hydrop-checker-radius);
  transition: var(--hydrop-checker-transition);
  position: relative;
  box-shadow: var(--hydrop-shadow-sm);
}

.hydrop-option-content::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--hydrop-checker-radius);
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.2) 100%);
  opacity: 0;
  transition: var(--hydrop-checker-transition);
}

.hydrop-option:hover .hydrop-option-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
  transform: translateY(-3px);
  box-shadow: var(--hydrop-shadow-lg);
}

.hydrop-option:hover .hydrop-option-content::before {
  opacity: 1;
}

.hydrop-option input:checked + .hydrop-option-content {
  background: var(--hydrop-gradient-primary);
  color: white;
  box-shadow: var(--hydrop-shadow-xl), 0 0 0 1px rgba(2, 60, 131, 0.1);
  transform: translateY(-2px);
}

.hydrop-option input:checked + .hydrop-option-content::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 1;
}

/* Change SVG fill color to white when "Not Sure / Other" option is selected */
/* Note: The not_sure option color inversion and drop shadow are handled above in the combined rules */

/* Fallback for inline SVG if needed - only for not_sure option */
.hydrop-meter-option input[value="not_sure"]:checked + .hydrop-option-content .hydrop-meter-image svg,
.hydrop-meter-option input[value="not_sure"]:checked + .hydrop-option-content .hydrop-meter-image svg * {
  fill: white !important;
  color: white !important;
}

.hydrop-option-check {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(241, 245, 249, 0.8) 100%);
  border-radius: 50%;
  margin-right: 1rem;
  position: relative;
  transition: var(--hydrop-checker-transition);
  flex-shrink: 0;
  box-shadow: var(--hydrop-shadow-sm), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.hydrop-option input:checked + .hydrop-option-content .hydrop-option-check {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow: var(--hydrop-shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.hydrop-option input:checked + .hydrop-option-content .hydrop-option-check::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--hydrop-gradient-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(2, 60, 131, 0.4);
}

/* Removed .hydrop-option-text (not used in current template) */

/* Binary options (Questions 1 & 2) - Card layout */
.hydrop-binary-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.5rem 0; /* Vertical padding only, no horizontal padding */
}

.hydrop-binary-option {
  display: block;
}

.hydrop-binary-option .hydrop-option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  min-height: auto; /* Remove fixed minimum - let content determine height */
  position: relative;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.9) 100%);
  backdrop-filter: blur(10px);
  border-radius: var(--hydrop-checker-radius-lg);
  transition: var(--hydrop-checker-transition);
  box-shadow: var(--hydrop-shadow-md);
}

.hydrop-binary-option .hydrop-option-content::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--hydrop-checker-radius-lg);
  background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.3) 100%);
  opacity: 0;
  transition: var(--hydrop-checker-transition);
}

.hydrop-binary-option:hover .hydrop-option-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--hydrop-shadow-xl);
}

.hydrop-binary-option:hover .hydrop-option-content::before {
  opacity: 1;
}

.hydrop-binary-option input:checked + .hydrop-option-content {
  background: var(--hydrop-gradient-primary);
  box-shadow: var(--hydrop-shadow-xl), 0 0 0 2px rgba(2, 60, 131, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hydrop-binary-option input:checked + .hydrop-option-content::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 1;
}

.hydrop-binary-option .hydrop-option-check {
  position: absolute;
  top: 1rem;
  right: 1rem;
  margin: 0;
}

.hydrop-binary-image {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hydrop-binary-image::before {
  content: '';
  position: absolute;
  inset: -8px;
  background: radial-gradient(circle, rgba(2, 60, 131, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: var(--hydrop-checker-transition);
}

.hydrop-binary-option:hover .hydrop-binary-image::before {
  opacity: 1;
  transform: scale(1.1);
}

.hydrop-binary-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(2, 60, 131, 0.15));
  transition: var(--hydrop-checker-transition);
}

.hydrop-binary-option:hover .hydrop-binary-image img {
  filter: drop-shadow(0 6px 12px rgba(2, 60, 131, 0.25));
  transform: scale(1.05);
}

.hydrop-binary-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hydrop-binary-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
}

.hydrop-binary-description {
  font-size: 0.875rem;
  color: var(--hydrop-checker-text-light);
  line-height: 1.3;
}

.hydrop-binary-option input:checked + .hydrop-option-content .hydrop-binary-description {
  color: rgba(255, 255, 255, 0.8);
}

/* Mobile optimization for binary options */
@media (max-width: 768px) {
  .hydrop-binary-options {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
  }
  
  .hydrop-binary-option .hydrop-option-content {
    min-height: auto; /* Remove fixed minimum - let content determine height */
    padding: 1rem;
    flex-direction: row; /* Switch to horizontal layout */
    text-align: left; /* Align text to left */
    align-items: center; /* Center items vertically */
    gap: 1rem; /* Space between icon and text */
  }
  
  .hydrop-binary-option .hydrop-option-check {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    margin: 0;
  }
  
  .hydrop-binary-image {
    width: 50px;
    height: 50px;
    margin-bottom: 0; /* Remove bottom margin */
    flex-shrink: 0; /* Prevent icon from shrinking */
  }
  
  .hydrop-binary-info {
    flex: 1; /* Take remaining space */
    gap: 0.25rem; /* Reduce gap between title and description */
  }
  
  .hydrop-binary-title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }
  
  .hydrop-binary-description {
    font-size: 0.8rem;
    line-height: 1.2; /* Tighter line height */
  }
}

@media (max-width: 480px) {
  .hydrop-binary-option .hydrop-option-content {
    min-height: auto; /* Remove fixed minimum - let content determine height */
    padding: 0.875rem;
    gap: 0.75rem;
  }
  
  .hydrop-binary-image {
    width: 45px;
    height: 45px;
  }
  
  .hydrop-binary-title {
    font-size: 0.85rem;
  }
  
  .hydrop-binary-description {
    font-size: 0.75rem;
  }
  
  .hydrop-binary-options {
    padding: 0.5rem 0;
  }
}

/* Water meter options - Image-focused design */
.hydrop-meter-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-height: 350px; /* Show approximately one row of cards (240px card + padding + gap) */
  overflow-y: auto; /* Enable vertical scrolling for additional cards */
  overflow-x: visible; /* Allow shadows to extend beyond */
  align-items: stretch; /* Ensure equal height cards */
  padding: 1.25rem 1.5rem; /* Increased padding for shadow space */
  margin: 1rem -1.5rem 0 -1.5rem; /* Compensating negative margin */
  flex: 1;
  position: relative; /* For scroll indicator positioning */
  
  /* Fade-out gradient mask */
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 2rem,
    black calc(100% - 2rem),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 2rem,
    black calc(100% - 2rem),
    transparent 100%
  );
}

/* Mobile optimization */
@media (min-width: 481px) and (max-width: 768px) {
  .hydrop-meter-options {
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    margin: 0.75rem -1.5rem 0 -1.5rem;
    
    /* Hide scrollbar on mobile */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  
  .hydrop-meter-options::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  
  .hydrop-meter-option .hydrop-option-content {
    min-height: auto; /* Remove fixed minimum - let content determine height */
    padding: 1rem 0.75rem;
  }
}

/* Extra small screens - ensure scrolling works on very small devices */
@media (max-width: 480px) {
  .hydrop-meter-options {
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 0.75rem -1.25rem 0 -1.25rem;
    
    /* Hide scrollbar on mobile */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  
  .hydrop-meter-options::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
}

/* Custom scrollbar for webkit browsers - meter options only */
.hydrop-meter-options::-webkit-scrollbar {
  width: 10px;
}

.hydrop-meter-options::-webkit-scrollbar-track {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.5) 0%, rgba(226, 232, 240, 0.3) 100%);
  border-radius: 999px;
  margin: 4px;
}

.hydrop-meter-options::-webkit-scrollbar-thumb {
  background: var(--hydrop-gradient-primary);
  border-radius: 999px;
  transition: background-color 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hydrop-meter-options::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #01205f 0%, #023c83 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 8px rgba(2, 60, 131, 0.3);
}

/* Scroll indicator hint for meter options - floating glass-morphism badge */
.hydrop-scroll-indicator {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 200px;
  max-width: 80%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(248, 250, 252, 0.7) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--hydrop-checker-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  padding: 0.875rem 1.75rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.3s ease;
  z-index: 100;
  border-radius: 999px;
  box-shadow: 
    0 8px 24px rgba(2, 60, 131, 0.15),
    0 2px 8px rgba(2, 60, 131, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

.hydrop-meter-options.has-scroll .hydrop-scroll-indicator {
  display: block !important;
  opacity: 1;
  animation: scroll-indicator-pulse 2s ease-in-out infinite;
}

@keyframes scroll-indicator-pulse {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

/* Add subtle icon effect with pseudo-element */
.hydrop-scroll-indicator::before {
  content: '↓';
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 1rem;
  animation: scroll-arrow-bounce 1.5s ease-in-out infinite;
}

@keyframes scroll-arrow-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

.hydrop-meter-options.has-scroll .hydrop-scroll-indicator {
  display: block !important;
  opacity: 1;
}

.hydrop-meter-option {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%; /* Allow stretching to full grid cell height */
}

.hydrop-meter-option .hydrop-option-content {
  flex-direction: column;
  text-align: center;
  padding: 1.25rem 1rem;
  gap: 0.75rem;
  align-items: center;
  height: 100%;
  min-height: auto; /* Remove fixed minimum - let content determine height */
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.9) 100%);
  backdrop-filter: blur(10px);
  border-radius: var(--hydrop-checker-radius-lg);
  transition: var(--hydrop-checker-transition);
  display: flex;
  box-shadow: var(--hydrop-shadow-md);
  position: relative;
  overflow: hidden;
}

.hydrop-meter-option .hydrop-option-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.2) 100%);
  opacity: 0;
  transition: var(--hydrop-checker-transition);
}

.hydrop-meter-option:hover .hydrop-option-content {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--hydrop-shadow-xl);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
}

.hydrop-meter-option:hover .hydrop-option-content::before {
  opacity: 1;
}

.hydrop-meter-option input:checked + .hydrop-option-content {
  background: var(--hydrop-gradient-primary);
  box-shadow: var(--hydrop-shadow-xl), 0 0 0 2px rgba(2, 60, 131, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hydrop-meter-option input:checked + .hydrop-option-content::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 1;
}

.hydrop-meter-option .hydrop-option-check {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  margin: 0;
  width: 24px;
  height: 24px;
  z-index: 10;
}

.hydrop-meter-image {
  width: 120px;
  height: 120px;
  min-width: 120px;
  min-height: 120px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--hydrop-checker-radius);
  padding: 0.5rem;
  position: relative;
}

/* Removed hover background gradient effect */

.hydrop-meter-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(2px 4px 12px rgba(2, 60, 131, 0.2));
  transition: var(--hydrop-checker-transition);
  position: relative;
  z-index: 1;
}

.hydrop-meter-image img:hover {
  filter: drop-shadow(3px 6px 16px rgba(2, 60, 131, 0.3));
  transform: translateY(-2px);
}

/* Change drop shadow to white when any meter option is selected */
.hydrop-meter-option input:checked + .hydrop-option-content .hydrop-meter-image img {
  filter: drop-shadow(2px 4px 8px rgba(255, 255, 255, 0.8)) !important;
}

/* Special handling for not_sure option - combine white drop shadow with color inversion */
.hydrop-meter-option input[value="not_sure"]:checked + .hydrop-option-content .hydrop-meter-image img {
  filter: brightness(0) invert(1) drop-shadow(2px 4px 8px rgba(255, 255, 255, 0.8)) !important;
}

/* Change text color to white when meter option is selected */
.hydrop-meter-option input:checked + .hydrop-option-content .hydrop-meter-name {
  color: white;
}

.hydrop-meter-option input:checked + .hydrop-option-content .hydrop-meter-description {
  color: rgba(255, 255, 255, 0.8);
}

.hydrop-meter-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  max-width: 100%;
  flex: 1;
  justify-content: center;
}

.hydrop-meter-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--hydrop-checker-text);
  line-height: 1.3;
  margin: 0;
  transition: var(--hydrop-checker-transition);
}

.hydrop-meter-description {
  font-size: 0.875rem;
  color: var(--hydrop-checker-text-light);
  opacity: 0.8;
  line-height: 1.4;
  margin: 0;
  transition: var(--hydrop-checker-transition);
}

/* Results */
.hydrop-results {
  text-align: center;
  padding: 2rem 0;
}

.hydrop-results-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.hydrop-results-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
}

.hydrop-results-reason {
  font-size: 1rem;
  color: var(--hydrop-checker-text-light);
  margin: 0 0 2rem 0;
}

.hydrop-results-action {
  margin-bottom: 2rem;
}

/* Upload form */
.hydrop-upload-form {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.9) 100%);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: var(--hydrop-checker-radius-lg);
  margin: 2rem 0;
  text-align: left;
  box-shadow: var(--hydrop-shadow-md);
  position: relative;
}

.hydrop-upload-form::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--hydrop-checker-radius-lg);
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.1) 100%);
  pointer-events: none;
}

.hydrop-upload-form h4 {
  color: var(--hydrop-checker-primary);
  margin: 0 0 1rem 0;
}

.hydrop-form-group {
  margin-bottom: 1.5rem;
}

.hydrop-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--hydrop-checker-text);
}

.hydrop-form-group input[type="email"] {
  width: 100%;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
  backdrop-filter: blur(5px);
  border-radius: var(--hydrop-checker-radius);
  font-size: 1rem;
  transition: var(--hydrop-checker-transition);
  box-sizing: border-box;
  border: none;
  box-shadow: var(--hydrop-shadow-sm), inset 0 0 0 2px rgba(2, 60, 131, 0.1);
}

.hydrop-form-group input[type="email"]:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--hydrop-shadow-md), 0 0 0 3px rgba(2, 60, 131, 0.1), inset 0 0 0 2px rgba(2, 60, 131, 0.2);
  transform: translateY(-1px);
}

.hydrop-file-upload {
  position: relative;
  display: inline-block;
  width: 100%;
}

.hydrop-file-upload input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.hydrop-file-upload-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(248, 250, 252, 0.5) 100%);
  backdrop-filter: blur(5px);
  border-radius: var(--hydrop-checker-radius);
  cursor: pointer;
  transition: var(--hydrop-checker-transition);
  text-align: center;
  box-shadow: var(--hydrop-shadow-sm), inset 0 0 0 2px rgba(2, 60, 131, 0.1);
  position: relative;
  overflow: hidden;
}

.hydrop-file-upload-text::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 60, 131, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: var(--hydrop-checker-transition);
}

.hydrop-file-upload:hover .hydrop-file-upload-text {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
  box-shadow: var(--hydrop-shadow-md), inset 0 0 0 2px rgba(2, 60, 131, 0.2);
  transform: translateY(-2px);
}

.hydrop-file-upload:hover .hydrop-file-upload-text::before {
  opacity: 1;
}

.hydrop-file-upload-icon {
  font-size: 2rem;
  margin-right: 0.5rem;
}

.hydrop-form-group small {
  color: rgba(55, 65, 81, 0.8); /* Darker color for better contrast */
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.hydrop-upload-result {
  padding: 1rem;
  border-radius: var(--hydrop-checker-radius);
  margin-top: 1rem;
}

.hydrop-upload-result.success {
  background: linear-gradient(135deg, rgba(3, 224, 110, 0.15) 0%, rgba(2, 197, 95, 0.1) 100%);
  color: var(--hydrop-checker-accent-dark);
  backdrop-filter: blur(5px);
  box-shadow: var(--hydrop-shadow-sm), inset 0 0 0 1px rgba(3, 224, 110, 0.2);
}

.hydrop-upload-result.error {
  background: linear-gradient(135deg, rgba(2, 60, 131, 0.1) 0%, rgba(0, 121, 198, 0.05) 100%);
  color: var(--hydrop-checker-primary);
  backdrop-filter: blur(5px);
  box-shadow: var(--hydrop-shadow-sm), inset 0 0 0 1px rgba(2, 60, 131, 0.15);
}

/* Buttons - High specificity to override WordPress theme styles */
.hydrop-checker .hydrop-btn,
.hydrop-checker button.hydrop-btn,
.hydrop-checker input[type="button"].hydrop-btn,
.hydrop-checker input[type="submit"].hydrop-btn,
.hydrop-checker a.hydrop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--hydrop-checker-radius);
  cursor: pointer;
  text-decoration: none;
  transition: var(--hydrop-checker-transition);
  min-height: 48px;
  gap: 0.5rem;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.5;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  outline: none;
  appearance: none;
  text-transform: none;
  position: relative;
  overflow: hidden;
}

.hydrop-checker .hydrop-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: var(--hydrop-checker-transition-fast);
}

.hydrop-checker .hydrop-btn:hover::before {
  opacity: 1;
}

.hydrop-checker .hydrop-btn:disabled,
.hydrop-checker button.hydrop-btn:disabled,
.hydrop-checker input[type="button"].hydrop-btn:disabled,
.hydrop-checker input[type="submit"].hydrop-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.hydrop-checker .hydrop-btn-primary,
.hydrop-checker button.hydrop-btn-primary,
.hydrop-checker input[type="button"].hydrop-btn-primary,
.hydrop-checker input[type="submit"].hydrop-btn-primary,
.hydrop-checker a.hydrop-btn-primary {
  background: var(--hydrop-gradient-primary) !important;
  color: white !important;
  text-transform: none !important;
  box-shadow: var(--hydrop-shadow-md) !important;
}

.hydrop-checker .hydrop-btn-primary:hover:not(:disabled),
.hydrop-checker button.hydrop-btn-primary:hover:not(:disabled),
.hydrop-checker input[type="button"].hydrop-btn-primary:hover:not(:disabled),
.hydrop-checker input[type="submit"].hydrop-btn-primary:hover:not(:disabled),
.hydrop-checker a.hydrop-btn-primary:hover {
  background: linear-gradient(135deg, #01205f 0%, #023c83 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--hydrop-shadow-lg) !important;
  text-decoration: none !important;
  color: white !important;
}

.hydrop-checker .hydrop-btn-primary:active:not(:disabled) {
  transform: translateY(0px) !important;
  box-shadow: var(--hydrop-shadow-sm) !important;
}

.hydrop-checker .hydrop-btn-secondary,
.hydrop-checker button.hydrop-btn-secondary,
.hydrop-checker input[type="button"].hydrop-btn-secondary,
.hydrop-checker input[type="submit"].hydrop-btn-secondary,
.hydrop-checker a.hydrop-btn-secondary {
  background: var(--hydrop-gradient-soft) !important;
  color: var(--hydrop-checker-text) !important;
  text-transform: none !important;
  box-shadow: var(--hydrop-shadow-sm) !important;
}

.hydrop-checker .hydrop-btn-secondary:hover:not(:disabled),
.hydrop-checker button.hydrop-btn-secondary:hover:not(:disabled),
.hydrop-checker input[type="button"].hydrop-btn-secondary:hover:not(:disabled),
.hydrop-checker input[type="submit"].hydrop-btn-secondary:hover:not(:disabled),
.hydrop-checker a.hydrop-btn-secondary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.9) 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--hydrop-shadow-md) !important;
  text-decoration: none !important;
  color: var(--hydrop-checker-text) !important;
}

.hydrop-checker .hydrop-btn-accent,
.hydrop-checker button.hydrop-btn-accent,
.hydrop-checker input[type="button"].hydrop-btn-accent,
.hydrop-checker input[type="submit"].hydrop-btn-accent,
.hydrop-checker a.hydrop-btn-accent {
  background: var(--hydrop-gradient-accent) !important;
  color: white !important;
  text-transform: none !important;
  box-shadow: var(--hydrop-shadow-md) !important;
}

.hydrop-checker .hydrop-btn-accent:hover:not(:disabled),
.hydrop-checker button.hydrop-btn-accent:hover:not(:disabled),
.hydrop-checker input[type="button"].hydrop-btn-accent:hover:not(:disabled),
.hydrop-checker input[type="submit"].hydrop-btn-accent:hover:not(:disabled),
.hydrop-checker a.hydrop-btn-accent:hover {
  background: linear-gradient(135deg, #02c55f 0%, #03e06e 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--hydrop-shadow-lg), 0 0 20px rgba(3, 224, 110, 0.3) !important;
  text-decoration: none !important;
  color: white !important;
}

.hydrop-checker .hydrop-btn-large,
.hydrop-checker button.hydrop-btn-large,
.hydrop-checker input[type="button"].hydrop-btn-large,
.hydrop-checker input[type="submit"].hydrop-btn-large,
.hydrop-checker a.hydrop-btn-large {
  padding: 1.125rem 2.25rem !important;
  font-size: 1.125rem !important;
  text-transform: none !important;
}

/* Correct loading state handling */
.hydrop-checker .hydrop-btn.loading .hydrop-btn-text {
  display: none !important;
}

.hydrop-checker .hydrop-btn:not(.loading) .hydrop-btn-loading {
  display: none !important;
}

/* Navigation */
.hydrop-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
  flex-shrink: 0; /* Ensure navigation never shrinks */
  z-index: 10;
  position: relative;
  background: transparent; /* Remove background to eliminate hard edge */
  padding: 1.5rem 0 0.5rem 0; /* Add bottom padding for better spacing */
  min-height: 60px; /* Ensure minimum height for navigation area */
}

/* Ensure Next button stays on the right when Previous is hidden */
#hydrop-next-btn {
  margin-left: auto;
}

/* When both buttons are visible, override the margin */
#hydrop-prev-btn:not([style*="display: none"]) ~ #hydrop-next-btn {
  margin-left: 0;
}

.hydrop-restart-btn {
  margin-top: 1rem;
}

/* Loading */
.hydrop-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--hydrop-checker-radius-lg);
  z-index: 10;
}

.hydrop-loading-content {
  text-align: center;
}

.hydrop-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid transparent;
  border-top: 4px solid var(--hydrop-checker-primary);
  border-right: 4px solid var(--hydrop-checker-primary-light);
  border-radius: 50%;
  animation: hydrop-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
  box-shadow: 0 0 20px rgba(2, 60, 131, 0.15);
  position: relative;
}

.hydrop-spinner::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(2, 60, 131, 0.1) 0%, transparent 70%);
  animation: hydrop-spin 1.6s linear infinite reverse;
}

@keyframes hydrop-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Confetti canvas */
.hydrop-confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* Success animation */
@keyframes hydrop-success-bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -30px, 0);
  }
  70% {
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0, -4px, 0);
  }
}

.hydrop-results.success .hydrop-results-icon {
  animation: hydrop-success-bounce 1s ease;
}

/* Consolidated mobile adjustments (<=768px) */
@media (max-width: 768px) {
  .hydrop-question-title { font-size: 1.125rem; }
  .hydrop-question { overflow: visible; } /* Ensure shadows not clipped */
  .hydrop-question-content { overflow: visible; } /* Ensure shadows not clipped */
  .hydrop-meter-options { 
    grid-template-columns: 1fr; 
    gap: 1rem; /* Increased vertical gap between cards */
    padding: 1rem 1rem; /* Increased horizontal padding on mobile */
    margin: 1rem 0 0 0; /* Remove negative margins on mobile */
    overflow-x: visible; /* Allow shadows to show on sides */
    overflow-y: auto; /* Keep vertical scrolling */
    
    /* Hide scrollbar on mobile */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  .hydrop-meter-options::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  .hydrop-option-content { padding: 0.875rem; }
  .hydrop-meter-option .hydrop-option-content { padding: 0.875rem; gap: 0.75rem; }
  .hydrop-meter-image { width: 50px; height: 50px; }
  .hydrop-meter-option .hydrop-option-check { width: 18px; height: 18px; top: 0.625rem; right: 0.625rem; }
  .hydrop-upload-form { padding: 1.5rem; }
  .hydrop-navigation { gap: 0.75rem; margin-top: 1.5rem; padding: 0.75rem 0; min-height: 70px; }
  .hydrop-checker .hydrop-btn,
  .hydrop-checker button.hydrop-btn,
  .hydrop-checker input[type="button"].hydrop-btn,
  .hydrop-checker input[type="submit"].hydrop-btn,
  .hydrop-checker a.hydrop-btn { flex: 1; justify-content: center; }
  .hydrop-file-upload-icon { margin: 0; }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hydrop-option-content {
    border-width: 3px;
  }
  
  .hydrop-btn {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hydrop-question {
    transform: none;
  }
  
  .hydrop-question.active {
    transform: none;
  }
}

/* Upload Mode Styles - Hide unnecessary elements and optimize layout */
.hydrop-checker.upload-mode {
  min-height: auto; /* Content-driven height for upload mode */
  height: auto;
  max-height: none;
}

.hydrop-checker.upload-mode .hydrop-checker-title,
.hydrop-checker.upload-mode .hydrop-checker-description,
.hydrop-checker.upload-mode .hydrop-progress-container {
  display: none;
}

.hydrop-checker.upload-mode .hydrop-questions-container {
  min-height: auto;
  max-height: none;
  overflow: visible;
  flex: 1;
}

.hydrop-checker.upload-mode .hydrop-results {
  padding: 0.5rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: static;
  opacity: 1;
  transform: none;
  height: auto;
}

.hydrop-checker.upload-mode .hydrop-results-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.hydrop-checker.upload-mode .hydrop-results-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.hydrop-checker.upload-mode .hydrop-results-reason {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.hydrop-checker.upload-mode .hydrop-results-action {
  display: none; /* Hide the redundant button */
}

.hydrop-checker.upload-mode .hydrop-upload-form {
  margin: 0.5rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.9) 100%);
  backdrop-filter: blur(10px);
  border-radius: var(--hydrop-checker-radius-lg);
  flex-shrink: 0;
  position: relative;
  box-shadow: var(--hydrop-shadow-md);
}

.hydrop-checker.upload-mode .hydrop-upload-form::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--hydrop-checker-radius-lg);
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.1) 100%);
  pointer-events: none;
}

.hydrop-checker.upload-mode .hydrop-upload-form form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hydrop-checker.upload-mode .hydrop-upload-form button[type="submit"] {
  /* Reset inherited styles */
  all: unset;
  /* Apply specific styles with high priority */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: stretch !important;
  margin-top: 0.5rem !important;
  padding: 0.875rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border: none !important;
  border-radius: var(--hydrop-checker-radius) !important;
  transition: var(--hydrop-checker-transition) !important;
  box-shadow: var(--hydrop-shadow-md) !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  line-height: 1.5 !important;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background: var(--hydrop-gradient-primary) !important;
  color: white !important;
}

.hydrop-checker.upload-mode .hydrop-upload-form button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-1px) !important;
  box-shadow: var(--hydrop-shadow-lg) !important;
  background: linear-gradient(135deg, #01205f 0%, #023c83 100%) !important;
  color: white !important;
  text-decoration: none !important;
}

.hydrop-checker.upload-mode .hydrop-upload-form button[type="submit"] {
  float: right !important;
  margin-left: auto !important;
}

.hydrop-checker.upload-mode .hydrop-upload-form h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--hydrop-checker-primary);
}

.hydrop-checker.upload-mode .hydrop-upload-form p {
  font-size: 0.875rem;
  margin-bottom: 0;
  color: var(--hydrop-checker-text-light);
  line-height: 1.5;
}

.hydrop-checker.upload-mode .hydrop-form-group {
  margin-bottom: 0; /* Remove margin since we're using gap in the flex container */
}

.hydrop-checker.upload-mode .hydrop-form-group:last-of-type {
  margin-bottom: 0; /* Remove margin since we're using gap in the flex container */
}

.hydrop-checker.upload-mode .hydrop-file-upload-text {
  padding: 1.25rem;
  border-radius: var(--hydrop-checker-radius);
  transition: var(--hydrop-checker-transition);
}

.hydrop-checker.upload-mode .hydrop-file-upload:hover .hydrop-file-upload-text {
  box-shadow: var(--hydrop-shadow-md), inset 0 0 0 2px rgba(2, 60, 131, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
}

.hydrop-checker.upload-mode .hydrop-restart-btn {
  margin-top: 0.75rem;
  flex-shrink: 0;
}

/* Mobile optimization for upload mode */
@media (max-width: 768px) {
  .hydrop-checker.upload-mode {
    padding: 1rem; /* Consistent with main mobile padding */
    min-height: auto; /* Content-driven height on mobile upload mode */
  }
  
  .hydrop-checker.upload-mode .hydrop-upload-form {
    padding: 1.25rem;
    margin: 0.5rem 0;
  }
  
  .hydrop-checker.upload-mode .hydrop-upload-form form {
    gap: 1rem; /* Slightly smaller gap on mobile */
  }
  
  .hydrop-checker.upload-mode .hydrop-file-upload-text {
    padding: 1rem;
    font-size: 0.875rem;
  }
  
  .hydrop-checker.upload-mode .hydrop-file-upload-icon {
    font-size: 1.5rem;
  }
  
  .hydrop-checker.upload-mode .hydrop-results-icon {
    font-size: 2rem;
  }
  
  .hydrop-checker.upload-mode .hydrop-upload-form button[type="submit"] {
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
  }
}

/* Extra small screens - ensure navigation is always visible */
@media (max-width: 480px) {
  .hydrop-questions-container {
    min-height: auto; /* Content-driven height */
    max-height: none; /* Remove viewport constraints */
    overflow: visible; /* Never hide content */
  }
  
  .hydrop-navigation {
    margin-top: 1rem;
    padding: 0.5rem 0 0.75rem 0;
    min-height: 65px;
  }
  
  .hydrop-checker .hydrop-btn {
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
  }
}

/* Very short screens - content-driven approach */
@media (max-height: 600px) {
  .hydrop-checker { min-height: auto; }
  .hydrop-questions-container { max-height: none; min-height: auto; overflow: visible; }
  .hydrop-navigation { padding: 0.5rem 0; }
}

/* Ensure smooth scrolling within questions container */
.hydrop-questions-container { scroll-behavior: smooth; }

/* Ensure navigation buttons have adequate touch targets */
.hydrop-navigation .hydrop-btn { min-height: 44px; min-width: 88px; }

/* High contrast border for navigation on problematic backgrounds */
@media (prefers-contrast: high) {
  .hydrop-navigation { border-top: 2px solid var(--hydrop-checker-text); }
}