/* 
  SHROOMSNAP: Minimalist & Modernized Main Stylesheet (Design Base)
  Inspired by the clean organic shades of Logo 1 & Logo 2.
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  /* Design Tokens: ShroomSnap brown-outline system */
  --color-primary: #3B281F;        /* Deep brown outlines & text */
  --color-primary-light: #5a4338;  /* Soft warm cocoa */
  --color-accent: #C29D7E;         /* Sand / gold accent */
  --color-accent-hover: #a88468;   /* Accent hover */
  --color-accent-light: #EDE6DF;   /* Soft cream surfaces */
  --color-background: #FCFBFA;     /* Page wash */
  --color-card-bg: #FDFCFC;        /* Card faces */
  --color-border: rgba(59, 40, 31, 0.12);
  --color-text-dark: #3B281F;
  --color-text-muted: #6e5a50;
  --color-white: #ffffff;
  
  /* Status / Toxicity */
  --color-safe: #2e7d32;
  --color-warning: #C29D7E;
  --color-danger: #c65a4f;
  --color-info: #1e5aa8;
  --color-unknown: #a09790;

  /* Modernized Typography */
  --font-family: "Poppins", sans-serif;
  
  /* Spacing Grid (8px Base) */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2rem;     /* 32px */
  --space-xxl: 3.5rem;  /* 56px */

  /* Minimalist Borders & Shadows */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --shadow-sm: 0 2px 8px rgba(51, 33, 25, 0.02);
  --shadow-md: 0 8px 24px rgba(51, 33, 25, 0.04);
  --shadow-lg: 0 16px 48px rgba(51, 33, 25, 0.06);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd {
  margin: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-background);
  color: var(--color-text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

img, picture {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Global Container */
.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* App Header & Navigation */
.app-header {
  background-color: rgba(252, 251, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--color-primary);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1500;
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-fast);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-logo {
  display: flex;
  align-items: center;
}

.app-logo img {
  height: 38px;
  width: auto;
}

.app-nav {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--color-primary);
  opacity: 0.85;
  transition: all var(--transition-fast);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  letter-spacing: 0.2px;
}

.nav-link:hover {
  opacity: 1;
  background-color: var(--color-accent-light);
}

.nav-link.active {
  opacity: 1;
  font-weight: 600;
  background-color: var(--color-accent-light);
}

/* App Footer */
.app-footer {
  background-color: var(--color-primary);
  color: #f7f6f5;
  text-align: center;
  padding: var(--space-xxl) 0;
  margin-top: auto;
  font-size: 0.825rem;
  border-top: 1px solid var(--color-border);
}

.app-footer p {
  opacity: 0.75;
  font-weight: 400;
}

.app-footer .footer-brand {
  opacity: 1;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  letter-spacing: 0.5px;
  color: #FDFCFC;
}

.app-footer .footer-tagline {
  opacity: 0.85;
  margin-bottom: var(--space-md);
  font-weight: 500;
}

.app-footer .footer-copy {
  opacity: 0.6;
  font-size: 0.75rem;
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Classifier loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(59, 40, 31, 0.12);
  border-top-color: #3B281F;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  animation: ss-spin 1s linear infinite;
}

@keyframes ss-spin {
  to { transform: rotate(360deg); }
}

.result-placeholder .spinner-caption {
  font-weight: 700;
  color: #3B281F;
}

.result-placeholder .spinner-sub {
  font-size: 0.85rem;
  color: #3B281F;
  opacity: 0.75;
  margin-top: var(--space-xs);
}

/* Hide the browser’s built-in password eye so only the ShroomSnap toggle shows. */
input::-ms-reveal,
input::-ms-clear,
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-strong-password-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-caps-lock-indicator {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
