/* ====================================
   UNIFIED VALUE SECTION & MASTER TOGGLE
==================================== */

/* Master Toggle Container */
.master-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.master-toggle {
    display: flex;
    background: rgba(19, 27, 47, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.toggle-btn {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    color: #a0aec0;
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: 'Cairo', sans-serif;
}

.toggle-btn i {
    font-size: 1.2rem;
}

.toggle-btn.active {
    color: #fff;
}

/* Slider Animation */
.toggle-slider {
    position: absolute;
    top: 5px;
    left: 5px;
    /* Will be adjusted by JS for RTL/LTR */
    height: calc(100% - 10px);
    width: 50%;
    /* Approx, JS can refine */
    background: linear-gradient(135deg, #00D9FF, #0056b3);
    border-radius: 40px;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 5px 15px rgba(0, 217, 255, 0.4);
}

/* Views Management */
.views-container {
    position: relative;
    min-height: 600px;
    /* Prevent layout jump */
    overflow: hidden;
}

.view-panel {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.view-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeSlideUp 0.6s ease forwards;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide the old trigger buttons because we are using the master toggle now */
#savingsBtn {
    display: none !important;
}

/* Make calculator always visible inside the view */
.savings-calculator {
    max-height: none !important;
    opacity: 1 !important;
    margin: 0 !important;
}

/* Responsive */
@media (max-width: 640px) {
    .toggle-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}