/* ROI Calculator Styles - 2AM Connect */
/* Performance-optimized, no external dependencies */

/* Integration in Prozess-Automatisierung Sektion */
/* Integration in Prozess-Automatisierung Sektion */
.roi-section {
  position: relative;
  overflow: hidden;
  /* Use clamp for responsive padding: min 4rem, preferred 8vh, max 8rem */
  padding-top: clamp(4rem, 8vh, 8rem);
  padding-bottom: clamp(4rem, 8vh, 8rem);
  background-color: #6b7c75;
  /* Sage Grey - Matching Reference */
  /* Removed Gradient for flat look */

  /* Ensure it takes at least full viewport height but allows growth */
  min-height: 100svh;
  display: flex;
  align-items: center;
  /* Center content vertically */
}

/* Fluid Typography for Headline within ROI Section */
.roi-section .big-text-h2 {
  /* Fluid scaling: starts at 3rem on mobile, scales with viewport width, caps at 8rem */
  font-size: clamp(3rem, 8vw, 8rem) !important;
  line-height: 1.1;
  color: #ffffff;
  /* Keep headline white on grey background */
}

.roi-bg-overlay {
  display: none;
  /* Removed for flat design */
}

.roi-content-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  /* Ensure full width */
}

.roi-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Explicitly define 2 columns */
  gap: clamp(2rem, 5vw, 5rem);
  /* Responsive gap */
  align-items: center;
  width: 100%;
}

.roi-left-column {
  padding-right: 2rem;
}

.roi-right-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Vertical centering */
  height: 100%;
  /* Ensure it takes full height of the grid cell */
  min-width: 0;
  /* Allow flex item to shrink below content size */
}

/* Controls Container - Simplified */
.roi-controls-left {
  background: transparent;
  /* Removed background for cleaner look */
  padding: 1.5rem 0;
  /* Removed side padding as it's not in a box anymore */
  border: none;
  backdrop-filter: none;
}

.roi-slider-container {
  margin-bottom: 0;
}

.roi-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  color: #0f172a;
  /* Slate 900 - High Contrast */
  font-size: 0.875rem;
  /* 14px */
  font-weight: 500;
  gap: 1rem;
  font-family: 'Inter', sans-serif;
}

.roi-slider-label span:first-child {
  flex: 1;
}

.roi-slider-value {
  color: #10b981;
  /* Keep Green for positive values */
  font-weight: 600;
  font-size: 1rem;
  min-width: 40px;
  text-align: right;
}

.roi-slider {
  width: 100%;
  height: 6px;
  /* Slightly thicker for better usability */
  border-radius: 9999px;
  background: #e2e8f0;
  /* Slate 200 */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.roi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #10b981;
  /* Green border */
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.roi-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.roi-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #10b981;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.roi-slider-hint {
  font-size: 0.75rem;
  color: #64748b;
  /* Slate 500 */
  margin-top: 0.5rem;
  text-align: left;
}

/* Info Box - Shadcn Card Style */
.roi-info-box {
  background: #f8fafc;
  /* Slate 50 */
  border: 1px solid #e2e8f0;
  /* Slate 200 */
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.roi-info-box h4 {
  color: #0f172a;
  /* Slate 900 */
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.roi-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  color: #475569;
  /* Slate 600 */
  font-size: 0.875rem;
}

.roi-info-value {
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  /* Switch to Inter for cleaner look */
  color: #0f172a;
  /* Slate 900 */
}

.roi-info-note {
  font-size: 0.75rem;
  opacity: 1;
  margin-top: 0.5rem;
  color: #64748b;
  /* Slate 500 */
}

/* CTA Button Wrapper */
.roi-cta-wrapper {
  margin-top: 2rem;
}

.roi-cta-button {
  width: 100%;
  justify-content: center;
  background-color: #0f172a;
  /* Slate 900 */
  color: white;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.roi-cta-button:hover {
  background-color: #1e293b;
  /* Slate 800 */
}

/* Chart Section - Unified Card - Shadcn Style */
.roi-result-card {
  background: #ffffff;
  border-radius: 12px;
  /* Shadcn standard radius */
  padding: 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  /* Subtle shadow */
  border: 1px solid #e2e8f0;
  /* Slate 200 Border */
  display: flex;
  flex-direction: column;
  backdrop-filter: none;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  transition: all 0.3s ease;
  /* Smooth transition for hover effects */
}

.roi-result-card:hover {
  transform: scale(1.01);
  /* Grow slightly instead of pop up */
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  /* Increased shadow */
}

/* Top Section: Chart & Savings */
.roi-card-top {
  padding: 1.5rem;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.roi-chart-area {
  position: relative;
  width: 100%;
  height: 240px;
  /* Slightly taller for better visibility */
}

#roiCalculatorChart {
  width: 100%;
  height: 100%;
}

/* Savings Area within Card */
.roi-savings-area {
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px solid #e2e8f0;
  /* Light Grey Separator */
  width: 100%;
}

.roi-savings-label {
  color: #64748b;
  /* Slate 500 */
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.roi-savings-amount {
  font-size: clamp(2rem, 3vw, 2.5rem);
  /* Slightly smaller, more refined */
  font-weight: 700;
  color: #10b981;
  text-shadow: none;
  font-family: 'Inter', sans-serif;
  /* Switch to Inter */
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.roi-savings-amount.negative {
  color: #ef4444;
  text-shadow: none;
}

/* Bottom Section: Controls */
.roi-card-bottom {
  padding: 1.5rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  /* Separator */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .roi-section {
    /* Use clamp for responsive top padding to avoid cutoff but not be too huge */
    padding-top: clamp(8rem, 15vh, 12rem) !important;
    padding-bottom: 4rem;
    position: relative !important;
    /* Disable sticky to prevent stacking issues */
    scroll-margin-top: 120px;
    /* Ensure anchor navigation lands correctly */
    height: auto;
    /* Allow height to grow on tablet/mobile */
    min-height: 100svh;
  }

  .roi-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .roi-left-column {
    padding-right: 0;
    text-align: center;
    /* Center text on tablet/mobile */
  }

  .roi-left-column .max-width-md {
    margin-left: auto;
    margin-right: auto;
  }

  .roi-right-column {
    height: auto;
    justify-content: flex-start;
  }

  .roi-result-card {
    max-width: 700px;
    /* Increased width on tablet */
    margin: 0 auto;
  }
}

@media (max-width: 479px) {
  .roi-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .roi-card-top,
  .roi-card-bottom {
    padding: 1.5rem;
  }

  .roi-chart-area {
    height: 200px;
  }

  .roi-savings-amount {
    font-size: 2.5rem;
  }
}