/*
    Authenticator-App-Dialog.css: the authenticator app popups and the 2FA line in My Settings and Defaults (Security
    AUTH-1, Alchemy/docs/LoginTwoFactor/README.md). Markup: #authenticatorAppDialog and .auth-app-* in
    js/Controls/Admin/alchemy-defaults-overlay.html; model: js/Controls/Admin/authenticator-app-dialog.js. Loaded by
    _Layout.cshtml with the other My Settings styles. No dependencies beyond the site's Bootstrap and themes.
*/

/* My Settings: the line under the 2FA dropdown, and the line that replaces it for an app user */
.auth-app-offer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 8px;
    font-size: 0.9rem;
}

.auth-app-current {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
}

.auth-app-current .form-control-plaintext {
    width: auto;
}

.auth-app-current .btn-link {
    padding-left: 0;
    padding-right: 0;
}

/* The popup */
.auth-app-dialog {
    max-width: 640px;
}

.auth-app-steps {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.auth-app-steps li {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 3px solid #dee2e6;
    color: #6c757d;
    font-size: 0.9rem;
}

.auth-app-steps li.active {
    border-bottom-color: #2d7a5a;
    color: inherit;
    font-weight: 600;
}

.auth-app-steps li.complete {
    border-bottom-color: #8cc5a8;
}

.auth-app-step-number {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dee2e6;
    color: #212529;
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-app-steps li.active .auth-app-step-number,
.auth-app-steps li.complete .auth-app-step-number {
    background: #2d7a5a;
    color: #ffffff;
}

.auth-app-how {
    padding-left: 20px;
    margin-bottom: 16px;
}

.auth-app-lead {
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-app-tab {
    padding: 12px 4px 0 4px;
}

.auth-app-tab ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.auth-app-setup {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.auth-app-setup-detail {
    flex: 1 1 220px;
    min-width: 0;
}

/* The QR code stays black on white in both themes, so every phone camera can read it */
.auth-app-qr {
    width: 200px;
    height: 200px;
    flex: 0 0 auto;
    padding: 8px;
    background: #ffffff;
    border-radius: 4px;
}

.auth-app-qr svg {
    width: 100%;
    height: 100%;
}

.auth-app-key {
    font-size: 1.05rem;
    letter-spacing: 1px;
    word-break: break-word;
}

.auth-app-code {
    max-width: 160px;
    font-size: 1.25rem;
    letter-spacing: 4px;
}

.auth-app-note {
    color: #6c757d;
    font-size: 0.9rem;
}

.auth-app-form {
    max-width: 360px;
}

.auth-app-form select.form-control {
    max-width: 240px;
}

.auth-app-done {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.auth-app-done .fa-check-circle {
    font-size: 2rem;
    color: #2d7a5a;
}

.auth-app-message {
    margin-top: 16px;
    margin-bottom: 0;
}

/* Security (AUTH-6): the forced setup on the login page (Views/Account/Login.cshtml #authenticatorSetupAtSignIn) */
.auth-app-signin .auth-app-signin-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.auth-app-signin .auth-app-qr {
    margin: 0 auto;
}

@media (max-width: 575px) {
    .auth-app-step-title {
        display: none;
    }

    .auth-app-steps li.active .auth-app-step-title {
        display: inline;
    }

    .auth-app-qr {
        margin: 0 auto;
    }
}

/* Dark theme */
html[data-theme='dark'] .auth-app-steps li {
    border-bottom-color: #4a4a4a;
    color: #a9b4ae;
}

html[data-theme='dark'] .auth-app-steps li.active {
    border-bottom-color: #4db384;
    color: #e6efea;
}

html[data-theme='dark'] .auth-app-steps li.complete {
    border-bottom-color: #2d7a5a;
}

html[data-theme='dark'] .auth-app-step-number {
    background: #4a4a4a;
    color: #e6efea;
}

html[data-theme='dark'] .auth-app-note {
    color: #a9b4ae;
}

html[data-theme='dark'] .auth-app-done .fa-check-circle {
    color: #4db384;
}

html[data-theme='dark'] .auth-app-message.alert-danger {
    background-color: #3a2222;
    border-color: #7a2e2b;
    color: #f2c9c7;
}
