/* Buttons */
.btn {
    font: var(--md-sys-typescale-label-large);
    padding: 0 24px;
    height: 40px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-filled {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.btn-filled:hover {
    box-shadow: var(--md-sys-elevation-level1);
}

.btn-tonal {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.btn-outlined {
    background-color: transparent;
    border: 1px solid var(--md-sys-color-outline);
    color: var(--md-sys-color-primary);
}

/* Cards */
.card {
    background-color: var(--md-sys-color-surface);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--md-sys-elevation-level1);
}

.card-filled {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
}

/* Navigation Rail/Bar */
.nav-rail {
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface-variant);
    display: flex;
    align-items: center;
    justify-content: space-around;
    /* Mobile default */
    z-index: 10;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 12px;
    border-radius: 16px;
}

.nav-item.active {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.nav-label {
    font: var(--md-sys-typescale-label-medium);
}

/* Switch Component */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 32px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--md-sys-color-surface-variant);
    transition: .4s;
    border-radius: 32px;
    border: 2px solid var(--md-sys-color-outline);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 6px;
    bottom: 6px;
    background-color: var(--md-sys-color-outline);
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
    background-color: var(--md-sys-color-on-primary);
}