/* Fundraiser Goal Thermometer - Main Stylesheet */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-secondary: #475569;
  --color-accent: #48bb78;
  --color-accent-dark: #38a169;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-border: #e2e8f0;
  --color-error: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.1rem;
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.site-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  color: var(--color-text-light);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-size: 0.95rem;
}

.nav-link:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

/* Main Content */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 60px 0;
  align-items: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--color-text);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-preview {
  display: flex;
  justify-content: center;
}

.preview-thermometer {
  width: 150px;
  height: 250px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-text-light);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn-danger {
  background: var(--color-error);
  color: white;
  border-color: var(--color-error);
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Planner Section */
.planner-section {
  padding: 40px 0;
}

.planner-section h2 {
  font-size: 1.75rem;
  margin-bottom: 24px;
}

.planner-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.input-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.result-display {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.result-item {
  text-align: center;
}

.result-label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.result-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Thermometer Display */
.thermometer-display {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#main-thermometer {
  width: 180px;
  height: 300px;
}

.thermometer-label {
  margin-top: 16px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: center;
}

/* Saved Plans Section */
.saved-section {
  padding: 40px 0;
}

.saved-section h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.section-note {
  color: var(--color-text-light);
  margin-bottom: 24px;
}

.saved-plans-list {
  display: grid;
  gap: 16px;
}

.saved-plan-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.saved-plan-info h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.saved-plan-info p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.saved-plan-progress {
  font-weight: 600;
  color: var(--color-accent);
}

.saved-plan-actions {
  display: flex;
  gap: 8px;
}

.empty-state {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  color: var(--color-text-light);
}

/* Info Section */
.info-section {
  padding: 40px 0;
}

.info-section h2 {
  font-size: 1.75rem;
  margin-bottom: 32px;
  text-align: center;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.info-number {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.info-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Content Section */
.content-section {
  padding: 40px 0;
}

.content-section h2 {
  font-size: 1.75rem;
  margin-bottom: 24px;
}

.content-block {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.content-block p {
  margin-bottom: 16px;
}

.content-block p:last-child {
  margin-bottom: 0;
}

/* FAQ Section */
.faq-list {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  float: right;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  padding: 0 24px 20px;
  color: var(--color-text-light);
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--color-text-light);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-note {
  color: var(--color-text-light);
  font-size: 0.85rem;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--color-text);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: slideIn 0.3s ease;
}

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

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .input-panel,
  .action-buttons,
  .hero-section,
  .info-section,
  .content-section,
  .saved-section {
    display: none;
  }
  
  .thermometer-display {
    box-shadow: none;
    padding: 0;
  }
  
  #main-thermometer {
    width: 240px;
    height: 400px;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    margin: 0 auto 24px;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-preview {
    order: -1;
  }
  
  .preview-thermometer {
    width: 120px;
    height: 200px;
  }
  
  .planner-grid {
    grid-template-columns: 1fr;
  }
  
  .thermometer-display {
    order: -1;
  }
  
  .result-display {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    padding: 12px 16px;
  }
  
  .site-nav {
    width: 100%;
    justify-content: center;
  }
  
  main {
    padding: 0 16px;
  }
  
  .hero-content h1 {
    font-size: 1.75rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .saved-plan-card {
    flex-direction: column;
    text-align: center;
  }
  
  .saved-plan-actions {
    width: 100%;
    justify-content: center;
  }
}

/* Focus States */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Ad Slot Placeholder */
.ad-slot {
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.85rem;
  margin: 24px 0;
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
