/* Widgets */

.widget {
    text-align: center;
    margin: 10px 0 20px 0;
    font-size: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.widget .label {
    font-size: 1.4em;
    transition: color 0.3s;
    color: var(--text-color);
    flex-grow: 1;
    flex-basis: 0;
}
.widget .label:first-child { text-align: right; }
.widget .label:last-child { text-align: left; }

.widget .label.active { color: var(--accent-color); }
.widget .label.inactive { color: var(--dim-color); }

.widget .wrapper {
    position: relative;
    width: 50px;
    height: 26px;
}

.widget .wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Toggle settings */

.widget .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.widget .slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.widget .wrapper input:checked + .slider {
    background-color: #4fc3f7;
}

.widget .wrapper input:checked + .slider::before {
    transform: translateX(24px);
}

/* Text setting */

.widget .lock {
  font-size: 22px;
  display: inline-block;
  text-align: center;
}

/* Emoji change on checkbox checked state */
.widget .wrapper input:checked + .lock::before {
  content: "🔒"; /* Lock emoji when checked */
}

.widget .wrapper input:not(:checked) + .lock::before {
  content: "🔓"; /* Unlock emoji when not checked */
}

.widget input[type="text"] {
    height: 28px;
    color: var(--color);
    text-transform: uppercase;
}

.widget input[type="text"]:disabled {
    border-color: transparent;
    background: transparent;
    color: var(--color);
}

/* Button */
.widget button {
  background-image: linear-gradient(1deg, #4F58FD, #149BF3 99%);
  border-radius: 100px;
  border-width: 0;
  color: #FFFFFF;
  height: 32px;
  transition: background-color .2s,background-position .2s;
  padding: 6px 20px;
  font-size: 0.7em;
}

.widget button:active,
.widget button:focus {
  outline: none;
}

.widget button:hover {
  background-position: -20px -20px;
}

.widget button:focus:not(:active) {
  box-shadow: rgba(40, 170, 255, 0.25) 0 0 0 .125em;
}
