/* Enhanced Billing Toggle Visibility */

.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 2.5rem auto;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.08) 100%);
    border-radius: 100px;
    max-width: 450px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.15);
    transition: all 0.3s ease;
}

.billing-toggle:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 8px 40px rgba(16, 185, 129, 0.2);
}

.billing-toggle span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.billing-toggle span:first-child {
    opacity: 1;
    color: #10b981;
    font-weight: 700;
}

.billing-toggle input:checked ~ span:first-child {
    opacity: 0.5;
    color: #999;
    font-weight: 600;
}

.billing-toggle input:not(:checked) ~ span:last-child {
    opacity: 0.5;
    color: #999;
    font-weight: 600;
}

.billing-toggle input:checked ~ span:last-child {
    opacity: 1;
    color: #10b981;
    font-weight: 700;
}

/* Enhanced Switch Design */
.switch {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 40px;
    margin: 0 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 40px;
    border: 2px solid rgba(138, 43, 226, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider:before {
    position: absolute;
    content: "";
    height: 30px;
    width: 30px;
    left: 5px;
    bottom: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.slider:hover {
    border-color: rgba(138, 43, 226, 0.5);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked + .slider:before {
    transform: translateX(40px);
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
}

/* Enhanced Save Badge */
.save-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 0.5rem;
    display: inline-block;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
    }
}

/* Price transition animation */
.amount {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Visual indicator for selected billing */
.billing-toggle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -10px;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.5), transparent);
    animation: shimmer 3s infinite;
}

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

/* Mobile responsiveness */
@media (max-width: 480px) {
    .billing-toggle {
        flex-direction: column;
        gap: 1rem;
        padding: 1.2rem;
    }
    
    .switch {
        width: 70px;
        height: 35px;
    }
    
    .slider:before {
        height: 26px;
        width: 26px;
    }
    
    input:checked + .slider:before {
        transform: translateX(35px);
    }
}