/**
 * Styles for the invisible PoW captcha widget and its drag-puzzle
 * escalation (EXT:inno_captcha), rendered via
 * Resources/Private/Form/Partials/InnoCaptcha.html.
 *
 * Extracted from an inline <style> block: multi-line CSS rules inside a
 * Fluid template broke Fluid's expression parser for every subsequent
 * Fluid inline expression in that file (see AI-BUGS/gefixt/
 * inno-captcha-inline-css-fluid-falle.md). Loading this as a real
 * stylesheet removes that landmine entirely.
 */

/*
 * Every rule below that paints a light background also states its own text
 * colour. Without that, the text colour is whatever the surrounding page
 * happens to inherit — on a dark theme that is near-white on near-white
 * (measured ~1.1:1 against the 4.5:1 WCAG AA requires), which silently
 * swallowed the escalation notice and the fallback contact details. Those two
 * are precisely the parts a visitor needs when the captcha is in their way,
 * so neither may depend on the host page's palette.
 */

.inno-captcha-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 1px;
    overflow: hidden;
}

.inno-captcha-badge {
    display: inline-block;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .85rem;
    background: #eee;
    color: #333;
    border: 1px solid #999;
}

.inno-captcha-badge.ok {
    border-color: #2c6e49;
    color: #2c6e49;
}

.inno-captcha-badge.err {
    border-color: #c62828;
    color: #c62828;
}

.inno-captcha-contact {
    margin-top: .5rem;
    padding: .6rem .8rem;
    border-radius: 6px;
    background: #ffebee;
    color: #212121;
    border: 1px solid #c62828;
    font-style: normal;
    font-size: .9rem;
    line-height: 1.5;
}

/*
 * The phone and mail links are the whole point of this block, so they get an
 * explicit colour too — a link colour inherited from the host page can land
 * anywhere on the rose background.
 */
.inno-captcha-contact a {
    color: #8c1d18;
}

.inno-captcha-puzzle [data-puzzle-role="board-wrap"] {
    position: relative;
    user-select: none;
    touch-action: none;
    max-width: 100%;
    margin-top: .5rem;
}

.inno-captcha-puzzle [data-puzzle-role="board"] {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    max-width: 100%;
    outline: 3px solid #005262;
    outline-offset: -3px;
    background: #cfe6ea;
}

.inno-captcha-puzzle [data-puzzle-role="bg"] {
    display: block;
    width: 100%;
    height: 100%;
}

.inno-captcha-puzzle [data-puzzle-role="piece"] {
    position: absolute;
    border-radius: 12px;
    border: 3px solid #f5a623;
    background-repeat: no-repeat;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
    cursor: grab;
    padding: 0;
}

.inno-captcha-puzzle [data-puzzle-role="piece"].lifted {
    cursor: grabbing;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
    transform: scale(1.06);
}

.inno-captcha-puzzle [data-puzzle-role="piece"].placed {
    border-color: #2e7d32;
    cursor: default;
    transform: none;
}

.inno-captcha-puzzle [data-puzzle-role="status"] {
    margin-top: 8px;
    font-size: 13px;
    padding: .4rem .6rem;
    border-radius: 6px;
    background: #eee;
    color: #333;
}

.inno-captcha-puzzle [data-puzzle-role="status"].ok {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}

.inno-captcha-puzzle [data-puzzle-role="status"].err {
    background: #ffebee;
    color: #c62828;
}

/*
 * Stage-2 verification block: the apology, the choice between the two
 * equivalent modalities, and the e-mail-code route.
 *
 * Focus styling is deliberately explicit rather than left to the browser
 * default: this block appears mid-form and a keyboard user must be able to
 * see where they landed after picking a modality.
 */

.inno-captcha-verify {
    margin-top: .75rem;
    padding: .8rem 1rem;
    border: 1px solid #b0863c;
    border-left-width: 4px;
    border-radius: 6px;
    background: #fff8e9;
    color: #2b2b2b;
}

.inno-captcha-verify-intro {
    margin: 0 0 .75rem;
    font-size: .95rem;
    line-height: 1.5;
}

.inno-captcha-choice {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}

.inno-captcha-choice-btn {
    padding: .45rem .9rem;
    border: 1px solid #7a5c28;
    border-radius: 999px;
    background: #fff;
    color: #5a4420;
    font-size: .9rem;
    cursor: pointer;
}

.inno-captcha-choice-btn:hover {
    background: #f3e6cc;
}

.inno-captcha-choice-btn.is-active {
    background: #7a5c28;
    border-color: #7a5c28;
    color: #fff;
    font-weight: 600;
}

.inno-captcha-choice-btn:focus-visible,
.inno-captcha-mailcode-btn:focus-visible,
.inno-captcha-mailcode input:focus-visible {
    outline: 3px solid #1a4f8a;
    outline-offset: 2px;
}

.inno-captcha-mailcode-step {
    margin-bottom: .75rem;
}

.inno-captcha-mailcode label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .2rem;
}

.inno-captcha-mailcode-hint {
    margin: 0 0 .35rem;
    font-size: .82rem;
    line-height: 1.45;
    color: #4a4a4a;
}

.inno-captcha-mailcode input {
    display: block;
    width: 100%;
    max-width: 22rem;
    padding: .4rem .6rem;
    border: 1px solid #999;
    border-radius: 4px;
    font-size: 1rem;
}

.inno-captcha-mailcode [data-mailcode-role="code"] {
    max-width: 9rem;
    letter-spacing: .35em;
    font-size: 1.15rem;
}

.inno-captcha-mailcode-btn {
    margin-top: .45rem;
    padding: .45rem 1rem;
    border: 1px solid #1a4f8a;
    border-radius: 4px;
    background: #1a4f8a;
    color: #fff;
    font-size: .9rem;
    cursor: pointer;
}

.inno-captcha-mailcode-btn:hover {
    background: #143c6b;
}

.inno-captcha-mailcode-status {
    margin: .5rem 0 0;
    font-size: .88rem;
    line-height: 1.45;
    min-height: 1.2em;
}
