/* KlerkIt Landing1 - "Pilot KlerkIt with 5 clients" modal.
   Uses Landing1's own :root tokens (--blue, --ink, --muted, --line) so it
   matches the page. All selectors are prefixed .kk-pm. */

/* The final CTA is now a <button>: give it the <a class="btn"> look. */
button.btn { font: inherit; cursor: pointer; }

.kk-pm[hidden] { display: none; }

.kk-pm {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.kk-pm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 45, .45);
    backdrop-filter: blur(3px);
}

.kk-pm-dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 36px 36px 30px;
    border-radius: 20px;
    background: #fff;
    color: var(--ink, #08142d);
    box-shadow: 0 24px 64px rgba(16, 53, 111, .18);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.kk-pm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted, #6b7c99);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.kk-pm-close:hover { background: #f1f5fb; color: var(--ink, #08142d); }
.kk-pm-close:disabled { opacity: .4; cursor: default; }

.kk-pm-title {
    margin: 0 36px 0 0;
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -.02em;
    font-weight: 800;
}

.kk-pm-lead {
    margin: 12px 0 0;
    color: var(--muted, #6b7c99);
    font-size: 15px;
    line-height: 1.6;
}

/* ── Step 1: choice ── */
.kk-pm-choices { display: grid; gap: 12px; margin-top: 26px; }

.kk-pm-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--line, rgba(16, 56, 120, .12));
    border-radius: 16px;
}
.kk-pm-choice-label { font-size: 15px; font-weight: 700; }

/* ── Buttons ── */
.kk-pm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.kk-pm-btn-primary { border: 0; color: #fff; background: var(--blue, #0b63ff); box-shadow: 0 8px 20px rgba(11, 99, 255, .22); }
.kk-pm-btn-primary:hover { background: #0a56df; }
.kk-pm-btn-secondary { border: 1px solid rgba(11, 99, 255, .28); color: var(--blue, #0b63ff); background: #fff; }
.kk-pm-btn-secondary:hover { background: #f3f8ff; }
.kk-pm-btn[disabled] { opacity: .65; cursor: default; }
.kk-pm-btn:focus-visible,
.kk-pm-close:focus-visible,
.kk-pm-link:focus-visible { outline: 3px solid rgba(11, 99, 255, .35); outline-offset: 2px; }

/* ── Step 2: form ── */
.kk-pm-form { margin-top: 22px; display: grid; gap: 16px; }

.kk-pm-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.kk-pm-optional { color: var(--muted, #6b7c99); font-weight: 500; }

.kk-pm-field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(16, 56, 120, .18);
    border-radius: 12px;
    background: #fff;
    color: var(--ink, #08142d);
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.kk-pm-field input:focus { border-color: var(--blue, #0b63ff); box-shadow: 0 0 0 3px rgba(11, 99, 255, .14); }
.kk-pm-field input[aria-invalid="true"] { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .10); }

.kk-pm-field-error { margin-top: 6px; font-size: 12.5px; color: #dc2626; }
.kk-pm-field-error:empty { display: none; }

/* Honeypot: invisible to people and screen readers, reachable by naive bots. */
.kk-pm-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.kk-pm-alert {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.5;
}
.kk-pm-alert[hidden] { display: none; }
.kk-pm-alert a { color: #991b1b; font-weight: 700; margin-left: 4px; }

.kk-pm-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }

.kk-pm-link {
    border: 0;
    background: transparent;
    padding: 8px 4px;
    color: var(--muted, #6b7c99);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.kk-pm-link:hover { color: var(--ink, #08142d); }

/* ── Step 3: success ── */
.kk-pm-success { text-align: center; padding: 8px 0 4px; }
.kk-pm-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf2ff;
    color: var(--blue, #0b63ff);
    font-size: 26px;
    font-weight: 800;
}
.kk-pm-success .kk-pm-title { margin: 0; }
.kk-pm-success .kk-pm-btn { margin-top: 26px; min-width: 140px; }

body.kk-pm-open { overflow: hidden; }

@media (max-width: 560px) {
    .kk-pm { align-items: flex-end; padding: 0; }
    .kk-pm-dialog { max-height: 92vh; padding: 28px 20px 22px; border-radius: 20px 20px 0 0; }
    .kk-pm-title { font-size: 22px; }
    .kk-pm-choice { flex-direction: column; align-items: stretch; }
    .kk-pm-choice .kk-pm-btn { width: 100%; }
    .kk-pm-actions { flex-direction: column-reverse; align-items: stretch; }
    .kk-pm-actions .kk-pm-btn { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
    .kk-pm:not([hidden]) .kk-pm-dialog { animation: kk-pm-in .18s ease-out; }
    @keyframes kk-pm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
