/*
 * KRS Login structural styles.
 *
 * Color, background, border color, border thickness, and border radius are not
 * hard-coded for .demo-auth-panel or the login/register controls. Those values
 * are emitted only when saved at Settings > KRS Login.
 */


#quick-register-root, #quick-login-root{
    padding: 2vh;
}

.krs-auth-root,
.demo-auth-panel,
.krs-auth-root *,
.demo-auth-panel * {
    box-sizing: border-box;
}

.krs-auth-root,
.demo-auth-panel {
    width: 100%;
}

.krs-auth-root .regForm,
.krs-auth-root .field {
    display: block;
    width: 100%;
}

.krs-auth-root .field {
    clear: both;
    margin-bottom: 1rem;
}

.krs-auth-root label,
.demo-auth-panel label {
    display: block;
    margin-bottom: 0.35rem;
}

.krs-auth-root input:not([type="checkbox"]):not([type="submit"]):not([type="button"]),
.demo-auth-panel input:not([type="checkbox"]):not([type="submit"]):not([type="button"]) {
    display: block;
    width: 100%;
    padding: 0.6rem 0.7rem;
    font: inherit;
    outline: none;
    box-shadow: none;
}

.krs-auth-root input:focus,
.demo-auth-panel input:focus {
    box-shadow: none;
}

.krs-auth-root .input-wrap,
.demo-auth-panel .input-wrap {
    position: relative;
}

.krs-auth-root .input-wrap > input,
.demo-auth-panel .input-wrap > input {
    padding-right: 2.5rem;
}

.krs-auth-root .pw-toggle,
.demo-auth-panel .pw-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    line-height: 0;
    opacity: 0.75;
    appearance: none;
}

.krs-auth-root .pw-toggle:hover,
.krs-auth-root .pw-toggle:focus,
.demo-auth-panel .pw-toggle:hover,
.demo-auth-panel .pw-toggle:focus {
    opacity: 1;
}

.krs-auth-root .pw-toggle:focus-visible,
.demo-auth-panel .pw-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.krs-auth-root .pw-toggle svg,
.demo-auth-panel .pw-toggle svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
    pointer-events: none;
}

.krs-auth-root .pw-toggle svg[hidden],
.demo-auth-panel .pw-toggle svg[hidden] {
    display: none;
}

.krs-auth-root .actions {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-top: 0;
}

.krs-auth-root .actions .primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    min-height: 2.4em;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 1.1rem;
    line-height: 2.4em;
    white-space: nowrap;
    cursor: pointer;
}

.krs-quick-register > form > .primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    min-height: 2.4em;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 1.1rem;
    line-height: 2.4em;
    cursor: pointer;
}

.krs-auth-root .primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.krs-auth-root .actions .extras {
    display: flex;
    flex-direction: column;
    width: 50%;
    padding-left: 0.5rem;
    overflow: hidden;
    line-height: 1.2;
    gap: 0;
}

.krs-auth-root .remember {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    min-height: 1.2rem;
    margin: 0;
    padding: 0;
}

.krs-auth-root .remember input[type="checkbox"] {
    width: auto;
    margin: 0 0.4rem 0 0;
    padding: 0;
}

.krs-auth-root .lost {
    min-height: 1.2rem;
    font-size: 0.85rem;
    text-decoration: underline;
}

.krs-auth-root .status {
    margin-top: 0.6rem;
    min-height: 1.5em;
    white-space: pre-line;
}

.krs-auth-root .error {
    margin-top: 0.25rem;
    min-height: 1.5em;
    font-size: 0.85rem;
}

.krs-auth-root .error:empty,
.krs-auth-root .status:empty {
    display: none;
}

@media (max-width: 480px) {
    .krs-auth-root .actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .krs-auth-root .actions .primary,
    .krs-auth-root .actions .extras,
    .krs-quick-register > form > .primary {
        width: 100%;
        padding-left: 0;
    }
}
