button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
    transition: transform .12s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}

.btn:active { transform: scale(.982); }
.btn:disabled { opacity: .45; cursor: default; }

.btn--primary {
    background: var(--action);
    color: var(--on-action);
    font-weight: 800;
    min-height: 54px;
    font-size: 16px;
    box-shadow: 0 10px 26px rgba(4, 8, 18, .5);
}

.btn--quiet {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, .035);
}

.btn--quiet:active { background: rgba(255, 255, 255, .07); }

.btn--plain { color: var(--muted); font-weight: 700; }
.btn--slim { min-height: 38px; padding: 0 12px; font-size: 13px; }
.btn--wide { width: 100%; }

.btn--tile {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-height: 62px;
    padding: 8px 6px;
    border-color: var(--line);
    background: rgba(255, 255, 255, .028);
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.btn--tile b { color: var(--text); font-size: 13px; font-weight: 800; }
.btn--tile svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.icon-button {
    position: absolute;
    z-index: 6;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(9, 14, 24, .8);
    color: var(--muted);
}

.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.switch { position: relative; flex: none; width: 50px; height: 30px; border: none; border-radius: 999px; background: rgba(255, 255, 255, .12); transition: background .16s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--dim); transition: transform .18s cubic-bezier(.3, 1.3, .6, 1), background .16s ease; }
.switch.is-on { background: rgba(237, 243, 255, .22); }
.switch.is-on::after { transform: translateX(20px); background: var(--action); }

.tabs { display: flex; gap: 4px; padding: 3px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .04); }
.tab { flex: 1; min-height: 36px; padding: 0 8px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 750; }
.tab.is-active { background: rgba(255, 255, 255, .1); color: var(--text); }

.name-field input, .code-input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .04);
    font-size: 15px;
    font-weight: 700;
    outline: none;
}

.name-field input:focus, .code-input:focus { border-color: var(--line-strong); }
.code-input { text-align: center; height: 58px; font-size: 26px; letter-spacing: .28em; text-transform: uppercase; }

body.input-mouse .btn:hover:not(:disabled) { border-color: var(--line-strong); }
body.input-mouse .btn--primary:hover:not(:disabled) { background: #ffffff; }
body.input-mouse .btn--quiet:hover:not(:disabled) { background: rgba(255, 255, 255, .07); }
body.input-mouse .tab:hover { color: var(--text); }
body.input-mouse .icon-button:hover { color: var(--text); }
