/* DKB SMS consent page. Standalone: no Odoo/Bootstrap styles are loaded. */
:root {
    --dkb-red: #d2232a;
    --dkb-red-dark: #ad1a20;
    --dkb-blue: #4a90d9;
    --dkb-ink: #1f2328;
    --dkb-muted: #5b6168;
    --dkb-line: #dcd6cf;
    --dkb-bg: #f6f3ef;
    --dkb-card: #ffffff;
    --dkb-green: #1f9d55;
    --dkb-radius: 18px;
    --dkb-ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }
body.dkb-consent {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dkb-ink);
    background: var(--dkb-bg);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Soft brand-colored glow behind the card */
.dkb-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(40rem 30rem at 0% 0%, rgba(74, 144, 217, .16), transparent 60%),
        radial-gradient(40rem 30rem at 100% 100%, rgba(210, 35, 42, .12), transparent 60%);
}

.dkb-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px;
    background: var(--dkb-card);
    border-radius: var(--dkb-radius);
    box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(31, 35, 40, .10);
    padding: 28px 24px 26px;
    animation: dkb-rise .5s var(--dkb-ease) both;
}

.dkb-logo { display: block; width: 220px; max-width: 70%; height: auto; margin: 0 auto 18px; }

h1 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 8px; text-align: center; letter-spacing: -.01em; }
.dkb-lead { margin: 0 0 22px; text-align: center; color: var(--dkb-muted); line-height: 1.45; font-size: .98rem; }

.dkb-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }

.dkb-phone-wrap {
    display: flex; align-items: center;
    border: 1.5px solid var(--dkb-line); border-radius: 12px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.dkb-phone-wrap:focus-within { border-color: var(--dkb-blue); box-shadow: 0 0 0 4px rgba(74, 144, 217, .18); }
.dkb-phone-wrap.is-invalid { border-color: var(--dkb-red); box-shadow: 0 0 0 4px rgba(210, 35, 42, .12); }
.dkb-prefix { padding: 0 4px 0 14px; color: var(--dkb-muted); font-size: 1.15rem; }
.dkb-input {
    flex: 1; min-width: 0;
    border: 0; outline: 0; background: transparent;
    font: inherit; font-size: 1.25rem; letter-spacing: .02em;
    padding: 14px 14px 14px 6px;
    color: var(--dkb-ink);
}
.dkb-input::placeholder { color: #b3ada6; }

/* Custom checkbox. The real input stays in the DOM for keyboards and screen readers. */
.dkb-check {
    display: flex; gap: 12px; align-items: flex-start;
    margin: 20px 0 6px; cursor: pointer;
    font-size: .84rem; line-height: 1.45; color: var(--dkb-muted);
}
.dkb-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dkb-box {
    flex: 0 0 24px; width: 24px; height: 24px; margin-top: 1px;
    border: 1.5px solid #b9b2aa; border-radius: 7px; background: #fff;
    display: grid; place-items: center;
    transition: background .15s, border-color .15s, transform .15s;
}
.dkb-box svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .2s ease .05s; }
.dkb-check input:checked + .dkb-box { background: var(--dkb-red); border-color: var(--dkb-red); }
.dkb-check input:checked + .dkb-box svg { stroke-dashoffset: 0; }
.dkb-check input:focus-visible + .dkb-box { box-shadow: 0 0 0 4px rgba(74, 144, 217, .3); }
.dkb-check:active .dkb-box { transform: scale(.92); }
.dkb-check a { color: var(--dkb-blue); }

.dkb-error { min-height: 1.3em; margin: 10px 0 4px; color: var(--dkb-red-dark); font-size: .9rem; font-weight: 600; }
.dkb-error:empty { visibility: hidden; }

.dkb-btn {
    position: relative; width: 100%;
    margin-top: 6px; padding: 15px 18px;
    border: 0; border-radius: 12px;
    background: var(--dkb-red); color: #fff;
    font: inherit; font-size: 1.1rem; font-weight: 700; letter-spacing: .02em;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(210, 35, 42, .28);
    transition: background .15s, transform .1s, box-shadow .15s, opacity .15s;
}
.dkb-btn:hover { background: var(--dkb-red-dark); }
.dkb-btn:active { transform: translateY(1px) scale(.99); }
.dkb-btn:focus-visible { outline: 3px solid rgba(74, 144, 217, .5); outline-offset: 2px; }
.dkb-btn.is-disabled { opacity: .45; box-shadow: none; }
.dkb-spinner {
    display: none; position: absolute; top: 50%; left: 50%;
    width: 22px; height: 22px; margin: -11px 0 0 -11px;
    border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
    animation: dkb-spin .7s linear infinite;
}
.dkb-btn.is-busy .dkb-btn-label { visibility: hidden; }
.dkb-btn.is-busy .dkb-spinner { display: block; }

.dkb-shake { animation: dkb-shake .4s; }

/* Honeypot: off-screen, not display:none (some bots skip hidden fields) */
.dkb-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Success ---------- */
.dkb-done-view { text-align: center; padding: 6px 0 2px; outline: 0; }
.dkb-done-view h1 { animation: dkb-fade-up .5s var(--dkb-ease) .55s both; }
.dkb-done-view .dkb-lead { animation: dkb-fade-up .5s var(--dkb-ease) .7s both; }
.dkb-done-view .dkb-link { animation: dkb-fade-up .5s var(--dkb-ease) .85s both; }

.dkb-tick { width: 108px; height: 108px; margin: 4px auto 14px; display: block; overflow: visible; }
.dkb-tick-ring { fill: none; stroke: rgba(31, 157, 85, .18); stroke-width: 6; }
.dkb-tick-fill {
    fill: var(--dkb-green);
    transform-origin: 50px 50px; transform: scale(0);
    animation: dkb-pop .5s cubic-bezier(.3, 1.6, .5, 1) .1s forwards;
}
.dkb-tick-mark {
    fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 80; stroke-dashoffset: 80;
    animation: dkb-draw .4s ease-out .45s forwards;
}

.dkb-link {
    display: inline-block; margin-top: 4px; padding: 12px 34px;
    border-radius: 12px; border: 1.5px solid var(--dkb-line);
    color: var(--dkb-ink); text-decoration: none; font-weight: 600;
}
.dkb-link:hover { border-color: var(--dkb-ink); }

/* Card "breathes" when it switches to the success view */
.dkb-card.is-celebrating { animation: dkb-squish .6s var(--dkb-ease); }

.dkb-foot { position: relative; z-index: 1; margin: 18px 0 0; font-size: .78rem; color: #9a938b; }

/* Confetti pieces are created by consent.js */
.dkb-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.dkb-confetti i {
    position: absolute; top: var(--y0); left: var(--x0);
    width: var(--w); height: var(--h); border-radius: 2px;
    background: var(--c);
    opacity: 0;
    animation: dkb-confetti var(--d) cubic-bezier(.15, .6, .4, 1) var(--delay) forwards;
}

/* ---------- Keyframes ---------- */
@keyframes dkb-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dkb-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dkb-spin { to { transform: rotate(360deg); } }
@keyframes dkb-pop { to { transform: scale(1); } }
@keyframes dkb-draw { to { stroke-dashoffset: 0; } }
@keyframes dkb-squish { 0% { transform: scale(1); } 35% { transform: scale(.97); } 100% { transform: scale(1); } }
@keyframes dkb-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}
@keyframes dkb-confetti {
    0% { opacity: 1; transform: translate(0, 0) rotate(0); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition: none !important; }
    .dkb-confetti { display: none; }
}

@media (min-width: 600px) {
    .dkb-card { padding: 36px 36px 32px; }
    h1 { font-size: 1.7rem; }
}
