/*
 * In-app browser sheet (markup layouts/webview.php, script js/webview.js) — "open in your browser to log in".
 * Same family as the loading screen (css/loader.css): the page dimmed under translucent dark grey, a white card.
 * A sheet rising from the bottom on phones, a centred card on wider screens. Theme colour from the new look's
 * --p / --p-rgb / --p-soft when they exist; the classic look gets the fallback blue. Scoped resets: the classic
 * look's Bootstrap 3 styles buttons, inputs and headings.
 */
.c-wv { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: flex-end; justify-content: center;
    font-family: "IBM Plex Sans Thai", "Prompt", -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
    background: radial-gradient(120% 90% at 50% 45%, rgba(38, 43, 54, .58) 0%, rgba(24, 28, 37, .72) 55%, rgba(15, 18, 25, .82) 100%);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility 0s linear .25s; }
.c-wv.is-on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .25s ease; }
.c-wv *, .c-wv *::before, .c-wv *::after { box-sizing: border-box; }
.c-wv [hidden] { display: none !important; }
html.c-wv-lock, html.c-wv-lock body { overflow: hidden; }

.c-wv-sheet { position: relative; width: 100%; max-width: 440px; max-height: calc(100% - 24px); overflow-y: auto; -webkit-overflow-scrolling: touch;
    background: #fff; color: #1f2430; text-align: center; border-radius: 24px 24px 0 0;
    padding: 12px 22px calc(20px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .28);
    transform: translateY(100%); transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
.c-wv.is-on .c-wv-sheet { transform: none; }
.c-wv-grip { width: 40px; height: 4px; border-radius: 4px; background: #dfe3ea; margin: 0 auto 18px; }

.c-wv-icon { position: relative; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--p, #4F7BFF); background: radial-gradient(circle at 50% 35%, var(--p-soft, #EEF2FF), #fff 75%);
    box-shadow: 0 0 0 1px rgba(var(--p-rgb, 79, 123, 255), .14), 0 10px 24px rgba(var(--p-rgb, 79, 123, 255), .22); }
.c-wv-icon-arrow { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; background: var(--p, #4F7BFF); box-shadow: 0 0 0 3px #fff; }

.c-wv .c-wv-title { margin: 0 0 6px; padding: 0; font-family: inherit; font-size: 19px; font-weight: 600; line-height: 1.35; color: #141821; letter-spacing: 0; }
.c-wv .c-wv-lead { margin: 0 auto 18px; max-width: 340px; font-size: 14px; line-height: 1.6; color: #5b6272; }

.c-wv .c-wv-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; margin: 0 0 14px; padding: 12px 18px;
    border: 0; border-radius: 14px; font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
    color: #fff; background: linear-gradient(135deg, var(--p, #4F7BFF), rgba(var(--p-rgb, 79, 123, 255), .82));
    box-shadow: 0 10px 22px rgba(var(--p-rgb, 79, 123, 255), .32); -webkit-tap-highlight-color: transparent; transition: transform .12s ease, box-shadow .12s ease; }
/* by id: the new look's ".front-c a:not(.btn)" (theme.css, loaded later) would turn the label dark blue */
#c-wv .c-wv-btn, #c-wv .c-wv-btn:link, #c-wv .c-wv-btn:visited, #c-wv .c-wv-btn:hover, #c-wv .c-wv-btn:focus, #c-wv .c-wv-btn:active { color: #fff; text-decoration: none; }
#c-wv .c-wv-btn:focus-visible { outline: 3px solid rgba(var(--p-rgb, 79, 123, 255), .35); outline-offset: 3px; }
.c-wv .c-wv-btn:active { transform: scale(.98); box-shadow: 0 5px 12px rgba(var(--p-rgb, 79, 123, 255), .3); }

.c-wv .c-wv-steps { list-style: none; counter-reset: wv; margin: 0 0 14px; padding: 12px 14px; text-align: left; border-radius: 14px; background: #f5f7fb; }
.c-wv .c-wv-steps li { counter-increment: wv; position: relative; padding: 4px 0 4px 34px; font-size: 14px; line-height: 1.5; color: #3a4150; }
.c-wv .c-wv-steps li::before { content: counter(wv); position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%;
    font-size: 12px; font-weight: 600; line-height: 22px; text-align: center; color: var(--p, #4F7BFF); background: #fff;
    box-shadow: 0 0 0 1px rgba(var(--p-rgb, 79, 123, 255), .25); }
.c-wv .c-wv-steps b { color: #141821; font-weight: 600; }

.c-wv-or { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; font-size: 12.5px; color: #8a91a0; }
.c-wv-or::before, .c-wv-or::after { content: ""; flex: 1; height: 1px; background: #e7eaf0; }
.c-wv-link { display: flex; align-items: stretch; gap: 6px; padding: 5px; border-radius: 14px; background: #f5f7fb; box-shadow: inset 0 0 0 1px #e7eaf0; }
.c-wv .c-wv-url { flex: 1; min-width: 0; height: 40px; margin: 0; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; box-shadow: none;
    font-family: inherit; font-size: 13.5px; color: #3a4150; text-overflow: ellipsis; outline: none; -webkit-user-select: all; user-select: all; }
.c-wv .c-wv-copy { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; margin: 0; padding: 0 14px; border: 0; border-radius: 10px; cursor: pointer;
    font-family: inherit; font-size: 14px; font-weight: 600; color: var(--p, #4F7BFF); background: #fff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .08), 0 0 0 1px rgba(var(--p-rgb, 79, 123, 255), .2); -webkit-tap-highlight-color: transparent; transition: background .2s, color .2s; }
.c-wv .c-wv-copy .c-wv-done-i { display: none; }
.c-wv .c-wv-copy.is-done { color: #fff; background: #22a861; box-shadow: none; }
.c-wv .c-wv-copy.is-done .c-wv-copy-i { display: none; }
.c-wv .c-wv-copy.is-done .c-wv-done-i { display: inline; }
.c-wv .c-wv-hint { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: #b4541b; }

.c-wv .c-wv-later { display: inline-block; margin: 14px 0 0; padding: 8px 14px; border: 0; background: none; cursor: pointer;
    font-family: inherit; font-size: 14px; color: #6b7282; text-decoration: underline; text-underline-offset: 3px; }

/* wider screens (tablets): a centred card */
@media (min-width: 640px) {
    .c-wv { align-items: center; padding: 24px; }
    .c-wv-sheet { border-radius: 24px; padding: 26px 28px 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); transform: translateY(16px) scale(.97); }
    .c-wv-grip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .c-wv-sheet { transition: none; }
}
