* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
}

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #6ee7b7;
  --primary-bg: #f0fdf4;
  --secondary: #22c55e;
  --accent: #0ea5e9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #111827;
  --light: #f9fafb;
  --gray: #6b7280;
  --gray-light: #e5e7eb;
  --gray-dark: #4b5563;
  --input-bg: #ffffff;
  --card-bg: #ffffff;
}

body {
  background-color: #f1f5f9;
  min-height: 100vh;
  padding: 30px;
  margin: 0;
}

.calculator-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Logo on left, title on right */
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 1rem 2rem;
  position: relative;
  border-bottom: 5px solid var(--secondary);
  border-radius: 0.5rem 0.5rem 0 0;
}

.site-logo {
  max-height: 60px; /* Adjust as needed */
  margin-right: 1rem;
}

.header::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 30%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1));
  transform: skewX(-30deg);
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.calculator-icon {
  font-size: 1.5rem;
}

/* Adjust the grid layout to have 3 columns in first row */
.form-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* Using 6 columns for more flexibility */
  gap: 1rem;
  padding: 1rem;
  background-color: #f1f5f9;
}

/* Position the first row cards (each takes 2 columns = 1/3 width) */
.form-container > .form-section:nth-child(1) {
  grid-column: 1 / span 2;
  grid-row: 1;
}

.form-container > .form-section:nth-child(2) {
  grid-column: 3 / span 2;
  grid-row: 1;
}

.form-container > .form-section:nth-child(3) {
  grid-column: 5 / span 2;
  grid-row: 1;
}

/* Position the second row cards (each takes 3 columns = 1/2 width) */
.form-container > .form-section:nth-child(4) {
  grid-column: 1 / span 3;
  grid-row: 2;
}

.form-container > .form-section:nth-child(5) {
  grid-column: 4 / span 3;
  grid-row: 2;
}

/* Make all remaining elements span full width */
.form-container > *:nth-child(n+6) {
  grid-column: 1 / -1;
}

/* Adjust responsive behavior */
@media (max-width: 1024px) {
  .form-container > .form-section:nth-child(1) {
    grid-column: 1 / span 3;
  }
  
  .form-container > .form-section:nth-child(2) {
    grid-column: 4 / span 3;
  }
  
  .form-container > .form-section:nth-child(3) {
    grid-column: 1 / span 6;
    grid-row: 2;
  }
  
  .form-container > .form-section:nth-child(4) {
    grid-column: 1 / span 3;
    grid-row: 3;
  }
  
  .form-container > .form-section:nth-child(5) {
    grid-column: 4 / span 3;
    grid-row: 3;
  }
}

@media (max-width: 768px) {
  .form-container > .form-section:nth-child(n) {
    grid-column: 1 / span 6;
  }
  
  .form-container > .form-section:nth-child(1) { grid-row: 1; }
  .form-container > .form-section:nth-child(2) { grid-row: 2; }
  .form-container > .form-section:nth-child(3) { grid-row: 3; }
  .form-container > .form-section:nth-child(4) { grid-row: 4; }
  .form-container > .form-section:nth-child(5) { grid-row: 5; }
}

.form-section {
  background: var(--card-bg);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  border-top: 3px solid var(--primary);
  transition: all 0.2s ease;
}

.section-title {
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--gray-light);
  padding-bottom: 0.4rem;
}

.section-title i {
  margin-right: 0.5rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.form-group {
  margin-bottom: 0.65rem;
  position: relative;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--gray-dark);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}

.currency-symbol, 
.percentage-symbol {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-weight: 600;
  color: var(--gray);
  z-index: 1;
  background-color: #eef2ff;
  border: 2px solid var(--gray-light);
}

.currency-symbol {
  left: 0;
  width: 36px;
  border-right: none;
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}

.form-control {
  width: 100%;
  height: 2.5rem;
  border: 2px solid var(--gray-light);
  border-radius: 0.25rem;
  font-size: 0.95rem;
  background: var(--input-bg);
  transition: all 0.2s;
  color: var(--dark);
  font-weight: 500;
}

.input-wrapper {
  position: relative;
}

.percentage-input {
  width: 100%;
  height: 2.5rem;
  border: 2px solid var(--gray-light);
  border-radius: 0.25rem;
  padding-right: 25px; /* Make room for the % symbol */
  font-size: 0.95rem;
  text-align: right;
}

.percentage-symbol {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray);
  pointer-events: none;
  background-color: transparent;
  border: none;
  width: auto;
  height: auto;
  display: inline;
  z-index: 2;
}

.currency-input {
  padding: 0 0.5rem 0 36px;
}

.regular-input {
  padding: 0 0.5rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.form-control:hover,
.percentage-input:hover,
.variable-expenses-card .percentage-field:hover {
  border-color: var(--primary-light);
  transition: all 0.2s ease;
}

/* Radio buttons */
.radio-container {
  display: flex;
  border-radius: 0.25rem;
  overflow: hidden;
  margin-top: 0.25rem;
}

.radio-option {
  flex: 1;
  position: relative;
}

.radio-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-option label {
  display: block;
  padding: 0.5rem;
  text-align: center;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--light);
  border: 2px solid var(--gray-light);
  color: var(--gray-dark);
}

.radio-option:first-child label {
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
  border-right: none;
}

.radio-option:last-child label {
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

.radio-option input:checked + label {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
}

/* Select styling */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* Results section */
.results-section {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  margin-top: 0.5rem;
  border-top: 3px solid var(--accent);
}

@media (max-width: 768px) {
  .results-section {
    grid-column: 1 / -1;
  }
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

@media (max-width: 1200px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.result-card {
  background: linear-gradient(135deg, #ffffff, #f9fafb);
  border-radius: 0.25rem;
  padding: 0.75rem;
  border-left: 3px solid var(--gray-light);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.3s;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.key-result {
  background: linear-gradient(135deg, #ecfdf5, #f8fafc);
  border-left: 3px solid var(--primary);
}

.cash-flow-result {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), #f8fafc);
  border-left: 3px solid var(--success);
}

/* Update risk result (cash recovery) from red to green */
.risk-result {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), #f8fafc);
  border-left: 3px solid var(--primary); /* Changed from danger/red to primary green */
}

/* Update negative cashflow colors */
.payback-status-negative {
  color: var(--primary-dark); /* Changed from red to dark green for consistency */
}

#paybackPeriod.negative-cashflow {
  color: var(--primary-dark); /* Changed from red to dark green for consistency */
}

.result-label {
  font-size: 0.75rem;
  color: var(--gray);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.result-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}

.positive {
  color: var(--success);
  font-weight: 700;
}

.negative {
  color: var(--danger);
}

/* Breakdown section */
.breakdown-section {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  margin-top: 0.5rem;
  border-top: 3px solid var(--secondary);
}

@media (max-width: 768px) {
  .breakdown-section {
    grid-column: 1 / -1;
  }
}

.breakdown-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 1024px) {
  .breakdown-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .breakdown-content {
    grid-template-columns: 1fr;
  }
}

.breakdown-card {
  border-radius: 0.25rem;
  padding: 0.75rem;
  border: 1px solid var(--gray-light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.breakdown-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.breakdown-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Solid Background Colors with matching title colors */
.breakdown-card.primary-gradient {
  background: #d1fae5 !important; /* Light green */
  border-left: 3px solid var(--primary-dark) !important;
}

.breakdown-card.primary-gradient .breakdown-title {
  color: var(--primary-dark);
}

.breakdown-card.secondary-gradient {
  background: #d1fae5 !important; /* Lighter green */
  border-left: 3px solid var(--primary) !important;
}

.breakdown-card.secondary-gradient .breakdown-title {
  color: var(--primary);
}

.breakdown-card.warning-gradient {
  background: #a7f3d0  !important; /* Changed from amber to light green */
  border-left: 3px solid var(--primary) !important; /* Changed from warning to primary */
}

.breakdown-card.warning-gradient .breakdown-title {
  color: var(--primary-dark);
  }

.breakdown-card.success-gradient {
  background: #86efac !important; /* Light green */
  border-left: 3px solid var(--success) !important;
}

.breakdown-card.success-gradient .breakdown-title {
  color: var(--success);
}

.breakdown-card.danger-gradient {
  background: #fca5a5 !important; /* Light red */
  border-left: 3px solid var(--danger) !important;
}

.breakdown-card.danger-gradient .breakdown-title {
  color: var(--danger);
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.breakdown-label {
  font-size: 0.85rem;
  color: var(--gray-dark);
}

.breakdown-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}

.breakdown-total {
  margin-top: 0.3rem;
  padding: 0.4rem;
  background-color: rgba(16, 185, 129, 0.05);
  border-radius: 0.25rem;
}

.breakdown-total .breakdown-label,
.breakdown-total .breakdown-value {
  font-weight: 700;
  color: var(--primary-dark);
}

/* Button styling */
.action-button {
  grid-column: 1 / -1;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  height: 2.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin-top: 0.5rem;
}

.action-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  transform: translateX(-100%);
  transition: transform 0.6s;
  z-index: -1;
}

.action-button:hover::before {
  transform: translateX(100%);
}

@media (max-width: 768px) {
  .action-button {
    grid-column: 1 / -1;
  }
}

.action-button:hover {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.4);
}

.action-button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

/* Info tooltip styling */
.info-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  background-color: var(--primary-light);
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-left: 0.3rem;
  font-size: 0.65rem;
  cursor: help;
  position: relative;
}

.info-icon:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translate(-50%, -100%);
  background: var(--dark);
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: normal;
  width: 180px;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.info-icon:hover::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: var(--dark) transparent transparent transparent;
  z-index: 100;
}

/* Disclaimer */
.disclaimer {
  grid-column: 1 / -1;
  background-color: #ffffff;
  padding: 0.75rem;
  border-radius: 0.25rem;
  margin-top: 0.5rem;
  border-left: 3px solid var(--gray);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.disclaimer h3 {
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.disclaimer p {
  font-size: 0.8rem;
  color: var(--gray-dark);
  margin-bottom: 0.4rem;
}

/* Error message styling */
.error-message {
  color: var(--danger);
  font-size: 0.75rem;
  margin-top: 0.2rem;
  display: none;
}

/* Add invalid input highlighting */
.form-control.invalid {
  border-color: var(--danger);
  background-color: rgba(239, 68, 68, 0.05);
}

/* Custom color variants */
.fixed-expenses-card {
  border-top: 3px solid var(--primary);
}
.fixed-expenses-title {
  color: var(--primary);
}

.variable-expenses-card {
  border-top: 3px solid var(--secondary);
}
.variable-expenses-title {
  color: var(--secondary);
}

.acquisition-card {
  border-top: 3px solid var(--primary); /* Changed from warning/yellow to primary green */
}

.acquisition-title {
  color: var(--primary); /* Changed from warning/yellow to primary green */
}

.financing-card {
  border-top: 3px solid var(--primary);
}
.financing-title {
  color: var(--primary);
}

/* Single line variable expenses layout */
.variable-expenses-card .expenses-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

.variable-expenses-card .expense-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.variable-expenses-card .expense-label {
  font-size: 0.85rem;
  color: var(--gray-dark);
  margin-bottom: 5px;
  display: flex;
  align-items: right;
}

.variable-expenses-card .input-container {
  position: relative;
  width: 100%;
}

/* Fixed width input field with proper padding for the % symbol */
.variable-expenses-card .percentage-field {
  width: 100%;
  height: 2.2rem;
  border: 2px solid var(--gray-light);
  border-radius: 0.25rem;
  padding-right: 25px; /* Make room for the % symbol */
  font-size: 0.95rem;
  text-align: right;
}

/* Position the percentage symbol right after the number */
.variable-expenses-card .percentage-symbol {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray);
  pointer-events: none;
}

/* Info icon styling */
.variable-expenses-card .info-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  background-color: var(--primary-light);
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-left: 0.3rem;
  font-size: 0.65rem;
  cursor: help;
}

/* Print styles for reports */
@media print {
  body {
    padding: 0;
    background: white;
  }
  
  .calculator-container {
    max-width: 100%;
  }
  
  .form-section, .results-section, .breakdown-section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .action-button {
    display: none;
  }
}

/* Improved mobile experience */
@media (max-width: 640px) {
  body {
    padding: 15px;
  }
  
  .header h1 {
    font-size: 1.5rem;
  }
  
  .result-value {
    font-size: 1.1rem;
  }
  
  .form-control {
    height: 2.3rem;
  }
}

/* For percentage inputs in the financing section */
.financing-card .input-wrapper {
  position: relative;
  max-width: 120px; /* Restrict the width of the input */
}

.financing-card .percentage-input {
  text-align: right; /* Right-align the text for better appearance */
  padding-right: 25px; /* Room for the % symbol */
  font-weight: 600; /* Make the numbers bolder */
  color: var(--primary-dark); /* Use the primary dark color for emphasis */
}

.financing-card .percentage-symbol {
  position: absolute;
  left: auto; /* Reset any left positioning */
  right: 8px; /* Keep symbol on right side but close to the number */
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray);
  pointer-events: none;
}

/* Ensure the fixed-expenses card has the same styling as variable expenses */
.fixed-expenses-card .expenses-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.fixed-expenses-card .expense-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.fixed-expenses-card .expense-label {
  font-size: 0.85rem;
  color: var(--gray-dark);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
}

.fixed-expenses-card .input-container {
  position: relative;
  width: 100%;
}

.fixed-expenses-card .input-wrapper {
  margin: 0;
}

@media (max-width: 640px) {
  .expenses-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .expense-group {
    width: 100%;
  }
}

/* Add these CSS rules to fix the alignment of expense fields */

/* Fixed height and vertical alignment for expense labels */
.fixed-expenses-card .expense-label,
.variable-expenses-card .expense-label {
  height: 40px; /* Fixed height for all labels */
  display: flex;
  align-items: flex-start; /* Align text to top */
  min-height: 2.5em; /* Minimum height to fit two lines */
}

/* Fix the expense group layout to ensure aligned inputs */
.fixed-expenses-card .expense-group,
.variable-expenses-card .expense-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 120px;
}

/* Make all input containers the same height */
.fixed-expenses-card .input-container,
.variable-expenses-card .input-container {
  margin-top: auto; /* Push inputs to bottom of container */
}

/* Ensure input fields have consistent height */
.fixed-expenses-card .form-control,
.variable-expenses-card .percentage-field {
  height: 2.2rem;
}

/* Add some bottom margin to the label to ensure spacing */
.fixed-expenses-card .expense-label,
.variable-expenses-card .expense-label {
  margin-bottom: 8px;
}

/* Keep the responsive behavior */
@media (max-width: 640px) {
  .expenses-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .expense-group {
    width: 100%;
  }
  
  /* Reset heights for mobile view */
  .fixed-expenses-card .expense-label,
  .variable-expenses-card .expense-label {
    height: auto;
    min-height: auto;
  }
}
/* Create a flex container for the payment fields */
.financing-card .payment-fields {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 0.65rem;
}

/* Style the payment field groups */
.financing-card .payment-field {
  flex: 1;
}

/* Add this to your styles.css file */

/* Updated AI Commentary styling to match the site's green theme */

.ai-commentary-section {
    margin-top: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.ai-commentary-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white;
    margin-top: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid var(--primary-dark);
}

.ai-commentary-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.ai-commentary-content {
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
    text-align: left;
    padding: 5px;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

@media (max-width: 768px) {
    .ai-commentary-content {
        font-size: 0.9rem;
    }
}

/* Add these styles to your existing CSS file */

/* Base styling for AI commentary card */
.ai-commentary-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

/* Performance-based color schemes */
.ai-commentary-poor {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(153, 27, 27, 0.8) 100%);
    border-left-color: #7f1d1d;
    color: white;
}

.ai-commentary-minimum {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.9) 0%, rgba(217, 119, 6, 0.8) 100%);
    border-left-color: #92400e;
    color: white;
}

.ai-commentary-average {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.8) 100%);
    border-left-color: #065f46;
    color: white;
}

.ai-commentary-excellent {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9) 0%, rgba(180, 83, 9, 0.8) 100%);
    border-color: #78350f;
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* For values that fall in-between thresholds */
.ai-commentary-poor-to-minimum {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8) 0%, rgba(251, 191, 36, 0.7) 100%);
    border-left-color: #b45309;
    color: white;
}

.ai-commentary-minimum-to-average {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.8) 0%, rgba(16, 185, 129, 0.7) 100%);
    border-left-color: #059669;
    color: white;
}

.ai-commentary-average-to-excellent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.8) 0%, rgba(245, 158, 11, 0.7) 100%);
    border-left-color: #b45309;
    color: white;
}

/* Create a sparkling effect for excellent returns */
@keyframes sparkle {
    0% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
    50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.8); }
    100% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
}

.ai-commentary-excellent {
    animation: sparkle 2s infinite;
}

/* Resources Section Styling */
.resources-section {
  width: 100%;
  margin: 1rem 0;
  padding: 0.5rem 0;
  text-align: center;
  background-color: var(--light);
  border-top: 1px solid var(--gray-light);
  border-bottom: 1px solid var(--gray-light);
}

.resources-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.resource-link {
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 600;
  position: relative;
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary);
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}

.resource-link:hover {
  background-color: var(--primary);
  color: white;
}

/* Tooltip styling (similar to info-icon) */
.resource-link::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s;
  z-index: 10;
}

.resource-link:hover::after {
  opacity: 1;
}
.about-section {
  border-top: 3px solid var(--primary); /* or var(--accent) if you prefer blue */
}

.about-title {
  color: var(--primary-dark); /* Title text color to match other sections */
}

/* Adjust spacing and text styling as needed */
.about-section p,
.about-section ul,
.about-section ol {
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.about-section ul {
  list-style-type: disc;
  margin-left: 1.5rem;
}
.about-section ol {
  list-style-type: decimal;
  margin-left: 1.5rem;
}
.about-section h3 {
  font-size: 1rem;
  margin-top: 0.75rem;
  font-weight: 600;
}
/* Section subtitle styling */
.section-subtitle {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 8px 15px;
    border-radius: 5px;
    margin-top: 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
}

.section-subtitle i {
    margin-right: 10px;
    color: #3498db;
}

/* Economic indicators styling - reduced vertical spacing */
.economic-indicators {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
}

.economic-indicator {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.indicator-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.indicator-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Adjust AI commentary card to fit within results - don't change the font color */
.ai-commentary-card {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}



/* Just keep the line height */
.ai-commentary-content {
    line-height: 1.6;
}
