/* css/styles.css */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  /* Surfaces */
  --color-surface-primary: #f8fafc;
  --color-surface-secondary: #ffffff;
  --color-surface-tertiary: #f1f5f9;
  --color-surface-elevated: #e2e8f0;
  --color-surface-glass: rgba(255, 255, 255, 0.8);

  /* Accent */
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-light: #dbeafe;
  --color-accent-glow: rgba(37, 99, 235, 0.15);
  --color-accent-secondary: #0891b2;

  /* Text */
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;

  /* Borders */
  --color-border-subtle: rgba(15, 23, 42, 0.06);
  --color-border-default: rgba(15, 23, 42, 0.1);
  --color-border-strong: rgba(15, 23, 42, 0.15);

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.6) 100%);

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-surface-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   UTILITIES
   ======================================== */
.hidden {
  display: none !important;
}

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-xl);
}

/* ========================================
   LAYOUT
   ======================================== */
.app {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Atmospheric background */
.app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(37, 99, 235, 0.08), transparent);
  pointer-events: none;
  z-index: 0;
}

.app::after {
  content: '';
  position: fixed;
  top: 33%;
  right: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle at 100% 50%, rgba(8, 145, 178, 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Grid pattern overlay */
.app > * {
  position: relative;
  z-index: 1;
}

/* ========================================
   HEADER
   ======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(20px);
}

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

.logo {
  height: 36px;
  width: auto;
}

.visitor-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 100px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.visitor-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ========================================
   HERO
   ======================================== */
.hero {
  text-align: center;
  padding: 64px 24px 48px;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 100px;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   CALCULATOR GRID
   ======================================== */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

@media (min-width: 1024px) {
  .calculator-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.form-card {
  padding: 32px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.results-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 1024px) {
  .results-column {
    position: sticky;
    top: 100px;
  }
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  max-width: 700px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  border-top: 1px solid var(--color-border-subtle);
  padding: 32px 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.commit-id {
  font-family: monospace;
  font-size: 11px;
  opacity: 0.5;
  margin-top: 8px;
}

/* ========================================
   MODAL
   ======================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* ========================================
   TOAST
   ======================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========================================
   FORM COMPONENTS
   ======================================== */
.form-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.form-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.form-icon svg {
  width: 24px;
  height: 24px;
}

.form-title {
  font-size: 20px;
  font-weight: 700;
}

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

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.form-label-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 4px 10px;
  border-radius: 6px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-family);
  color: var(--color-text-primary);
  background: var(--color-surface-tertiary);
  border: 2px solid var(--color-border-default);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--color-accent);
  background: var(--color-surface-secondary);
  box-shadow: 0 0 0 4px var(--color-accent-glow);
}

/* Plan Selection */
.plan-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.plan-option {
  position: relative;
}

.plan-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  background: var(--color-surface-secondary);
  border: 2px solid var(--color-border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-option input:checked + label {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.plan-option label:hover {
  border-color: var(--color-accent);
}

.plan-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.plan-price {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Slider */
.slider-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.slider-wrapper {
  flex: 1;
}

.slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--color-border-default);
  outline: none;
  cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient-accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  border: 3px solid white;
  transition: transform 0.2s;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.slider-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient-accent);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.slider-value {
  min-width: 70px;
  padding: 10px 16px;
  text-align: center;
  background: var(--color-accent-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 10px;
}

.slider-value span {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-accent);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.slider-labels .highlight {
  color: var(--color-accent);
  font-weight: 600;
}

.slider-info {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  padding: 12px;
  background: var(--color-surface-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  line-height: 1.5;
}

.slider-info strong {
  color: var(--color-accent);
}

/* Investment Box */
.investment-box {
  margin-top: 24px;
  padding: 20px;
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.investment-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.investment-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-text-primary);
}

.investment-detail {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* ========================================
   RESULTS COMPONENTS
   ======================================== */

/* Savings Card */
.savings-card {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.2), 0 8px 10px -6px rgba(37, 99, 235, 0.1);
}

.savings-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.savings-value {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.savings-period {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

.savings-tip {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

/* ROI Card */
.roi-card {
  background: var(--color-surface-secondary);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-md);
}

.roi-label {
  font-size: 14px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.roi-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-accent);
}

.roi-value.negative {
  color: #ef4444;
}

/* Results Table */
.results-table-container {
  background: var(--color-surface-secondary);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.results-table th,
.results-table td {
  padding: 14px 12px;
  text-align: right;
}

.results-table th:first-child,
.results-table td:first-child {
  text-align: left;
}

.results-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--color-border-default);
  background: var(--color-surface-tertiary);
}

.results-table th:first-child {
  border-top-left-radius: var(--radius-sm);
}

.results-table th:last-child {
  border-top-right-radius: var(--radius-sm);
}

.results-table td {
  border-bottom: 1px solid var(--color-surface-tertiary);
  color: var(--color-text-primary);
}

.results-table td:first-child {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.results-table tr:last-child td {
  border-bottom: none;
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.results-table tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-sm);
}

.results-table tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-sm);
}

/* CTA Card */
.cta-card {
  background: var(--gradient-accent);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.2);
}

.cta-title {
  font-size: 24px;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
}

.cta-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 28px;
  line-height: 1.6;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 40px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-family);
  color: var(--color-accent);
  background: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cta-note {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* Enterprise State */
.enterprise-card {
  background: var(--color-surface-secondary);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  text-align: center;
  border: 2px dashed var(--color-border-default);
}

.enterprise-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.enterprise-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.enterprise-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.enterprise-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: #25d366;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.enterprise-button:hover {
  background: #20bd5a;
  transform: translateY(-1px);
}

/* ========================================
   MODAL COMPONENTS
   ======================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--color-surface-secondary);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.modal-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-tertiary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--color-surface-elevated);
  color: var(--color-text-primary);
}

.modal-body {
  padding: 24px;
}

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

.modal-form-group:last-child {
  margin-bottom: 0;
}

.modal-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.modal-input,
.modal-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-family);
  color: var(--color-text-primary);
  background: var(--color-surface-tertiary);
  border: 2px solid var(--color-border-default);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.modal-input:focus,
.modal-select:focus {
  border-color: var(--color-accent);
  background: var(--color-surface-secondary);
  box-shadow: 0 0 0 4px var(--color-accent-glow);
}

.modal-input.error,
.modal-select.error {
  border-color: #ef4444;
}

.modal-error {
  font-size: 13px;
  color: #ef4444;
  margin-top: 6px;
}

.modal-summary {
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.modal-summary-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.modal-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-summary-item {
  font-size: 14px;
}

.modal-summary-label {
  color: var(--color-text-secondary);
}

.modal-summary-value {
  font-weight: 600;
  color: var(--color-text-primary);
}

.modal-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--color-accent);
}

.modal-checkbox label {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.modal-checkbox a {
  color: var(--color-accent);
}

.modal-footer {
  padding: 0 24px 24px;
}

.modal-submit {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-family);
  color: white;
  background: var(--gradient-accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Steps indicator */
.modal-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.modal-step {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border-default);
  transition: all 0.2s ease;
}

.modal-step.active {
  background: var(--color-accent);
  width: 24px;
  border-radius: 4px;
}

/* Success state */
.modal-success {
  text-align: center;
  padding: 48px 24px;
}

.modal-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.modal-success-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.modal-success-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast {
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 320px;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 4.7s forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-icon {
  width: 40px;
  height: 40px;
  background: var(--color-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
  .header-content {
    padding: 12px 16px;
  }

  .logo {
    height: 28px;
  }

  .visitor-badge {
    padding: 6px 12px;
    font-size: 12px;
  }

  .hero {
    padding: 40px 16px 32px;
  }

  .hero-badge {
    font-size: 12px;
    padding: 6px 12px;
  }

  .calculator-grid {
    padding: 0 16px 48px;
    gap: 24px;
  }

  .form-card {
    padding: 24px;
  }

  .form-title {
    font-size: 18px;
  }

  .plan-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .plan-option label {
    flex-direction: row;
    justify-content: space-between;
    padding: 14px 16px;
  }

  .slider-container {
    flex-direction: column;
    gap: 12px;
  }

  .slider-value {
    width: 100%;
  }

  .savings-card {
    padding: 32px 24px;
  }

  .savings-value {
    font-size: 36px;
  }

  .results-table {
    font-size: 12px;
  }

  .results-table th,
  .results-table td {
    padding: 10px 6px;
  }

  .cta-card {
    padding: 32px 20px;
  }

  .cta-title {
    font-size: 20px;
  }

  .cta-button {
    width: 100%;
    padding: 16px 24px;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    max-width: none;
  }

  .modal-content {
    max-height: 100vh;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .form-input {
    padding: 12px 14px;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .investment-value {
    font-size: 20px;
  }

  .roi-card {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .roi-value {
    font-size: 28px;
  }
}

/* ========================================
   ANIMATIONS & TRANSITIONS
   ======================================== */
/* Initial load animation - only applied via .animate-in class */
.animate-in {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.form-card.animate-in { animation-delay: 0.1s; }
.savings-card.animate-in { animation-delay: 0.2s; }
.roi-card.animate-in { animation-delay: 0.3s; }
.results-table-container.animate-in { animation-delay: 0.4s; }
.cta-card.animate-in { animation-delay: 0.5s; }

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

/* Value update animation - subtle highlight */
.value-updated {
  animation: valueFlash 0.3s ease;
}

@keyframes valueFlash {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Focus states for accessibility */
.form-input:focus,
.slider-input:focus,
.modal-input:focus,
.modal-select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  .header,
  .visitor-badge,
  .cta-section,
  .toast-container,
  .modal-backdrop {
    display: none !important;
  }

  .calculator-grid {
    display: block;
  }

  .form-card,
  .results-column > * {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
