
/* === UNIMPLEMENTED === */
/*
    1. Modes switch.
       Remove padding or transform to place buttons closer to corners

*/


/* === AUTH: form structure (layout only; no look) === */

.AuthBox {
    display: flex;
    flex-direction: column;
    margin: 20vh auto 0;
    width: clamp(300px, 38vw, 420px);
    text-align: center;
}

.AuthBox--partial {
    margin: 8px auto 0;
}

.NavPanel {
    display: flex;
    width: 100%;
    height: 42px;
}

.NavPanel .NavItem {
    display: flex;
    flex: 1 1 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
}

.NavPanel .NavItem.active {
    cursor: default;
}

.AuthForm {
    width: 90%;
}

.AuthForm.active {
    display: block;
}

.AuthForm:not(.active) {
    display: none;
}

/* ---- Form shell: fields stack vs actions (gap + space-between) ---- */

.auth-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 0 10px 0;
}

.auth-form-stack {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    flex: 1 1 auto;
}

.auth-form-fields {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.auth-form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.auth-form-fields .auth-form-field,
.auth-form-fields .auth-form-custom-field {
    width: 90%;
    margin: 0;
}

.auth-form-field,
.auth-form-custom-field {
    width: 90%;
    margin: 0 auto;
}

.AuthBox .auth-form-field > input,
.AuthBox .auth-form-field > .input,
.AuthBox .auth-form-field > .auth-password-field,
.AuthBox .auth-form-field > .auth-checkbox,
.AuthBox .auth-form-custom-field > input,
.AuthBox .auth-form-custom-field > .input,
.AuthBox .auth-form-custom-field > .auth-password-field,
.AuthBox .auth-form-custom-field > .auth-checkbox {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.AuthBox .auth-form-actions > button,
.AuthBox .auth-form-actions > a.AuthButt {
    margin-top: 0;
}

.auth-password-field {
    position: relative;
    width: 100%;
    margin: 0;
}

.AuthBox .auth-password-field input {
    width: 100%;
    margin: 0;
    padding-right: 36px;
    box-sizing: border-box;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 0;
    font-weight: normal;
}

.auth-password-icon-stack {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
}

.auth-password-icon {
    position: absolute;
    inset: 0;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-password-icon--show {
    opacity: 0;
}

.auth-password-toggle.is-visible .auth-password-icon--show {
    opacity: 1;
}

.auth-password-toggle.is-visible .auth-password-icon--hide {
    opacity: 0;
}

.AuthBox .AuthButt {
    display: inline-block;
    text-decoration: none;
    
    width: 90%;
    margin-top: 7px;
    cursor: pointer;
}

.AuthBox button.auth-password-toggle,
.AuthBox button.auth-password-toggle:hover {
    width: 28px;
    min-width: 28px;
    height: 28px;
    margin-top: 0;
    border: none;
    background: transparent;
    filter: none;
}

.HeaderText {
    margin: 10px 10px 20px 10px;
}

/* ---- [AUTH_1_0] Checkbox row ---- */

.auth-checkbox {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 30px;
    margin: 0;
    padding: 0 7px;
    text-align: left;
    container-type: inline-size;
    box-sizing: border-box;
    cursor: pointer;
}

.auth-checkbox {
    cursor: default;
}

.auth-checkbox input[type="checkbox"] {
    margin: 0;
    padding: 0;
    height: 21px;
    width: 21px;
    min-width: 21px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    flex: 0 0 auto;
}

.auth-checkbox label {
    flex: 1 1 auto;
    min-width: 0;
    align-items: baseline;
    font-size: clamp(14px, 1.6vw, 18px);
    inline-size: 1px;
    white-space: nowrap;
    overflow: hidden;
    cursor: default;
}

form:has(.auth-togglable-checkbox input[type="checkbox"]:checked) .auth-togglable-value {
    display: block;
}

form:has(.auth-togglable-checkbox input[type="checkbox"]) .auth-togglable-value {
    display: none;
}
