/* ------------ VARIABLES ------------ */
:root{
    /* COLORS */
    --dark-color: #2b2b2b;
    --dark-icon-color: #fff;
    --light-icon-color: #FFDE59;
  }

.btn-theme-container {
    padding: 0.5rem;
}

/* -------------- BUTTON -------------- */
.btn-theme {
    background-color: #fff;
    width: 2.5em;
    height: 1.5em;
    border-radius: 10em;
    padding: 0 0.2em;
    box-shadow: inset 0 8px 60px rgba(0, 0, 0, .1),
        inset 0 8px 8px rgba(0, 0, 0, .1),
        inset 0 -4px 4px rgba(0, 0, 0, .1);
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.btn-theme__indicator {
    background-color: #fff;
    width: 1.2em;
    height: 1.2em;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .2);
    transition: transform .3s ease;
}

.btn-theme__icon-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-theme__icon {
    color: var(--light-icon-color);
    font-size: 1rem;
}

/* -------------- ANIMATION ------------ */
.btn-theme__icon.animated {
    animation: spin 0.5s;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* -------------- DARKMODE -------------- */
.dark-mode .btn-theme {
    background-color: #454d55;
    box-shadow: inset 0 8px 60px rgba(0, 0, 0, .3),
        inset 8px 0 8px rgba(0, 0, 0, .3),
        inset 0 -4px 4px rgba(0, 0, 0, .3);
}

.dark-mode .btn-theme__indicator {
    transform: translateX(1em);
    background-color: var(--dark-color);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .3);
}

.dark-mode .btn-theme__icon {
    color: var(--dark-icon-color);
}
