/* --- Scoped Reset & Futuristic Variables --- */
.slr-calc-wrapper {
    --bg-dark: #0b0f19;
    --panel-bg: rgba(16, 25, 40, 0.5);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-hover: rgba(16, 185, 129, 0.4);
    --accent-neon: #00f2fe; /* Cyan */
    --accent-glow: #4facfe;
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-stack: 'Inter', system-ui, -apple-system, sans-serif;

    font-family: var(--font-stack);
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    padding: 60px 20px;
    background: var(--bg-dark);
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.slr-calc-wrapper * { box-sizing: inherit; margin: 0; padding: 0; }

/* Futuristic Background Glow Orbs */
.slr-calc-bg-glow {
    position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.4; pointer-events: none; z-index: 0;
}
.slr-calc-bg-glow.top-left { top: -10%; left: -5%; width: 400px; height: 400px; background: var(--accent-glow); }
.slr-calc-bg-glow.bottom-right { bottom: -10%; right: -5%; width: 500px; height: 500px; background: var(--emerald-glow); }

/* --- Main Container --- */
.slr-calc-container {
    max-width: 1250px; width: 100%; display: flex; gap: 35px; align-items: stretch; position: relative; z-index: 1;
}

/* --- Left Column (Controls) --- */
.slr-calc-left { flex: 0 0 35%; display: flex; flex-direction: column; }

.slr-calc-title {
    font-size: 36px; font-weight: 800; line-height: 1.1; margin-bottom: 15px; letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.slr-calc-subtitle { font-size: 16px; color: var(--text-muted); line-height: 1.6; margin-bottom: 25px; }

/* Futuristic Segment Control */
.slr-calc-segment {
    display: flex; background: rgba(0,0,0,0.4); padding: 2px; border-radius: 20px;
    border: 1px solid var(--panel-border); margin-bottom: 20px; position: relative;
    box-shadow: inset 0 4px 15px rgba(0,0,0,0.5);
}
.slr-calc-segment-btn {
    flex: 1; padding: 16px; text-align: center; font-weight: 600; font-size: 15px;
    color: var(--text-muted); cursor: pointer; border-radius: 14px; transition: 0.4s ease;
    display: flex; align-items: center; justify-content: center; gap: 10px; z-index: 2;
}
.slr-calc-segment-btn.active { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.3); }
.slr-calc-segment-bg {
    position: absolute; top: 6px; bottom: 8px; width: calc(50% - 8px);
    background: linear-gradient(135deg, var(--emerald), #059669);
    border-radius: 14px; z-index: 1; transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px var(--emerald-glow);
}

/* Advanced Input Area */
.slr-calc-input-card {
    background: var(--panel-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border); border-radius: 24px; padding: 30px; margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.slr-calc-input-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.slr-calc-input-label { font-size: 14px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.slr-calc-input-wrap { position: relative; display: flex; align-items: flex-end; gap: 5px; }
.slr-calc-input {
    width: 100%; border: none; font-size: 48px; font-weight: 800; color: #fff;
    background: transparent; outline: none; font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(255,255,255,0.2);
}
.slr-calc-input-suffix { font-size: 20px; color: var(--emerald); font-weight: 700; margin-bottom: 10px; }

/* Futuristic Range Slider */
.slr-calc-range {
    -webkit-appearance: none; width: 100%; height: 6px; background: rgba(255,255,255,0.1);
    border-radius: 10px; outline: none; margin-top: 25px; cursor: pointer;
}
.slr-calc-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%;
    background: #fff; border: 4px solid var(--emerald); cursor: pointer;
    box-shadow: 0 0 15px var(--emerald); transition: transform 0.1s;
}
.slr-calc-range::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Cyber Toggle (Bill vs Size) */
.slr-calc-toggle-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; color: var(--text-muted);
    background: rgba(0,0,0,0.2); padding: 10px 20px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.05);
}
.slr-calc-switch {
    position: relative; width: 56px; height: 30px; background: rgba(255,255,255,0.1);
    border-radius: 30px; cursor: pointer; transition: 0.3s;
}
.slr-calc-switch::after {
    content: ''; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px;
    background: #fff; border-radius: 50%; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.slr-calc-switch.active { background: var(--accent-neon); box-shadow: 0 0 15px rgba(0, 242, 254, 0.4); }
.slr-calc-switch.active::after { transform: translateX(26px); }
.slr-calc-toggle-lbl { cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.slr-calc-toggle-lbl.active { color: #fff; }

/* --- Right Column (Outputs) --- */
.slr-calc-right { flex: 1; display: flex; flex-direction: column; gap: 25px; }

/* Glass Panels */
.slr-calc-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 25px; }

.slr-calc-card {
    background: var(--panel-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border); border-radius: 28px; padding: 10px 25px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); position: relative; overflow: hidden;
    transition: all 0.4s ease; display: flex; flex-direction: column; justify-content: center;
}
.slr-calc-card:hover { border-color: var(--panel-border-hover); box-shadow: 0 15px 35px rgba(0,0,0,0.4), inset 0 0 20px rgba(16, 185, 129, 0.05); transform: translateY(-4px); }

.slr-calc-card-icon {
    width: 50px; height: 50px; background: rgba(255,255,255,0.05); border-radius: 16px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.1); color: var(--emerald);
}

.slr-calc-card-title { font-size: 15px; font-weight: 600; color: var(--text-muted); margin-left: 20px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.slr-calc-card-val { font-size: 42px; font-weight: 800; color: #fff; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.slr-calc-card-val span { font-size: 20px; font-weight: 600; color: var(--emerald); margin-left: 5px; }
.slr-calc-card-val.glow-text { text-shadow: 0 0 25px rgba(255,255,255,0.3); }

.slr-calc-side-cards { display: flex; flex-direction: column; gap: 25px; }
.slr-calc-card-small {
    background: var(--panel-bg); backdrop-filter: blur(20px); border: 1px solid var(--panel-border);
    border-radius: 24px; padding: 25px; flex: 1; display: flex; flex-direction: column; justify-content: center;
    transition: 0.3s;
}
.slr-calc-card-small:hover { border-color: rgba(0, 242, 254, 0.4); }
.slr-calc-card-small .slr-calc-card-val { font-size: 32px; }

/* Data-Flow Cost Breakdown Card */
.slr-calc-cost-card {
    background: linear-gradient(180deg, rgba(16, 25, 40, 0.8) 0%, rgba(10, 15, 25, 0.9) 100%);
    backdrop-filter: blur(20px); border: 1px solid var(--panel-border);
    border-radius: 28px; padding: 10px 15px; box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.slr-calc-equation { display: flex; align-items: stretch; justify-content: space-between; gap: 15px; text-align: center; }
.slr-calc-eq-block { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px; }
.slr-calc-eq-icon {
    width: 45px; height: 45px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex;
    align-items: center; justify-content: center; margin-bottom: 12px; color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
}
.slr-calc-eq-title { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }
.slr-calc-eq-val { font-size: 26px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.slr-calc-eq-sub { font-size: 14px; color: var(--emerald); font-weight: 600; margin-top: 5px; }

/* Neon Connectors instead of +/- */
.slr-calc-connector {
    display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted);
}
.slr-calc-connector-line {
    width: 30px; height: 2px; background: rgba(255,255,255,0.1); position: relative;
}
.slr-calc-connector-line::after {
    content: ''; position: absolute; right: 0; top: -4px;
    border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 5px solid rgba(255,255,255,0.3);
}
.slr-calc-connector-op {
    background: rgba(0,0,0,0.5); width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold;
    border: 1px solid rgba(255,255,255,0.1); z-index: 1; margin: -12px 0; color: #fff;
}

.slr-calc-effective {
    background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px; box-shadow: 0 0 30px rgba(16, 185, 129, 0.1) inset;
}
.slr-calc-effective .slr-calc-eq-icon { color: var(--emerald); border-color: rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.2); }
.slr-calc-effective .slr-calc-eq-val { color: var(--emerald); text-shadow: 0 0 15px rgba(16, 185, 129, 0.4); font-size: 32px; }

/* --- Responsive View --- */
@media (max-width: 1024px) {
    .slr-calc-container { flex-direction: column; }
    .slr-calc-left { flex: none; width: 100%; }
    .slr-calc-grid { grid-template-columns: 1fr; }
    .slr-calc-side-cards { flex-direction: row; }
    .slr-calc-equation { flex-direction: column; gap: 10px; }
    .slr-calc-connector { transform: rotate(90deg); margin: 10px 0; }
    .slr-calc-eq-block { width: 100%; padding: 20px; background: rgba(0,0,0,0.2); border-radius: 20px; }
}
@media (max-width: 600px) {
    .slr-calc-side-cards { flex-direction: column; }
    .slr-calc-wrapper { padding: 40px 15px; }
    .slr-calc-title { font-size: 36px; }
    .slr-calc-input { font-size: 36px; }
}