/* DeductibleDad - Global Styles */

:root {
  --primary-color: #4285f4;
  --primary-hover: #3367d6;
  --success-color: #0f9d58;
  --error-color: #db4437;
  --warning-color: #f4b400;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --border-color: #dadce0;
  --bg-gray: #f8f9fa;
  --bg-white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Dark mode color scheme */
body.dark-mode {
  --primary-color: #4285f4;
  --primary-hover: #5a95f5;
  --success-color: #1db970;
  --error-color: #f28b82;
  --warning-color: #fdd663;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --border-color: #3c4043;
  --bg-gray: #202124;
  --bg-white: #292a2d;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
  background-color: #17181a;
  color: var(--text-primary);
}

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

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-white);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--bg-white);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-gray);
  box-shadow: var(--shadow-md);
}

.btn-google {
  background-color: var(--bg-white);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-google:hover {
  box-shadow: var(--shadow-md);
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.form-input.error {
  border-color: var(--error-color);
}

.form-error {
  color: var(--error-color);
  font-size: 14px;
  margin-top: 0.25rem;
}

.form-help {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 0.25rem;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.logo {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Loading spinner */
.spinner {
  border: 3px solid var(--bg-gray);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.hidden {
  display: none !important;
}

/* Savings Estimator */
.estimator-section {
  background-color: var(--bg-white);
  padding: 60px 20px;
  border-bottom: 1px solid var(--border-color);
}

.estimator-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-gray);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.estimator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.estimator-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.estimator-result {
  text-align: center;
  background: var(--primary-color);
  color: white;
  padding: 2rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.result-label {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.result-value {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
}

.result-note {
  font-size: 0.85rem;
  margin-top: 1rem;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .estimator-grid {
    grid-template-columns: 1fr;
  }

  .estimator-result {
    padding: 1.5rem;
  }

  .result-value {
    font-size: 2.5rem;
  }
}

/* FAQ Section */
.faq-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.faq-tab-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.2s;
  font-weight: 500;
}

.faq-tab-btn:hover {
  color: var(--primary-color);
  background-color: rgba(66, 133, 244, 0.05);
}

.faq-tab-btn.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.faq-panel {
  max-width: 800px;
  margin: 0 auto;
  transition: opacity 0.3s ease;
}

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

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

.faq-question {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.faq-answer {
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-answer p {
  margin-bottom: 1rem;
}

.faq-answer ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.faq-answer li {
  margin-bottom: 0.5rem;
}