/* ===== BASE STYLES ===== */
:root {
  --primary: #2563eb;
  --secondary: #1d4ed8;
  --accent: #eb7725;
  --light: #f8fafc;
  --dark: #1042af;
  --text-secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-button: 0 4px 12px rgba(37, 99, 235, 0.25);
  --border-radius-sm: 9px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.2s ease-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-image: url("/images/leopardBackground-faded.jpg");
  background-repeat: cover;
  background: #0d5dadf;
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Silktide Cookie Manager Styling ===== */
/* ===== Cookie Consent Banner ===== */
#silktide-banner {
    padding: 1.5rem;
    bottom: 1rem;
    right: 1rem;
    width: clamp(320px, 44vw, 540px);
}

#silktide-banner p {
    font-size: .8rem;
    line-height: 1.1rem;
    margin: 0px 0px 16px;
}

#silktide-banner .preferences{
    font-size: 1rem;
}

/* Cookie Consent Modal */
#silktide-modal {
    width: clamp(340px, 44vw, 560px);
    max-width: 44vw;
    max-height: 100%;
    padding: 2rem;
}

#silktide-modal section {
}

#silktide-modal h1 {
    font-size: 1.5rem;
    font-weight: 600;
}
#silktide-modal p {
    font-size: .8rem;
    line-height: 1.1rem;
    color: var(--textColor);
}

#silktide-modal .modal-close {
  display: inline-flex;
  border: none;
  padding: 6px;
  border: 0px;
  cursor: pointer;
  background: var(--backgroundColor);
  color: var(--primaryColor);
}

#silktide-modal .switch {
    flex-shrink: 0;
    position: relative;
    display: inline-block;
    height: 28px;
    width: 71px;
}

#silktide-modal .switch__pill {
    position: relative;
    display: block;
    height: 26px;
    width: 67px;
    background: var(--textColor);
    border-radius: 24px;
}

#silktide-modal .switch:focus-within {
  outline: none;
  box-shadow: none;
}

#silktide-modal .switch__dot {
    position: absolute;
    top: 1px;
    left: 2px;
    display: block;
    height: 24px;
    width: 24px;
    background: var(--backgroundColor);
    border-radius: 50%;
    transition: left 150ms 
ease-out;
}

#silktide-modal .switch input:checked ~ .switch__dot {
    left: calc(100% - 29px);
}

#silktide-modal .switch__off, #silktide-modal .switch__on {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    color: var(--backgroundColor);
    position: absolute;
    top: 3px;
    right: 15px;
    transition: right 150ms ease-out, opacity 150ms ease-out;
}

#silktide-wrapper .st-button {
    padding: 6px 12px;
    line-height: 1.1rem;
}

/* Cookie Consent Icon */
#silktide-cookie-icon {
    bottom: .6rem;
    left
    : .6rem;
    width: 1.8rem;
    height: 1.8rem;
}

#silktide-cookie-icon svg {
    width: 1.2rem;
    height: 1.2
    rem;
}
/* ===== PRIMARY CONTENT STYLING ===== */
.container {
  max-width: 48vw;
  margin: 5vh auto;
  padding: clamp(20px, 2vw, 30px);
  background-image: linear-gradient(350deg, #c4c5c7 10%, #dcdddf 65%, #ededed 100%);
  border: solid #9b9b9b;
  border-width: 2px 6px 4px 2px;
  border-radius: var(--border-radius-md);
  box-shadow: 
    rgba(0, 0, 0, 0.25) 0 54px 55px, 
    rgba(0, 0, 0, 0.12) 0 -12px 30px, 
    rgba(0, 0, 0, 0.12) 0 4px 6px, 
    inset rgba(0, 0, 0, 0.17) -8px -8px 12px -8px, 
    inset rgba(0, 0, 0, 0.09) 0 -3px 5px
}

@media (max-width: 767px) {
  .container {
    max-width: 90vw;
  }    
}


header {
  text-align: center;
  margin-bottom: clamp(24px, 4vh, 48px);
  color: var(--dark);
}

header h1 {
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--dark);
}

header p {
  font-size: clamp(15px, 3.5vw, 16px);
  color: var(--text-secondary);
}

/* Outer container */
.footer-container {
  width: 100%;
  background-color: #fafafa52;
  padding: 2rem;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: #555;
}

.footer-container::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: #ebebeb;
  margin-bottom: 1rem;
}

/* Inner flex container */
.footer-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.footer-nav,
.footer-contact,
.footer-copy {
  align-items: center;
  width: 100%;  /* Full width on mobile */
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;  /* Stack items vertically */
  align-self: center;
  text-align: center;
  font-weight: 500;
  width: 30%;
}

.footer-nav a {
  color: #444;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #000;
}

.footer-nav span {
  color: #999;
  display: block;          /* Make bullets appear on their own line */
  text-align: center;      /* Center the bullets */
  margin: -0.25rem 0;       /* Add some vertical spacing */
}

.footer-disclaimer {
  color: #777;
  padding: 0 10px;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.4;
}

.footer-contact {
  color: var(--secondary);
  padding: 0 10px;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.4;
}

.disclaimer {
  font-size: .65rem;
  font-style: italic;
   text-align: center;
}

.footer-copy {
  color: #666;
  font-size: 0.65rem;
  text-align: center;
}

.footer-copy a {
    text-decoration: none;
}
/* ==============================
   RESPONSIVE BEHAVIOR
============================== */
@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    align-items: center;
  }

  .footer-nav,
  .footer-contact,
  .footer-copy {
    flex: 1;  /* Each takes equal space */
    width: auto;
  }
  
  .footer-nav {
    order: 1;
  }
  
  .footer-contact {
    flex: 1;
    order: 2;
    min-width:40vw;
    border-left: 1px solid #b9b9b9;
    border-right: 1px solid #b9b9b9;   
  }
  
  .footer-copy {
    order: 3;
  }
}

/* =========================
   FOOTER MODAL STYLES
========================= */
.footer-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-modal.show {
  display: block;
  opacity: 1;
}

/* Modal content box */
.footer-modal-content {
  background: #111b40b0;
  color: #dddddd;
  border: 2px solid #111b40;
  max-width: 700px;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.3s ease;
}

/* Active animation state */
.footer-modal.show .footer-modal-content {
  transform: translateY(0);
  opacity: 1;
}

/* Close button */
#footerModalClose {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #c9c9c9;
  transition: color 0.2s ease;
}

#footerModalClose:hover {
  color: #000;
}

#footerModalTitle {
  margin-top: 0;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.footer-modal-body {
  white-space: pre-wrap;
  line-height: 1.25;
  font-size: 0.85rem;
}

@media (max-width: 767px) {
  .footer-modal-content {
      max-width: 90vw;
      
  }
}

/* ===== TOGGLE SWITCH — MODERN SLIDER STYLE (FINAL) ===== 092725 1235 */
.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.2vw, 32px);
  margin: clamp(8px, 0.7vw, 10px) auto;
  padding: clamp(8px, 1vw, 14px);
  background: linear-gradient(55deg, #f8f8f8 0%, #e8e8e8 25%, #f8f8f8 90%);
  border: 2.5px solid #C4C5C7;
  border-radius: var(--border-radius-sm);
  border-style: ridge;
  font-size: 1.2rem;
    
}

@media (min-width: 992px) {
  .toggle-container {
    width: 85%;
  }
}

.toggle-label {
  font-size: clamp(14px, 3vw, 18px); 
  text-align: center;
  transition: color 0.3s ease, font-weight 0.3s ease; /* ✅ smooth color + weight change */
  cursor: url('../static/paw_grey.png') 10 10, auto !important;
}

.toggle-label.label-left {
  color: #7e5002;
  font-weight: 700;
  text-shadow: 1px 1px 1px #eb7725a8;
}

.toggle-label.label-right {
  color: var(--text-secondary);
  font-weight: 700;
  text-shadow: 1px 1px 1px #028f817d;
}

/* ✅ ✅ ✅ MAGIC: Use :has() to style siblings based on input state */
.toggle-container:has(.toggle-switch input:checked) .toggle-label.label-left {
  color: var(--text-secondary);
  font-weight: 700;
}

.toggle-container:has(.toggle-switch input:checked) .toggle-label.label-right {
  color: #028f81;
  font-weight: 700;
  text-shadow: 1px 1px 1px #028f817d;
}

@media (min-width: 768px) {
  .toggle-label  {
      min-width: 100px;  
  }
}
  
/* ===== TOGGLE SWITCH ELEMENT ===== */
.toggle-switch {
  display: flex;
  align-items: center;
  cursor: url('../static/paw_grey.png') 10 10, auto !important;
  user-select: none;
  gap: 8px;
}

.toggle-switch:hover,
  label[for="calcModeToggle"]:hover,
  input[type="radio"]:hover,
  select:hover,
  button:hover,
  #moreInfo:hover,
  #resetAll:hover {
  filter: brightness(1.1) saturate(1.1);
  transition: filter 0.2s ease;
}

.toggle-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: relative;
  width: clamp(70px, 18vw, 110px); /* ✅ Was 100px */
  height: clamp(30px, 2.7vw, 34px);
  background-color: #eb7725;
  border-radius: 9999px;
  transition: var(--transition);
  cursor: url('../static/paw_grey.png') 10 10, auto;
  box-shadow: inset 0 1px 4px 1px rgba(44, 45, 46, 0.6)
}

.slider:before {
  content: "";
  position: absolute;
  width: clamp(28px, 2.55vw, 32px);
  height: clamp(28px, 2.55vw, 32px);
  border-radius: 50%;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  transition: var(--transition);
}

.toggle-switch input:checked + .slider {
  background-color: #028f81;
  box-shadow: inset 0 1px 4px 1px rgba(44, 45, 46, 0.6);
}

.toggle-switch input:checked + .slider:before {
  left: auto; /* ✅ Remove left */
  right: 0;   /* ✅ Anchor to right */
  transform: translateY(-50%); /* ✅ Keep vertical center */
}

/* ===== FORM STYLES ===== */
.form-group {
  position: relative;
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--secondary);
  font-size: 1.1rem;
}

/* ===== SCROLLABLE SPECIES CHIPS ===== */
.species-chips-container {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: clamp(20px, 2vw, 25px);
  margin-bottom: clamp(20px, 2.5vw, 30px);
}

.species-chips {
  display: flex;
  gap: clamp(6px, 1.2vw, 10px);
  padding: clamp(6px, .65vw, 8px) 30px; /* ← 30px padding on left/right */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-height: clamp(40px, 4vw, 70px);
  scrollbar-width: none;
  -ms-overflow-style: none;
  border: 4px solid #C4C5C7;
  border-radius: var(--border-radius-sm);
  border-style: ridge;
  box-shadow: inset 0 0 8px 2px rgba(0,0,0,0.6);
  background: #7b7d82;
  position: relative;
}

.species-chips::-webkit-scrollbar {
  display: none;
}

/* ✅ FADES: on container (static) */
.species-chips-container::before,
.species-chips-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(20px, 4.5vw, 65px);
  pointer-events: none;
  z-index: 1;
}

.species-chips-container::before {
  left: 0;
  background: linear-gradient(to right, 
    #B0B1B4 10%, #7b7e83b5 25%, #DBDBDB0d 100%);
}

.species-chips-container::after {
  right: 0;
  background: linear-gradient(to left, 
    #B0B1B4 10%, #7b7e83b5 25%, #DBDBDB0d 100%);
}

/* ✅ ARROWS: on container (static) */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-55%);
  font-size: clamp(30px, 4.8vw, 60px);
  color: rgb(232 232 232 / 50%);
  z-index: 2;
  transition: opacity 0.75s ease;
}

.scroll-arrow.left {
  left: clamp(8px, 1.8vw, 12px);
}

.scroll-arrow.right {
  right: clamp(8px, 1.8vw, 12px);
}

/* Mobile: non-interactive */
@media (hover: none) and (pointer: coarse) {
  .scroll-arrow {
    opacity: 0.6;
    pointer-events: none;
  }
}

/* Desktop: interactive */
@media (hover: hover) and (pointer: fine) {
  .scroll-arrow {
    pointer-events: auto;
    cursor: pointer;
    opacity: 0.6;
  }
  .scroll-arrow:hover {
    opacity: 0.9;
  }
  .scroll-arrow.disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
}

.species-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, .65vw, 10px);
  padding: clamp(8px, .6vw, 10px);
  border-radius: var(--border-radius-sm);
  background: linear-gradient(180deg, #f0f0f0 0%, #d8d8d8 20%, #f0f0f0 90%);
  border: 1px solid #b0b0b0;
  font-size: clamp(1rem, 3vw, 1.1rem);
  font-weight: 500;
  color: var(--dark);
  min-width: clamp(90px, 9.5vw, 140px);
  text-align: center;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.species-chip input[type="radio"] {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
  -moz-appearance: none;
  -webkit-appearance: none; /* ✅ KILLS native iOS radio */
  appearance: none;
  pointer-events: none; /* ✅ Prevents touch interference */
}

.species-chip:has(input:checked) {
  background: var(--primary);
  color: white;
  border-color: #1d4ed8;
  box-shadow: 
    0 4px 12px rgba(37, 99, 235, 0.4),
    inset 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  transform: translateY(-1px);
}

.species-chip:hover {
  background: linear-gradient(180deg, #e0e0e0 0%, #f8f8f8 40%, #e0e0e0 90%);
  transform: scale(1.04,1.04);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

/* ===== BREED INPUT CONTAINER — RESPONSIVE LAYOUT ===== */
.breed-input-container {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.0vw, 16px);
  width: 100%;
  margin-bottom: clamp(6px, 0.65vw, 12px);
  justify-content: flex-end;
  position: relative; /* ✅ CRITICAL — enables absolute positioning of .help-text */
}

.breed-input-container label {
  flex-shrink: 0; /* Prevent label from shrinking */
  font-weight: 600;
  color: #1042af;
  font-size: 1rem;
  white-space: nowrap; /* Keep label on one line */
}

/* ===== BREED SELECT ===== */
.breed-input-container select {
  flex: 0 0 clamp(240px, 50vw, 380px);
  width: 100%;
  padding: clamp(10px, 1.2vw, 15px);
  border: 1px solid #a8a8a8;
  border-radius: var(--border-radius-sm);
  font-size: clamp(1rem, 3vw, 1.1rem);
  /* Use background-color instead of background shorthand */
  background-color: #e8e8e8; /* Fallback solid color */
  background-image: 
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%23666'><path d='M6 9l4 4 4-4z'/></svg>"),
    linear-gradient(180deg, #e0e0e0 0%, #f8f8f8 40%, #e0e0e0 90%);
  background-repeat: no-repeat, no-repeat;
  background-position: 
    right clamp(4px, 0.4vw, 12px) center,
    0 0;
  background-size: 
    clamp(20px, 2.4vw, 36px),
    100% 100%;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  color: #1042af;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none; /* For Safari */
  -moz-appearance: none; /* For Firefox */
}

/* Focus state */
.breed-input-container select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 0 3px rgba(37, 99, 235, 0.2);
}

#breedSpinner.spinner {
  position: absolute;
  top: 100%; /* Position below the select */
  left: 50%;
  transform: translateX(-50%);
  display: none;
  text-align: center;
  margin-top: 8px;
}

#breedSpinner.spinner img {
  vertical-align: middle;
  display: block;
}

/* Compact spinner using your existing animation */
#breedSpinner.spinner .compact-spin {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: var(--primary-color, #007bff);
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
  -webkit-animation: spin 1s ease-in-out infinite;
  display: inline-block;
}

/* Alternative: Keep the emoji but add animation */
#breedSpinner.spinner:not(:has(.compact-spin)) {
  font-size: 16px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.help-text {
  font-size: 0.85rem;
  color: #777;
  font-style: italic;
  position: absolute; /* ✅ Takes it out of normal flow */
  top: -24px;         /* ✅ Lifts it above the label */
  left: 0;
  right: 0;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 5; /* Ensures it appears above other elements */
}

/* ✅ SHOW help text ONLY when: */
/* 1. User hovers OR focuses on breed select */
/* 2. AND no species is selected (data attribute = "true") */
#breed:focus + .help-text,
#breed:hover + .help-text,
#breed[data-no-species-selected="true"]:focus + .help-text,
#breed[data-no-species-selected="true"]:hover + .help-text {
  opacity: 1;
  visibility: visible;
}

/* ✅ Hide help text if species is selected */
#breed[data-no-species-selected="false"] + .help-text {
  opacity: 0;
  visibility: hidden;
}

/* Optional: Fade out */
.help-text.fade {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ✅ MOBILE: Stack label above dropdown */
@media (max-width: 767px) {
  .species-chips::after {
    display: block; /* Keep it — it’s helpful */
  }

  .form-group {
    margin-bottom: clamp(16px, 3vw, 24px);
  }

  .help-text {
    margin-top: 4px;
    margin-bottom: clamp(6px, 1.5vw, 10px);
  }
  
  .breed-input-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .breed-input-container label {
    width: 100%;
    text-align: left;
  }

  .breed-input-container select {
    flex: 1 1 100%; /* ✅ Full width on mobile */
    min-width: 100%;
  }
  
  .container {
    padding: clamp(16px, 5vw, 24px);
  }

  .form-grid {
    flex-direction: column;
  }

  .input-panel,
  .results-panel {
    width: 100%;
  }

  .age-input-row { 
    justify-content: space-evenly
  }

  .input-field {  /* ✓ Add this */
    width: 100%;
    justify-content: space-evenly;
  }

  .input-field label {  /* ✓ was .input-row label */
    min-width: auto;
    margin-bottom: 4px;
  }

    .footer-nav span {
    display: none; /* hides separators on small screens */
  }

  .footer-nav a {
    display: block;
    margin: 0.2rem 0;
  }
}

select {
  width: 100%;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  background: white;
  color: var(--dark);
  transition: var(--transition);
}

select:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.7;
}

select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

/* ===== FORM GRID LAYOUT ===== */
.form-grid {
  display: flex;
  gap: clamp(12px, 1.5vw, 20px);
  margin: clamp(25px, 4vw, 40px) 0;
  margin-bottom: 0;
  justify-content: center;
  align-items: start;
}

.input-panel,
.results-panel {
  flex: 1;
  min-width: 14vw;
  max-width: 21vw;
  width: 100%;
  min-height: clamp(180px, 18vw, 225px);
}

.input-panel h3 {
  text-align: center;
}

.results-placeholder {
  background: #f9fbff;
  text-align: center;
  color: #aaa;
}

.results-section {
  text-align: center;
}

/* HIDE placeholder when results show */
#results {
  display: none;
}

#results.show {
  display: block;
}

#results-placeholder {
  display: block;
}

#results.show ~ #results-placeholder {
  display: none;
}

/* RESPONSIVE: Stack on mobile */
@media (max-width: 767px) {
  .form-grid {
    flex-direction: column;
    gap: 20px;
  }

  .input-panel,
  .results-panel {
    max-width: none;
    width: 100%;
  }
}

/* ===== INPUT FIELDS ===== */
.age-input-row {
  display: flex;
  gap: clamp(4px, 0.5vw, 6px);
  margin-bottom: clamp(16px, 3vw, 24px);
  align-items: center;
}

.input-field {
  display: flex; 
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
}

.input-field label {
  font-size: .85rem;
  color: var(--dark);
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
}

/* ===== SELECT DROPDOWN STYLES ===== */
select {
  padding: clamp(10px, 1.2vw, 15px);
  border: 1px solid #a0a0a0;
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  color: var(--dark);
  background: linear-gradient(180deg, #e8e8e8 0%, #f5f5f5 100%);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.5);
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 0 3px rgba(37, 99, 235, 0.2);
}

.input-field input[type="number"] {
  width: clamp(45px, 4.5vw, 60px);
  padding: clamp(6px, 0.6vw, 8px);
  border: 1px solid #ddd;
  border-radius: var(--border-radius-sm);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.5);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: #2204c5;
  text-align: center;
  transition: var(--transition);
  box-sizing: border-box;
}

.input-field input[type="number"]:focus {
  border-color: var(--primary);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.5);
}

.input-section,
.results-placeholder,
.results-section {
  min-height: inherit;
  background: linear-gradient(55deg, #f8f8f8 0%, #e8e8e8 25%, #f8f8f8 90%);
  border: 2.5px solid #C4C5C7;
  border-radius: var(--border-radius-md);
  border-style: ridge;
  padding: clamp(12px, 1.5vw, 18px);
}

.input-section h2 {
  margin-bottom: clamp(16px, 3vw, 24px);
  color: var(--dark);
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  font-weight: 600;
  text-align: center;
}

.btn-primary {
  width: 100%;
  align-items: center;
  appearance: none;
  background-image: radial-gradient(100% 100% at 100% 0, #5adaff 0, #1042af 115%);
  border: 0;
  border-radius: 6px;
  box-shadow: rgba(45, 35, 66, .4) 0 2px 4px,rgba(45, 35, 66, .3) 0 7px 13px -3px,rgba(58, 65, 111, .5) 0 -3px 0 inset;
  box-sizing: border-box;
  color: #fff;
  cursor: url('../static/paw_grey.png') 10 10, auto;
  display: inline-flex;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 600;
  height: 48px;
  justify-content: center;
  line-height: 1;
  list-style: none;
  overflow: hidden;
  padding: clamp(12px, 1.2vw, 16px);
  position: relative;
  text-align: left;
  text-decoration: none;
  transition: box-shadow .15s,transform .15s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  will-change: box-shadow,transform;
}

.btn-primary:focus {
  box-shadow: #3c4fe0 0 0 0 1.5px inset, rgba(45, 35, 66, .4) 0 2px 4px, rgba(45, 35, 66, .3) 0 7px 13px -3px, #3c4fe0 0 -3px 0 inset;
}

.btn-primary:hover {
  box-shadow: rgba(45, 35, 66, .4) 0 4px 8px, rgba(45, 35, 66, .3) 0 7px 13px -3px, #3c4fe0 0 -3px 0 inset;
  transform: translateY(-2px);
}

.btn-primary:active {
  box-shadow: #3c4fe0 0 3px 7px inset;
  transform: translateY(2px);
}

.btn-secondary {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  font-size: 0.95rem;
  min-height: 44px;
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

/* ===== RESULTS ===== */
.results-section h2 {
  color: var(--dark);
  margin-bottom: 15px;
  font-weight: 600;
}

/* Loading spinner styles */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 16px;
}

.spin {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  -webkit-animation: spin 1s ease-in-out infinite;
}

.loading-text {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

@keyframes spin {
  to {
    -webkit-transform: rotate(360deg);
  }
}
@-webkit-keyframes spin {
  to {
    -webkit-transform: rotate(360deg);
  }
}

#humanAge {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin: 8px 0;
}

.lifestage-badge {
  display: inline-block;
  padding: .4vw 1vw;
  background: var(--primary);
  color: white;
  border: 1px solid #1042af;
  border-radius: 6px;
  border-style: outset;
  font-size: 1rem;
  font-weight: 600;
  min-width: 6.6vw;
  margin-top: 5px;
}

/* Lifestage color variants */
.lifestage-badge.young {
  background: var(--accent);
}

.lifestage-badge.adult {
  background: var(--success);
}

.lifestage-badge.mature {
  background: var(--primary);
}

.lifestage-badge.senior {
  background: #8b5cf6;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  padding-top: 60px;
}

.modal-content {
  background-color: white;
  margin: 0 auto;
  width: 90%;
  max-width: 600px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.4s ease-out;
  max-height: 80vh;
  overflow-y: auto;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  padding: 15px 20px;
  display: block;
  transition: var(--transition);
}

.close:hover {
  color: var(--primary);
}

.modal-content h2,
.modal-content h3 {
  padding: 20px;
  margin: 0;
  color: var(--secondary);
  border-bottom: 1px solid #eee;
}

.modal-content h3 {
  background: #f9f9f9;
  font-size: 1.1rem;
}

.modal-content ul {
  padding: 0 20px 20px;
  list-style-type: disc;
}

.modal-content ul li {
  margin-bottom: 8px;
  color: #444;
}

.modal-content div {
  padding: 0 20px 20px;
  color: #555;
  line-height: 1.7;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
  transition: background 0.2s;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Hide scrollbar for Firefox */
.modal-content {
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .container {
    max-width: 90vw;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .toggle-container {
    padding-top: .5rem;
    padding-bottom: .5rem;
    margin-top: .25rem;
    margin-bottom: .25rem;
  }

  .toggle-labels {
    font-size: 0.9rem;
  }

  .radio-group {
    gap: 10px;
  }

  .radio-group label {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .input-section {
    padding: 18px;
  }

  .btn-primary {
    font-size: 1rem;
  }

  .modal-content {
    width: 85%;
    max-height: 80vh
    overflow-y: auto;
  }
}

/* ===== DARK MODE SUPPORT — COMPLETE REWRITE ===== */
@media (prefers-color-scheme: dark) {
  /* 🎨 PRIMARY DARK THEME PALETTE — use these everywhere */
  :root {
    --primary: #3b82f6;
    --secondary: #2563eb;
    --accent: #f59e0b;
    --light: #0f172a;
    --dark: #e2e8f0;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --border-color: #334155;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-button: 0 4px 12px rgba(59, 130, 246, 0.4);
    --border-radius-sm: 9px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
  }

  /* 🖥️ BODY & CONTAINERS */
  body {
    background-image: url("/images/leopardBackground_dark.jpg");
    background-repeat: repeat;
    color: var(--dark);
  }

  .container {
    background: linear-gradient(235deg, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.15) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898;
   background-blend-mode: multiply,multiply;
    border: solid #2c2c2c;
    border-width: 2px 6px 4px 2px;
    box-shadow: 
      4px 2px 10 4px #2b2b2b, 
      8px 4px 20px #121212
  }

  .footer-container {
    background: #0f172a;  
  }

  /* 🔤 TEXT ELEMENTS */
  header h1,
  header p,
  .form-group label,
  .modal-content h3,
  .modal-content div,
  .modal-content ul li,
  .help-text,
  .species-chip,
  .toggle-label,
  .btn-secondary,
  .lifestage-badge,
  .results-section h2,
  #humanAge,
  .species-chips::after,
  .toggle-container,
  .footer-container,
  .footer-nav a {
    color: var(--dark);
  }

  /* 📝 INPUTS & SELECTS */
  select,
  .input-field input[type="number"],
  .breed-input-container select {
    background-color: #A1A1A4;
    background-image: radial-gradient(at top center, rgba(186,186,186,.8) 0%, rgba(0,0,0,0.03) 100%), linear-gradient(to top, rgba(255,255,255,0.1) 0%, rgba(143,152,157,0.60) 100%);
    background-blend-mode: multiply;
    border-color: #475569;
    border-radius: var(--border-radius-sm);
    color: var(--dark);
    box-shadow: inset 2 2 2 1px rgba(255, 255, 255, 0.05);
  }

  .breed-input-container select {
    background-color: #A1A1A4;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%23666' style='background:none'><path d='M6 9l4 4 4-4z'/></svg>"), radial-gradient(at top center, rgba(186,186,186,.8) 0%, rgba(0,0,0,0.03) 100%), linear-gradient(to top, rgba(255,255,255,0.1) 0%, rgba(143,152,157,0.60) 100%);
}

  select:focus,
  .input-field input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 2 2 2 3px rgba(59, 130, 246, 0.3);
  }

  /* 🔄 TOGGLE SWITCH — DARK MODE VERSION */
  .toggle-switch input:checked + .slider {
    background-color: var(--primary);
  }

  .toggle-switch input:not(:checked) + .slider {
    background-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  .toggle-switch input:checked + .slider:before {
    background-color: white;
  }

  .toggle-switch input:not(:checked) + .slider:before {
    background-color: #cbd5e1;
  }

  .toggle-container:has(.toggle-switch input:checked) .toggle-label.label-left {
    color: var(--text-secondary);
    font-weight: 400;
  }

  .toggle-container:has(.toggle-switch input:checked) .toggle-label.label-right {
    color: var(--primary);
    font-weight: 600;
  }

  .toggle-label.label-left {
    color: var(--accent);
  }

  .toggle-label.label-right {
    color: var(--text-secondary);
  }

  /* 🐾 SPECIES CHIPS */
  .species-chip {
    background: #334155;
    border: 2px solid #475569;
    color: var(--dark);
  }

  .species-chip:has(input:checked) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.5);
  }

  .species-chip:hover {
    background: #475569;
    border-color: #64748b;
  }

  /* 🧩 FORM GROUPS & PANELS */
  .toggle-container,
  .input-section,
  .results-placeholder,
  .results-section {
    background-color: #A1A1A4;
    background-image: radial-gradient(at top center, rgba(186,186,186,.8) 0%, rgba(0,0,0,0.03) 100%), linear-gradient(to top, rgba(255,255,255,0.1) 0%, rgba(143,152,157,0.60) 100%);
    background-blend-mode: multiply;
    border: 1.5px solid #475569;
    border-style: ridge;
    color: var(--dark);
  }

  .modal-content {
    background: #1e293b;
    color: var(--dark);
    border-color: var(--border-color);
  }

 	
  /* ✅ BUTTONS */
  .btn-primary {
    background: var(--primary);
    box-shadow: var(--shadow-button);
  }

  .btn-primary:hover {
    background: var(--secondary);
  }

  .btn-secondary {
    border-color: var(--primary);
    color: var(--primary);
  }

  .btn-secondary:hover {
    background: var(--primary);
    color: white;
  }

  /* 🏷️ LIFESTAGE BADGE */
  .lifestage-badge {
    background: var(--primary);
    color: white;
  }
  
  .lifestage-badge.young {
    background: var(--accent);
  }
  
  .lifestage-badge.adult {
    background: var(--success);
  }
  
  .lifestage-badge.mature {
    background: var(--primary);
  }
  
  .lifestage-badge.senior {
    background: #8b5cf6;
  }

  /* 📄 MODAL */
  .modal-content h2,
  .modal-content h3 {
    border-bottom-color: #475569;
  }

  .modal-content h3 {
    background: #253447; /* ✅ Slightly lighter than bg */
  }

  .modal-content ul li {
    color: #cbd5e1; /* ✅ Better contrast than #444 */
  }

  .modal-content div {
    color: #cbd5e1;
    line-height: 1.7;
  }

  /* ✅ SCROLLBAR — DARK MODE */
  .modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
  }

  .modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  }

  /* ✅ HELP TEXT */
  .help-text {
    color: #94a3b8;
  }

  /* ✅ RADIO GROUPS — IF YOU HAVE THEM */
  .radio-group label {
    background: #334155;
    border-color: #475569;
    color: var(--dark);
  }

  .radio-group label:hover {
    background: #475569;
  }

  /* ✅ INPUT BORDER ON HOVER — SOFT GLIMMER */
  .input-field input[type="number"],
  select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
}

#breed option[disabled] {
  color: #999;
  font-style: italic;
}

/* ✅ DEFAULT CURSOR — SOFT PAW FOR MOST INTERACTIVE ELEMENTS */
body {
  cursor: url('../static/paw_tan.png') 10 10, auto;
}

/* ✅ SOFT PAW — For toggle, radios, dropdowns, labels */
input[type="radio"],
input[type="checkbox"],
select,
label,
#calcModeToggle {
  cursor: url('../static/paw_grey.png') 10 10, auto !important;
}

/* ✅ BOLD PAW — For primary actions: buttons, links, reset */
button,
a,
#moreInfo,
#resetAll {
  cursor: url('../static/paw_grey.png') 10 10, auto !important;
}

/* Optional: Ensure hover states still work */
input[type="radio"]:hover,
input[type="checkbox"]:hover,
input[type="number"]:hover,
select:hover,
button:hover,
label:hover,
a:hover,
#moreInfo:hover,
}