/* Widget shell (scoped) */
.roi-widget {
  --bg-dark: #2d3e3e;
  --bg-darker: #1a2626;
  --panel-bg: rgba(42, 56, 56, 0.6);
  --card-bg: rgba(42, 56, 56, 0.5);
  --text: #e8f4f2;
  --text-muted: #a8c4c0;
  --accent: #4dd4c3;
  --accent-fill: #19E3E2B8; /* requested fill color */
  --border: rgba(77, 212, 195, 0.15);

  background: radial-gradient(80% 80% at 20% 10%, rgba(25, 227, 226, 0.06) 0%, transparent 60%) ,
              linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
  color: var(--text);
  padding: clamp(16px, 4vw, 40px) clamp(12px, 4vw, 20px);
  border-radius: 16px;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.roi-widget {
    padding-top: 100px !important;
    padding-bottom: 100px !important;
}

.roi-widget * { box-sizing: border-box; margin: 0; padding: 0; }

.roi-widget .container { max-width: 1400px; margin: 0 auto; width: 100%; }
.roi-widget header { text-align: center; margin-bottom: clamp(16px, 4vw, 40px); }
.roi-widget h1 { font-size: clamp(22px, 6vw, 42px); font-weight: 500; letter-spacing: .2px; margin-bottom: 6px; }
.roi-widget .subtitle { color: var(--text-muted); font-size: clamp(13px, 3.5vw, 16px); }

.roi-widget .main-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(14px, 3.5vw, 30px);
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: clamp(16px, 4.5vw, 40px);
  width: 100%;
}

/* Controls */
.roi-widget .controls-section {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 4vw, 32px);
}

.roi-widget .control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Align slider and value side-by-side */
.roi-widget .control-input {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px !important;
  width: 100%;
}

/* Range bar keeps fill styling */
.roi-widget .range-wrap {
  flex: 1 1 auto;
}

/* Value display stays consistent */
.roi-widget .value-display {
  min-width: 90px;
  text-align: center;
  padding: 10px 14px;
  background: rgba(77, 212, 195, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  color: #eafcfa;
}

/* Keep responsive alignment */
@media (max-width: 768px) {
  .roi-widget .control-input {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .roi-widget .value-display {
    width: 100%;
    text-align: left;
  }
}


/* Top row: label left + max right */
.roi-widget .control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.roi-widget .label-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.roi-widget .icon { width: 20px; height: 20px; color: var(--accent-fill); flex: 0 0 auto; }
.roi-widget .label-main { font-size: clamp(14px, 3.6vw, 16px); font-weight: 600; color: var(--text); }
.roi-widget .label-hint { font-size: clamp(12px, 3.3vw, 13px); color: var(--text-muted); }

/* Range with dynamic fill */
.roi-widget .range-wrap { width: 100%; }
.roi-widget input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; border-radius: 10px; outline: none; cursor: pointer;
  /* Background layers: 1) fill (left) 2) base (right) */
  background: linear-gradient(var(--accent-fill), var(--accent-fill)) 0/ var(--range-fill, 0%) 100% no-repeat,
              rgba(77, 212, 195, 0.15);
}
/* Chrome/Safari thumb */
.roi-widget input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #19E3E2; box-shadow: 0 0 0 6px rgba(25, 227, 226, 0.25);
  transition: transform .2s; position: relative; z-index: 1;
}
.roi-widget input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.06); }
/* Firefox thumb */
.roi-widget input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border: none; border-radius: 50%;
  background: #19E3E2; box-shadow: 0 0 0 6px rgba(25, 227, 226, 0.25);
}
/* Firefox track */
.roi-widget input[type="range"]::-moz-range-track {
  height: 8px; border-radius: 10px; background: transparent;
}

/* Value bubble */
.roi-widget .value-display {
  text-align: center;
  padding: 10px 14px;
  background: rgba(77, 212, 195, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: clamp(14px, 3.6vw, 16px);
  font-weight: 600; color: #eafcfa;
  align-self: flex-end; width: fit-content;
}

/* CTA */
.roi-widget .cta-button {
         width: 46%; 
        margin: 0 auto; 
        padding: 16px;
        background: white;
        color: #1a2626;
        border: none;
        border-radius: 50px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        margin-top: 10px;
}
.roi-widget .cta-button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(77, 212, 195, 0.25); }

/* Results */
.roi-widget .results-section { display: flex; flex-direction: column; gap: clamp(12px, 3.5vw, 20px); }
.roi-widget .result-card {
  background: var(--card-bg); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 16px;
  padding: clamp(16px, 4.5vw, 30px); min-height: 180px;
}
.roi-widget .result-title { font-size: clamp(12px, 3.4vw, 14px); color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.roi-widget .result-value { font-size: clamp(22px, 6.5vw, 42px); font-weight: 800; color: var(--text); margin-bottom: 10px; }
.roi-widget .result-details { font-size: clamp(12px, 3.4vw, 13px); color: var(--text-muted); line-height: 1.6; }
.roi-widget .detail-row { margin-bottom: 6px; }
.roi-widget .detail-title { font-weight: 700; color: var(--text); margin: 10px 0 6px; font-size: clamp(12px, 3.4vw, 14px); }
.roi-widget .formula { font-family: 'Courier New', monospace; background: rgba(0,0,0,.2); padding: 2px 6px; border-radius: 4px; }

/* Responsive */
@media (max-width: 1024px) {
  .roi-widget .main-grid { grid-template-columns: 1fr; }
  .roi-widget {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
  }
}
@media (max-width: 768px) {
  .roi-widget header { margin-bottom: 20px; }
  .roi-widget .main-grid { padding: 16px; gap: 16px; }
  .roi-widget .value-display { align-self: stretch; text-align: left; }
}
@media (max-width: 480px) {
  .roi-widget {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }
  .roi-widget { border-radius: 12px; }
  .roi-widget .main-grid { border-radius: 14px; }
  .roi-widget .icon { width: 18px; height: 18px; }
  .roi-widget input[type="range"] { height: 10px; }
  .roi-widget input[type="range"]::-webkit-slider-thumb,
  .roi-widget input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; }
}
