/* Banner Image Styles with Gradient Overlay */
.action-title {
  text-transform: uppercase;
  font-size: 5.5rem !important;
  font-weight: 400 !important;
  letter-spacing: -0.06em;
  margin-bottom: 0px !important;
}

@media (max-width: 640px) {
 .action-title {
    font-size: 3rem !important;
  }
}

.action-banner {
  width: 100%;
  margin: 0.5rem 0 2rem 0 !important;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative; /* Needed for positioning the gradient overlay */
}

.banner-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
  
/* Dashboard Metrics */
.dashboard-metrics {
  margin-bottom: 2rem;
}

.metrics-container {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

/* Metric Cards */
.metric-card {
  font-family: 'HK Grotesk';
  background-color: var(--vff-bg-color, #FFFFFF);
  border-radius: 0.5rem;
  padding: 1.5rem 1rem;
  display: flex;
  min-height: 13rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.card-upper {
  min-height: 7rem;
}

.metric-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 10px 15px rgba(0,0,0,0.1);
}

/* Card Types */
.metric-card.primary {
  border-top: 4px solid var(--fff-heading-color, #f12d34);
}

.metric-card.secondary {
  border-top: 4px solid var(--vff-main-accent-color, #CAFF11);
}

/* Metric Values */
.metric-value, .metric-value-small {
  padding-top: 1rem;
  font-size: 4.5rem;
  font-weight: 500;
  line-height: 0.7;
  color: var(--vff-main-text-color, #113b3b);
  margin-bottom: 0.75rem;
}

.metric-value-small {
  font-size: 2rem;
  color: var(--vff-main-text-color, #113b3b);
}

.metric-estimate {
  font-size: 3.5rem;
  color: #444444 !important;
}

.metric-card.primary .metric-value {
  color: var(--fff-heading-color, #f12d34);
}

.metric-card.secondary .metric-value {
  color: var(--vff-main-accent-color, #CAFF11);
}

/* Metric Labels */
.metric-label {
  font-family: 'HK Grotesk';
  font-size: 1rem;
  font-weight: 400;
  color: var(--vff-secondary-text-color, #666666);
  text-align: center;
}

.metric-label-small {
  font-size:0.7rem;
  margin-bottom: 0.5rem;
  width: 66%;
  margin-left: auto;
  margin-right: auto;
}

.non-color {
  border-top: 0 !important;
}

/* Progress Visualization */
.progress-visualization {
  width: 120px;
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.progress-donut {
  width: 100%;
  margin: auto;
  margin-left: 2rem;
  height: auto;
}

/* Thresholds Visualization */
.thresholds-visualization {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.threshold-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.threshold-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--vff-tertiary-text-color, #f1f1f1);
  border: 2px solid var(--vff-secondary-text-color, #666666);
}

.threshold-dot.reached {
  background-color: var(--vff-main-accent-color, #CAFF11);
  border-color: var(--vff-secondary-accent-color, #BBEBD5);
}

.threshold-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vff-main-text-color, #113b3b);
}

/* Event Details */
.event-details-container {
  margin-bottom: 2rem;
}

.event-details-card {
  padding-bottom: 1.2rem;
  line-height: 1.0;
  margin-bottom: 0rem;
  border-bottom: 1px solid var(--vff-tertiary-text-color, #f1f1f1);
}

.detail-row {
  margin-bottom: 0.15rem;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-row strong {
  color: var(--vff-main-text-color, #113b3b);
  font-weight: 600;
  margin-right: 0.5rem;
}

/* Description */
.description-container {
  margin-bottom: 2rem;
}

.action-description {
  line-height: 1.6;
  color: var(--vff-main-text-color, #113b3b);
}


/* Threshold Bar Charts */
.threshold-bars-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.threshold-bar-item {
  width: 100%;
}

.threshold-label-small {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--vff-main-text-color, #113b3b);
  margin-bottom: 1rem;
}

.threshold-bar-container {
  height: 5px;
  background-color: var(--vff-tertiary-text-color, #f1f1f1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.25rem;
  padding: 1rem;
}

.threshold-bar {
  height: 100%;
  background-color: var(--fff-heading-color, #f12d34);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.threshold-bar.reached {
  background-color: var(--vff-main-accent-color, #CAFF11);
}

.threshold-count {
  font-size: 0.75rem;
  color: var(--vff-secondary-text-color, #666666);
  text-align: right;
}

.no-thresholds {
  color: var(--vff-secondary-text-color, #666666);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem 0;
}

/* Vertical Bar Charts */
.vertical-bars-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  width: 100%;
  padding-top: 1rem;
  padding-left: 1rem;
  padding-right: 1.5rem;
  margin-bottom: 0.75rem;
}

.vertical-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.bar-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
}

.bar-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vff-main-text-color, #113b3b);
  margin-bottom: 0.25rem;
}

.vertical-bar-wrapper {
  width: 2rem;
  height: 80px;
  background-color: var(--vff-tertiary-text-color, #f1f1f1);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.vertical-bar {
  width: 160%;
  background-color: var(--fff-heading-color, #f12d34);
  border-radius: 4px 4px 0 0;
  position: absolute;
  bottom: 0;
  left: -30%;
  transition: height 0.5s ease;
}

.vertical-bar.reached {
  background-color: var(--vff-main-accent-color, #CAFF11);
}

.threshold-target {
  font-size: 0.75rem;
  color: var(--vff-secondary-text-color, #666666);
  margin-top: 0.5rem;
}


/* Make sure the metric cards have position relative */
.metric-card {
  position: relative;
  /* ...existing styles... */
}
  .vertical-bar-background {
  position: absolute;
  bottom: 0;
  left: -30%;
  width: 160%;
  background-color: var(--vff-tertiary-text-color, #f1f1f1);
  border-radius: 4px;
}

.vertical-bar-wrapper {
  width: 24px;
  height: 80px;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: flex-end;
  background: transparent;
}

.bar-chart-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
/* For the card rotation effect */
.metric-card .primary-content {
  opacity: 1;
  transition: opacity 1s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
}

.metric-card .secondary-content {
  opacity: 0;
  transition: opacity 1s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
}

.metric-card:hover .primary-content {
  opacity: 0;
}

.metric-card:hover .secondary-content {
  opacity: 1;
}

/* Style for the combined card */
.metric-card.double-width {
  grid-column: span 2; /* Make the card span 2 columns */
}

/* Adjust the content layout for the combined card */
.combined-metrics {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.progress-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 1rem;
  position: relative;
}

.thresholds-section {
  flex: 1;
  border-left: 1px solid var(--vff-tertiary-text-color, #f1f1f1);
  padding-left: 1rem;
}

/* Optional hover effect for the dual content */
.progress-section .primary-content,
.progress-section .secondary-content {
  transition: opacity 0.5s ease;
  text-align: center;
  width: 100%;
}

.progress-section .secondary-content {
  opacity: 0;
  position: absolute;
  top: 0;
}

.progress-section:hover .primary-content {
  opacity: 0;
}

.progress-section:hover .secondary-content {
  opacity: 1;
}

  /* Tooltip styles */
.tooltip-container {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
}

.tooltip-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  background-color: var(--vff-bg-color, #FFFFFF);
  color: var(--vff-secondary-text-color, #666666);
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tooltip-trigger:hover {
  background-color: var(--vff-secondary-text-color, #666666);
  color: var(--vff-bg-color, #FFFFFF);
}

.tooltip-content {
  position: absolute;
  top: 100%;
  right: -10px;
  margin-top: 8px;
  background-color: var(--vff-bg-color, #FFFFFF) !important;
  color: var(--vff-main-text-color, #113b3b);
  padding: 8px 12px;
  border-radius: 4px;
  width: 200px;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  z-index: 100;
}

.tooltip-container:hover .tooltip-content {
  visibility: visible;
  background-color: var(--vff-bg-color, #FFFFFF) !important;
  opacity: 1;
}
  /* Add these styles to your existing CSS */
.thresholds-section {
  position: relative;
}

.thresholds-section .primary-content,
.thresholds-section .secondary-content {
  transition: opacity 0.5s ease;
  text-align: center;
  width: 100%;
}

.thresholds-section .secondary-content {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
}

.thresholds-section:hover .primary-content {
  opacity: 0;
}

.thresholds-section:hover .secondary-content {
  opacity: 1;
}

/* Style for estimated bars */
.vertical-bar.estimated-reached {
  background-color: rgba(202, 255, 17, 0.6); /* Lighter version for estimates */
}

/* Add a tilde style for estimated values */
.bar-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vff-main-text-color, #113b3b);
  margin-bottom: 0.25rem;
}

/* CSS for the metrics group wrapper */
.metrics-container {
  min-height: 4rem;
  margin-top: 1rem;
  display: grid;
  /* grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); */
  gap: 1rem;
}

/* Add this new class for the grouped metrics */
.metrics-group {
  display: contents; /* This makes the children appear as direct children of the grid container */
}

.metrics-group-wrapper {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* For mobile views, ensure the cards stay together */
@media (max-width: 767px) {
  .metrics-group {
    grid-column: 1 / -1; /* Span all columns */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
  }
}

/* Style for estimated bars */
.vertical-bar.estimated-reached {
  background-color: rgba(202, 255, 17, 0.7); /* Slightly transparent version for estimates */
}

/* Style for the estimated values */
.bar-value {
  height: 18px; /* Fixed height to prevent jumping */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animation styles for thresholds */

/* Base styles - adding transitions for smooth animations */
.vertical-bar {
  width: 160%;
  border-radius: 4px 4px 0 0;
  position: absolute;
  bottom: 0;
  left: -30%;
  transition: height 1.2s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy animation for height changes */
}

/* Animate bars on page load with staggered delay */
@keyframes fillUpBar {
  from { height: 0; }
  to { height: var(--fill-height); }
}

/* Special animation for reached thresholds */
@keyframes pulseReached {
  0% { box-shadow: 0 0 0 0 rgba(202, 255, 17, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(202, 255, 17, 0); }
  100% { box-shadow: 0 0 0 0 rgba(202, 255, 17, 0); }
}

/* Animation for when threshold is crossed */
@keyframes thresholdCrossed {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  75% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Apply the animations to relevant elements */
.vertical-bar.reached {
  background-color: var(--vff-main-accent-color, #CAFF11);
  animation: pulseReached 2s infinite;
}

.vertical-bar.estimated-reached {
  background-color: rgba(202, 255, 17, 0.7);
  animation: pulseReached 3s infinite;
}

.vertical-bar-wrapper:hover .threshold-line {
  width: 48px;
  background-color: #333;
  height: 3px;
}

/* Style for threshold target marker with positioning */
.threshold-target {
  font-size: 0.75rem;
  color: var(--vff-secondary-text-color, #666666);
  margin-top: 0.5rem;
  position: relative;
  transition: all 0.3s ease;
}

/* Enhanced hover effects for the bars */
.vertical-bar-wrapper:hover .vertical-bar {
  filter: brightness(1.1);
}

/* Add a tooltip effect for the threshold values */
.threshold-tooltip {
  position: absolute;
  background-color: rgba(17, 59, 59, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  z-index: 10;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
}

.bar-chart-container:hover .threshold-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Progress percentage indicator */
.progress-indicator {
  position: absolute;
  font-size: 0.7rem;
  color: #666;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
}

.bar-chart-container:hover .progress-indicator {
  opacity: 1;
}

/* Enhance the progress donut with animation */
.progress-donut circle:nth-child(2) {
  transition: stroke-dashoffset 1.5s ease-in-out;
  stroke-linecap: round;
}

/* Animation for progress on page load */
.progress-arc-animated {
  animation: fillProgress 1.5s ease-out forwards;
}

@keyframes fillProgress {
  from { stroke-dashoffset: calc(2 * 3.14159 * 54); }
  to { stroke-dashoffset: var(--dash-offset); }
}

/* Add a subtle notification indicator for reached thresholds */
.checkmark {
  position: absolute;
  top: -5px;
  right: -12px;
  font-size: 0.9rem;
  color: var(--vff-main-accent-color, #CAFF11);
  text-shadow: 0 0 3px rgba(0,0,0,0.3);
  opacity: 0;
  animation: fadeIn 0.5s ease-out 1s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

/* Flip indicator for cards */
.flip-indicator {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.7rem;
  color: #666;
  opacity: 0.7;
  transition: opacity 1s ease;
}

/* Add a helper text for the bars container */
.bars-helper-text {
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  color: #666;
  opacity: 0;
  transition: opacity 0.5s ease 2s;
}

.metric-card:hover .bars-helper-text {
  opacity: 1;
  transition-delay: 0s;
}

/* Add a "flipping" indicator */
.flip-indicator {
  position: absolute;
  top: 8px;
  right: 30px;
  font-size: 0.7rem;
  color: #666;
  opacity: 0.7;
}

/* Achievements message box styles */


.achievements-message {
    margin-top: -1rem !important;
    padding: 1rem 2rem;
    font-family: 'HK Grotesk';
    border-radius: 8px;
    /* background-color: rgba(202, 255, 17, 0.15); */
    border-left: 0.4rem solid #ff7703;
    font-size: 1rem;
    line-height: 1.15;
    color: var(--vff-main-text-color, #113b3b);
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.achievements-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgb(255 246 17 / 10%), transparent);
  animation: shimmer 2s infinite;
  z-index: 0;
}

.achievements-message-content {
  position: relative;
  z-index: 1;
}

.achievement-highlight {
  font-weight: 600;
  color: #f7aa2e;
}

.next-goal {
  margin-top: 0.2rem;
  font-style: italic;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Add styling for the celebrated threshold */
.celebrated-threshold {
  display: inline-block;
  background-color: rgba(202, 255, 17, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

/* Add auto-flip label */
.auto-flip-label {
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
  font-size: 0.7rem;
  color: #777;
}

/* Auto-flip animation for cards - fixed version */

/* First, remove the hover-based flipping which is conflicting with the auto-flip */
.metric-card:hover .primary-content {
    opacity: 1; /* Override the hover-based opacity change */
  }
  
  .metric-card:hover .secondary-content {
    opacity: 0; /* Override the hover-based opacity change */
  }
  
  /* Define the animations for auto-flipping */
  @keyframes flipContent {
    0%, 45% { opacity: 1; }
    50% { opacity: 0; }
    55%, 95% { opacity: 0; }
    100% { opacity: 1; }
  }
  
  @keyframes flipContentReverse {
    0%, 45% { opacity: 0; }
    50% { opacity: 1; }
    55%, 95% { opacity: 1; }
    100% { opacity: 0; }
  }
  
  /* Apply auto-flip animations to content */
  .metric-card .primary-content {
    animation: flipContent 10s infinite;
    transition: none; /* Remove the transition */
  }
  
  .metric-card .secondary-content {
    animation: flipContentReverse 10s infinite;
    transition: none; /* Remove the transition */
  }
  
  /* Add animation indicator */
  .flip-indicator {
    position: absolute;
    top: 8px;
    right: 30px;
    font-size: 0.7rem;
    color: #666;
    opacity: 0.7;
  }
  
  /* Set fixed positioning for the content containers */
  .metric-card .primary-content,
  .metric-card .secondary-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
  }


/* Responsive Adjustments */
@media (max-width: 640px) {
    .banner-image {
      height: 408px !important;
      width: auto !important;
    }
  
    .metrics-container {
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 0.75rem;
    }
    
    .simple {
      min-height: 7rem;  
    }

    .simple-img {
      height: auto !important;
    }

    .metric-value {
      font-size: 3.5rem;
    }
    
    .metric-label {
      font-size: 0.875rem;
    }
    
    .action-title {
      font-size: 1.5rem;
    }
    
    .progress-donut {
      margin-left: 0.5rem;
    }

    .progress-visualization {
      margin-left: 1.1rem;
    }
  
    .achievements-message {
      font-size: 0.8rem;
      line-height: 1.5;
      padding: 1rem 1rem;
    }
  }