/* Scoped Toggle Card Styles - Zero Layout Shift */
.mg-battery-wrapper {
    margin: 0;
    width: auto;
    box-sizing: border-box;
    display: block;
}

.mg-battery-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fbfbfd;
    border: 1.5px solid #e1e4e8;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    gap:50px;
}

.mg-battery-toggle-card:hover {
    border-color: #f06924;
    background: #fff;
    box-shadow: 0 2px 8px rgba(240, 105, 36, 0.08);
}

.mg-battery-toggle-card.is-active {
    border-color: #f06924;
    background: #fff8f5;
}

.mg-battery-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    pointer-events: none;
}

.mg-battery-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.3;
    margin-bottom: 2px;
}

.mg-battery-desc {
    font-size: 12px;
    color: #d9381e;
    font-weight: 600;
}

/* Accessible iOS-Style Toggle Switch */
.mg-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    min-width: 44px;
    margin: 0;
    pointer-events: none; /* Entire outer card handles click */
}

.mg-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    position: absolute;
}

.mg-slider {
    position: absolute;
    inset: 0;
    background-color: #d1d5db;
    border-radius: 24px;
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mg-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.mg-switch input:checked + .mg-slider {
    background-color: #f06924;
}

.mg-switch input:checked + .mg-slider::before {
    transform: translateX(20px);
}