/**
 * Goals Widget V2 - Premium Styles
 * Stunning design matching the landing page aesthetic
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
.gw2-widget {
  /* Light Theme */
  --gw2-bg: #ffffff;
  --gw2-bg-glass: rgba(255, 255, 255, 0.8);
  --gw2-surface: #f8fafc;
  --gw2-surface-elevated: #ffffff;
  --gw2-border: rgba(0, 0, 0, 0.08);
  --gw2-border-strong: rgba(0, 0, 0, 0.12);
  --gw2-text: #0f172a;
  --gw2-text-secondary: #475569;
  --gw2-text-muted: #94a3b8;
  --gw2-accent: #f97316;
  --gw2-accent-rgb: 249, 115, 22;
  --gw2-accent-soft: rgba(249, 115, 22, 0.1);
  --gw2-success: #10b981;
  --gw2-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --gw2-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Dark Theme */
.gw2-widget[data-theme="dark"] {
  --gw2-bg: #0f172a;
  --gw2-bg-glass: rgba(15, 23, 42, 0.9);
  --gw2-surface: #1e293b;
  --gw2-surface-elevated: #334155;
  --gw2-border: rgba(255, 255, 255, 0.08);
  --gw2-border-strong: rgba(255, 255, 255, 0.15);
  --gw2-text: #f1f5f9;
  --gw2-text-secondary: #cbd5e1;
  --gw2-text-muted: #64748b;
  --gw2-accent-soft: rgba(249, 115, 22, 0.15);
  --gw2-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --gw2-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ============================================
   BACKDROP & MODAL
   ============================================ */
.gw2-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gw2-backdrop.active {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.gw2-modal {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  background: var(--gw2-bg);
  color: var(--gw2-text);
  border-radius: 20px;
  box-shadow: var(--gw2-shadow-lg);
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Baseline color so any unstyled descendant text picks up the active theme.
   Using !important to defeat any cascading host-page typography styles. */
.gw2-modal,
.gw2-modal p,
.gw2-modal span,
.gw2-modal li,
.gw2-modal h1,
.gw2-modal h2,
.gw2-modal h3,
.gw2-modal h4,
.gw2-modal h5,
.gw2-modal h6,
.gw2-modal strong,
.gw2-modal em,
.gw2-modal small {
  color: var(--gw2-text) !important;
  font-family: inherit;
}
.gw2-modal a:not([class]) {
  color: var(--gw2-accent) !important;
}
/* Muted/secondary text needs to stay muted in both themes */
.gw2-modal .gw2-text-muted,
.gw2-modal .gw2-goals-intro p,
.gw2-modal .gw2-goal-subtitle,
.gw2-modal .gw2-accordion-meta,
.gw2-modal .gw2-faq-answer p,
.gw2-modal .gw2-guide-body p,
.gw2-modal .gw2-quick-action-desc,
.gw2-modal .gw2-section-label,
.gw2-modal .gw2-disclaimer,
.gw2-modal .gw2-calc-hint,
.gw2-modal .gw2-calc-budget-desc,
.gw2-modal .gw2-calc-breakdown-item,
.gw2-modal .gw2-accordion-chevron,
.gw2-modal .gw2-faq summary i {
  color: var(--gw2-text-muted) !important;
}
.gw2-modal .gw2-plan-hero-content p,
.gw2-modal .gw2-back-btn,
.gw2-modal .gw2-calc-result-label,
.gw2-modal .gw2-calc-tip,
.gw2-modal .gw2-checklist-progress-text {
  color: var(--gw2-text-secondary) !important;
}
.gw2-modal .gw2-calc-result-primary .gw2-calc-result-value,
.gw2-modal .gw2-calculator-header i,
.gw2-modal .gw2-faq summary:hover {
  color: var(--gw2-accent) !important;
}
.gw2-modal .gw2-insight-icon { color: #f59e0b !important; }
.gw2-modal .gw2-calc-progress-label { color: var(--gw2-success) !important; }
/* White text on colored backgrounds */
.gw2-modal .gw2-logo-icon,
.gw2-modal .gw2-goal-icon,
.gw2-modal .gw2-plan-hero-icon,
.gw2-modal .gw2-quick-action-icon,
.gw2-modal .gw2-accordion-icon-calc,
.gw2-modal .gw2-guide-number,
.gw2-modal .gw2-goal-card:hover .gw2-goal-arrow,
.gw2-modal .gw2-check-item input:checked + .gw2-check-box {
  color: #fff !important;
}

.gw2-backdrop.active .gw2-modal {
  transform: scale(1) translateY(0);
}

.gw2-modal-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 90vh;
}

/* ============================================
   HEADER
   ============================================ */
.gw2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--gw2-bg);
  border-bottom: 1px solid var(--gw2-border);
  flex-shrink: 0;
}

.gw2-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gw2-logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gw2-accent), #ea580c);
  border-radius: 10px;
  color: white;
  font-size: 1.125rem;
  box-shadow: 0 4px 12px rgba(var(--gw2-accent-rgb), 0.3);
}

.gw2-logo-text {
  font-weight: 600;
  font-size: 1rem;
  color: var(--gw2-text);
}

.gw2-logo-img {
  max-height: 2.5rem;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.gw2-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gw2-theme-toggle,
.gw2-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--gw2-surface);
  border: 1px solid var(--gw2-border);
  border-radius: 10px;
  color: var(--gw2-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.gw2-theme-toggle:hover,
.gw2-close:hover {
  background: var(--gw2-surface-elevated);
  color: var(--gw2-text);
  border-color: var(--gw2-border-strong);
}

/* Icon shows the theme the user would switch TO, not the current theme */
.gw2-theme-toggle .gw2-icon-light,
.gw2-widget[data-theme="dark"] .gw2-theme-toggle .gw2-icon-dark {
  display: none;
}

.gw2-widget[data-theme="dark"] .gw2-theme-toggle .gw2-icon-light {
  display: block;
}

/* ============================================
   BODY
   ============================================ */
.gw2-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.gw2-view {
  display: none;
  padding: 1.25rem;
}

.gw2-view.active {
  display: block;
  animation: gw2-fadeSlide 0.35s ease;
}

@keyframes gw2-fadeSlide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   GOALS VIEW
   ============================================ */
.gw2-goals-intro {
  text-align: center;
  margin-bottom: 2rem;
}

.gw2-goals-intro h1 {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  margin: 0 0 0.375rem !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em;
}

.gw2-goals-intro p {
  font-size: 0.875rem !important;
  margin: 0 !important;
  line-height: 1.45 !important;
}

/* Goals Grid */
.gw2-goals-grid {
  display: grid;
  gap: 0.625rem;
}

.gw2-goal-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--gw2-surface);
  border: 1px solid var(--gw2-border);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  animation: gw2-cardIn 0.4s ease forwards;
  animation-delay: var(--delay);
}

@keyframes gw2-cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gw2-goal-card:hover {
  background: var(--gw2-surface-elevated);
  border-color: rgba(var(--gw2-accent-rgb), 0.3);
  transform: translateX(6px);
  box-shadow: var(--gw2-shadow);
}

.gw2-goal-card:focus {
  outline: 2px solid var(--gw2-accent);
  outline-offset: 2px;
}

.gw2-goal-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fallback for browsers without color-mix support */
  background: var(--goal-color);
  background: linear-gradient(135deg, var(--goal-color), color-mix(in srgb, var(--goal-color) 70%, #000));
  border-radius: 12px;
  color: white;
  font-size: 1.05rem;
  flex-shrink: 0;
  /* Fallback shadow */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--goal-color) 40%, transparent);
}

.gw2-goal-content {
  flex: 1;
  min-width: 0;
}

.gw2-goal-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gw2-text);
  line-height: 1.3;
}

.gw2-goal-subtitle {
  font-size: 0.8125rem;
  color: var(--gw2-text-muted);
  margin-top: 0.125rem;
  line-height: 1.35;
}

.gw2-goal-arrow {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gw2-accent-soft);
  border-radius: 50%;
  color: var(--gw2-accent);
  font-size: 0.875rem;
  transition: all 0.25s;
  flex-shrink: 0;
}

.gw2-goal-card:hover .gw2-goal-arrow {
  background: var(--gw2-accent);
  color: white;
  transform: translateX(3px);
}

/* ============================================
   PLAN VIEW
   ============================================ */
.gw2-plan {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

/* Back Button */
.gw2-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: var(--gw2-surface);
  border: 1px solid var(--gw2-border);
  border-radius: 10px;
  color: var(--gw2-text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  width: fit-content;
}

.gw2-back-btn:hover {
  background: var(--gw2-surface-elevated);
  color: var(--gw2-text);
}

/* Hero Header */
.gw2-plan-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  /* Fallback for browsers without color-mix support */
  background: var(--gw2-surface);
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--goal-color) 15%, var(--gw2-surface)),
    color-mix(in srgb, var(--goal-color) 5%, var(--gw2-surface))
  );
  border: 1px solid rgba(0, 0, 0, 0.1);
  border: 1px solid color-mix(in srgb, var(--goal-color) 20%, transparent);
  border-radius: 20px;
}

.gw2-plan-hero-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fallback for browsers without color-mix support */
  background: var(--goal-color);
  background: linear-gradient(135deg, var(--goal-color), color-mix(in srgb, var(--goal-color) 70%, #000));
  border-radius: 14px;
  color: white;
  font-size: 1.35rem;
  flex-shrink: 0;
  /* Fallback shadow */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--goal-color) 35%, transparent);
}

.gw2-plan-hero-content h2 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em;
}

.gw2-plan-hero-content p {
  font-size: 0.825rem !important;
  margin: 0.25rem 0 0 !important;
  line-height: 1.4 !important;
}

.gw2-modal .gw2-guide-body h4,
.gw2-modal .gw2-accordion-title > span:first-child,
.gw2-modal .gw2-goal-title,
.gw2-modal .gw2-quick-action-title,
.gw2-modal .gw2-calc-budget-title {
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.gw2-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gw2-text-muted);
  margin-bottom: 0.75rem;
}

.gw2-actions-row {
  display: grid;
  gap: 0.75rem;
}

.gw2-quick-action {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  background: var(--gw2-surface);
  border: 1px solid var(--gw2-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s;
}

.gw2-quick-action:hover {
  background: var(--gw2-surface-elevated);
  border-color: rgba(var(--gw2-accent-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: var(--gw2-shadow);
}

.gw2-quick-action-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gw2-accent), #ea580c);
  border-radius: 12px;
  color: white;
  font-size: 1.125rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--gw2-accent-rgb), 0.25);
}

.gw2-quick-action-text {
  flex: 1;
}

.gw2-quick-action-title {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gw2-text);
}

.gw2-quick-action-desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--gw2-text-muted);
  margin-top: 0.125rem;
}

/* ============================================
   CALCULATOR
   ============================================ */
.gw2-calculator-card {
  background: var(--gw2-surface);
  border: 1px solid var(--gw2-border);
  border-radius: 18px;
  overflow: hidden;
}

.gw2-calculator-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(var(--gw2-accent-rgb), 0.08), rgba(var(--gw2-accent-rgb), 0.03));
  border-bottom: 1px solid var(--gw2-border);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gw2-text);
}

.gw2-calculator-header i {
  color: var(--gw2-accent);
  font-size: 1rem;
}

.gw2-calculator-body {
  padding: 1.25rem;
}

/* ============================================
   KEY INSIGHTS
   ============================================ */
.gw2-insights-strip {
  display: grid;
  gap: 0.75rem;
}

.gw2-insight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.03));
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 14px;
}

.gw2-insight-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 191, 36, 0.15);
  border-radius: 8px;
  color: #f59e0b;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.gw2-insight-item p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--gw2-text);
  margin: 0;
}

/* ============================================
   LEARN SECTIONS (Accordions)
   ============================================ */
.gw2-learn-sections {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.gw2-accordion {
  background: var(--gw2-surface);
  border: 1px solid var(--gw2-border);
  border-radius: 14px;
  overflow: hidden;
}

.gw2-accordion summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}

.gw2-accordion summary::-webkit-details-marker {
  display: none;
}

.gw2-accordion summary:hover {
  background: var(--gw2-surface-elevated);
}

.gw2-accordion-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gw2-accent-soft);
  border-radius: 10px;
  color: var(--gw2-accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.gw2-accordion-icon-calc {
  background: linear-gradient(135deg, var(--gw2-accent), #ea580c);
  color: white;
  box-shadow: 0 4px 12px rgba(var(--gw2-accent-rgb), 0.25);
}

.gw2-calculator-embed {
  padding-top: 0.5rem;
}

.gw2-accordion-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.gw2-accordion-title > span:first-child {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gw2-text);
}

.gw2-accordion-meta {
  font-size: 0.75rem;
  color: var(--gw2-text-muted);
}

.gw2-accordion-chevron {
  color: var(--gw2-text-muted);
  font-size: 0.875rem;
  transition: transform 0.25s;
}

.gw2-accordion[open] .gw2-accordion-chevron {
  transform: rotate(180deg);
}

.gw2-accordion-content {
  padding: 0 1rem 1rem;
}

/* ============================================
   GUIDE SECTIONS
   ============================================ */
.gw2-guide-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gw2-guide-item {
  display: flex;
  gap: 1rem;
}

.gw2-guide-number {
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gw2-accent);
  border-radius: 50%;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.gw2-guide-body h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gw2-text);
  margin: 0 0 0.5rem;
}

.gw2-guide-body p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--gw2-text-secondary);
  margin: 0;
}

/* ============================================
   FAQs
   ============================================ */
.gw2-faqs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gw2-faq {
  border-bottom: 1px solid var(--gw2-border);
  padding-bottom: 0.5rem;
}

.gw2-faq:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.gw2-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gw2-text);
  transition: color 0.2s;
}

.gw2-faq summary::-webkit-details-marker {
  display: none;
}

.gw2-faq summary:hover {
  color: var(--gw2-accent);
}

.gw2-faq summary i {
  font-size: 1rem;
  color: var(--gw2-text-muted);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.gw2-faq[open] summary i {
  transform: rotate(45deg);
}

.gw2-faq-answer {
  padding: 0 0 0.75rem 0;
}

.gw2-faq-answer p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--gw2-text-secondary);
  margin: 0;
}

/* ============================================
   CHECKLIST
   ============================================ */
.gw2-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gw2-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--gw2-surface-elevated);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.gw2-check-item:hover {
  background: var(--gw2-border);
}

.gw2-check-item input {
  display: none;
}

.gw2-check-box {
  width: 1.375rem;
  height: 1.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gw2-border-strong);
  border-radius: 6px;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s;
}

.gw2-check-item input:checked + .gw2-check-box {
  background: var(--gw2-success);
  border-color: var(--gw2-success);
  color: white;
}

.gw2-check-text {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--gw2-text);
  transition: color 0.2s;
}

.gw2-check-item input:checked ~ .gw2-check-text {
  color: var(--gw2-text-muted);
  text-decoration: line-through;
}

/* ============================================
   CALCULATOR COMPONENTS
   ============================================ */
.gw2-calc {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gw2-calc-inputs {
  display: grid;
  gap: 0.875rem;
}

.gw2-calc-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gw2-text);
  margin-bottom: 0.375rem;
}

.gw2-calc-input-wrap {
  display: flex;
  align-items: center;
  background: var(--gw2-surface-elevated);
  border: 1px solid var(--gw2-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.gw2-calc-input-wrap:focus-within {
  border-color: var(--gw2-accent);
}

.gw2-calc-prefix,
.gw2-calc-suffix {
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: var(--gw2-text-muted);
  background: var(--gw2-surface);
}

.gw2-calc-input-wrap input {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1rem;
  color: var(--gw2-text);
  outline: none;
  font-family: inherit;
}

.gw2-calc-input-wrap input::-webkit-inner-spin-button,
.gw2-calc-input-wrap input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.gw2-calc-field select {
  width: 100%;
  padding: 0.75rem;
  background: var(--gw2-surface-elevated);
  border: 1px solid var(--gw2-border);
  border-radius: 10px;
  font-size: 0.9375rem;
  color: var(--gw2-text);
  cursor: pointer;
  font-family: inherit;
}

.gw2-calc-hint {
  font-size: 0.75rem;
  color: var(--gw2-text-muted);
  margin-top: 0.25rem;
}

.gw2-calc-results {
  display: grid;
  gap: 0.625rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(var(--gw2-accent-rgb), 0.08), rgba(var(--gw2-accent-rgb), 0.02));
  border: 1px solid rgba(var(--gw2-accent-rgb), 0.15);
  border-radius: 14px;
}

.gw2-calc-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gw2-calc-result-label {
  font-size: 0.8125rem;
  color: var(--gw2-text-secondary);
}

.gw2-calc-result-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gw2-text);
}

.gw2-calc-result-primary {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gw2-border);
}

.gw2-calc-result-primary .gw2-calc-result-value {
  font-size: 1.5rem;
  color: var(--gw2-accent);
}

.gw2-calc-result-breakdown {
  padding: 0.75rem 0;
  border-top: 1px solid var(--gw2-border);
  border-bottom: 1px solid var(--gw2-border);
}

.gw2-calc-breakdown-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--gw2-text-muted);
  padding: 0.25rem 0;
}

.gw2-calc-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.875rem;
  background: rgba(var(--gw2-accent-rgb), 0.08);
  border-radius: 10px;
  font-size: 0.8125rem;
  color: var(--gw2-text-secondary);
  line-height: 1.5;
}

.gw2-calc-tip i {
  color: var(--gw2-accent);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* Budget Calculator */
.gw2-calc-budget-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gw2-calc-budget-category {
  padding: 1rem;
  border-radius: 12px;
}

.gw2-calc-budget-category.needs {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.gw2-calc-budget-category.wants {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.gw2-calc-budget-category.savings {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.gw2-calc-budget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gw2-calc-budget-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gw2-text);
}

.gw2-calc-budget-amount {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--gw2-text);
}

.gw2-calc-budget-desc {
  font-size: 0.75rem;
  color: var(--gw2-text-muted);
  margin: 0.375rem 0 0;
  line-height: 1.4;
}

/* Emergency Fund Progress */
.gw2-calc-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.gw2-calc-progress-bar {
  flex: 1;
  height: 10px;
  background: var(--gw2-surface);
  border-radius: 5px;
  overflow: hidden;
}

.gw2-calc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gw2-success), #34d399);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.gw2-calc-progress-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gw2-success);
  white-space: nowrap;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  .gw2-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  
  .gw2-modal {
    max-height: 95vh;
    border-radius: 24px 24px 0 0;
  }
  
  .gw2-view {
    padding: 1.25rem;
  }
  
  .gw2-goals-intro h1 {
    font-size: 1.5rem;
  }
  
  .gw2-plan-hero {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .gw2-backdrop,
  .gw2-modal,
  .gw2-goal-card,
  .gw2-view {
    transition: none;
    animation: none;
  }
  
  .gw2-goal-card {
    opacity: 1;
  }
}

/* ============================================
   PLAN NAVIGATION (Share/Print)
   ============================================ */
.gw2-plan-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.gw2-plan-nav-actions {
  display: flex;
  gap: 0.5rem;
}

.gw2-share-btn,
.gw2-print-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--gw2-surface);
  border: 1px solid var(--gw2-border);
  border-radius: 10px;
  color: var(--gw2-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.gw2-share-btn:hover,
.gw2-print-btn:hover {
  background: var(--gw2-surface-elevated);
  color: var(--gw2-accent);
  border-color: var(--gw2-accent);
}

/* ============================================
   CHECKLIST PROGRESS BAR
   ============================================ */
.gw2-checklist-progress {
  position: relative;
  height: 28px;
  background: var(--gw2-surface);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.gw2-checklist-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gw2-success), #34d399);
  border-radius: 8px;
  transition: width 0.4s ease;
}

.gw2-checklist-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gw2-text-secondary);
  z-index: 1;
}

.gw2-check-item.checked .gw2-check-text {
  text-decoration: line-through;
  opacity: 0.6;
}

/* ============================================
   DISCLAIMER
   ============================================ */
.gw2-disclaimer {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--gw2-surface);
  border-radius: 10px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--gw2-text-muted);
  text-align: center;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.gw2-toast {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.75rem 1.25rem;
  background: var(--gw2-text);
  color: var(--gw2-bg);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
}

.gw2-toast.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  /* Hide everything except the widget */
  body > *:not(.gw2-backdrop) {
    display: none !important;
  }
  
  .gw2-backdrop {
    position: static !important;
    background: white !important;
    padding: 0 !important;
  }
  
  .gw2-modal {
    position: static !important;
    max-width: 100% !important;
    max-height: none !important;
    transform: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  
  .gw2-modal-inner {
    max-height: none !important;
  }
  
  .gw2-header,
  .gw2-plan-nav,
  .gw2-quick-actions,
  .gw2-view-goals {
    display: none !important;
  }
  
  .gw2-view-plan {
    display: block !important;
    opacity: 1 !important;
    padding: 0 !important;
  }
  
  .gw2-body {
    overflow: visible !important;
    max-height: none !important;
  }
  
  .gw2-accordion {
    break-inside: avoid;
  }
  
  .gw2-accordion[open] {
    display: block !important;
  }
  
  .gw2-accordion-content {
    display: block !important;
  }
  
  .gw2-plan-hero {
    background: #f5f5f5 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  
  .gw2-plan-hero-icon {
    background: #ddd !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  
  .gw2-checklist-progress {
    background: #eee !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  
  .gw2-checklist-progress-bar {
    background: #22c55e !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
