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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f3f4f6;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1152px;
  margin: 0 auto;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.menu {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 2px solid #e5e7eb;
  gap: 1rem;
}

.menu a {
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: #4b5563;
  border-radius: 0.5rem;
  transition: all 0.2s;
  font-size: 0.95rem;
  font-weight: 500;
  border: 2px solid transparent;
  text-align: center;
  white-space: nowrap;
  flex: 1;
}

.menu a:hover {
  background-color: #f3f4f6;
  color: #1f2937;
  border-color: #d1d5db;
}

.menu a.active {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.main-title {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 2rem;
  color: #1f2937;
}

.subtitle {
  font-size: 1.125rem;
  font-weight: normal;
  color: #4b5563;
  margin-top: 0.5rem;
  display: block;
}

.item {
  position: relative;
  margin-bottom: 3rem;
}

.item-header {
  display: flex;
  align-items: flex-start;  /* Changed from center to flex-start for top alignment */
  margin-bottom: 1rem;
}

.item-title {
  font-weight: bold;
  font-size: 1.25rem;
  color: #1f2937;
}

.item-cost {
  margin-left: auto;
  text-align: right;
}

.total-cost {
  font-size: 1.5rem;
  font-weight: bold;
}

.avg-cost {
  font-size: 0.875rem;
  color: #2563eb;  /* Same blue as savings note */
}

.bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}

.bar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: visible;
}

.bar-label {
  min-width: 180px;
  max-width: 180px;
  font-size: 0.875rem;
  color: #4b5563;
  font-weight: 500;
  text-align: right;
  padding-right: 0.5rem;
  white-space: nowrap;
  overflow: visible; /* Changed from hidden to visible for tooltips */
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  position: relative;
  cursor: help;
}

/* Tooltip styles */
.tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.25rem;
}

.info-icon {
  font-size: 0.75rem;
  color: #9ca3af;
  cursor: help;
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  background: #f3f4f6;
  transition: all 0.2s;
}

.info-icon:hover {
  color: #4b5563;
  background: #e5e7eb;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  background: #1f2937;
  color: white;
  font-size: 0.8rem;
  font-weight: normal;
  white-space: pre-line; /* Allow line breaks */
  max-width: 450px;
  min-width: 250px;
  border-radius: 0.375rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1000;
  pointer-events: none;
  line-height: 1.4;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 8px;
  border: 4px solid transparent;
  border-top-color: #1f2937;
}

.bar-label:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

.bar-background {
  flex: 1;
  height: 2.5rem;
  background-color: #f3f4f6;
  border-radius: 0.5rem;
  overflow: visible; /* Allow reduction bars to show */
  position: relative;
}

.bar-fill {
  position: absolute;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  transition: width 0.5s ease-out, left 0.5s ease-out;
  border-radius: 0.5rem; /* Add radius to bar itself */
  overflow: visible; /* Allow text to overflow the bar */
}

.bar-text {
  color: white;
  font-weight: 500;
  white-space: nowrap;
}

.reduction-bar {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  transition: width 0.5s ease-out;
  border-radius: 0.5rem;
  z-index: 1; /* Ensure it's above background */
}

.export-bar .bar-text,
.colo-bar .bar-text {
  color: #4b5563;
}

/* Override - all export and colo bars use grey text */

.discount-overlay {
  position: absolute;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0.5rem 0.5rem 0;
  top: 0;
}

.discount-badge {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.75rem;
}

.export-bar {
  position: absolute;
  height: 100%;
  opacity: 0.9;
  transition: width 1s ease-out, left 1s ease-out;
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

.colo-bar {
  position: absolute;
  height: 100%;
  opacity: 0.7;
  transition: width 1s ease-out, left 1s ease-out;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.colo-text-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  justify-content: center;
  gap: 0.125rem;
}


.export-label {
  color: #374151;
  font-weight: 500;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding-left: 0.5rem;
  white-space: nowrap;
  font-size: 0.95rem;
}

.negative {
  background-color: #16a34a !important;
}

/* Zero line classes removed - using border-right on bars instead */

.details-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.detail {
  font-size: 0.875rem;
  color: #4b5563;
}

.savings-note {
  margin-top: -2rem;  /* Very tight - minimal gap between title and savings note */
  margin-bottom: 1.25rem;  /* Space before the bars */
  font-size: 0.875rem;
  color: #2563eb;
}

.item.simplified {
  margin-bottom: 2rem;
}

.title-section {
  flex: 1;
}

.item-subtitle {
  font-size: 1rem;
  font-weight: normal;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Simplified bar uses same styling as regular bars */

.details-simple {
  margin-top: 0.75rem;
}

.details-simple .detail {
  font-size: 0.875rem;
  color: #4b5563;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .details-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .item-cost {
    margin-left: 0;
    text-align: left;
  }
  
  .bar-label {
    min-width: 140px;
    max-width: 140px;
    font-size: 0.8rem;
  }
  
  .bar-wrapper {
    gap: 0.25rem;
  }
  
  .tooltip-content {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }
}

/* Header Styles - Matching exact styles from live sites */
.site-header {
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-neutral {
  background: #f3f4f6;
  border-bottom: 2px solid #e5e7eb;
  padding: 1.5rem 0;
}

.container-fluid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.site-header .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.hero-title {
  flex: 1;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: white;
  line-height: 1.2;
}

.site-header-neutral .hero-title {
  color: #1f2937;
  text-align: center;
}

.brand_link {
  color: white;
  text-decoration: none;
  transition: opacity 0.2s;
}

.brand_link:hover {
  opacity: 0.8;
}

.site-header .btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.site-header .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 2rem;
}

/* Report Header with Methodology Link */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 2rem;
}

.report-title-left {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.date-range {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  color: #6b7280;
}

.methodology-link {
  background: none;
  border: 1px solid #3b82f6;
  color: #3b82f6;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.methodology-link:hover {
  background: #3b82f6;
  color: white;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  width: 80%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-close {
  color: #9ca3af;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
}

.modal-close:hover,
.modal-close:focus {
  color: #4b5563;
}

.modal-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.modal-content p {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
}

/* Footer Styles - Matching exact styles from live sites */
.site-footer {
  padding: 2rem 0;
  margin-top: auto;
}

.site-footer-neutral {
  background: #1f2937;
  color: white;
  padding: 2rem 0;
  margin-top: auto;
  text-align: center;
}

.site-footer .container-fluid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-cepro-logo img {
  height: 40px;
  width: auto;
}

.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-info-list li {
  margin: 0;
}

.contact-info-list a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.contact-info-list a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.contact-info-list strong {
  font-weight: 600;
  margin-right: 0.25rem;
}

/* Selector Page Styles */
.selector-container {
  max-width: 600px;
  margin: 100px auto;
  padding: 2rem;
  text-align: center;
}

.selector-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #1f2937;
}

.selector-subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  margin-bottom: 3rem;
}

.selector-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.selector-button {
  display: inline-block;
  padding: 1.5rem 3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.selector-button.waterlilies {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.selector-button.hazelmead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .site-header .row {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-title {
    font-size: 1.25rem;
  }
  
  .site-footer .container-fluid {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-info-list {
    flex-direction: column;
    gap: 1rem;
  }
}