/* ═══════════════════════════════════════════════════════════
   Kampanie kursowe — front-end activation form
   ═══════════════════════════════════════════════════════════ */

/* 1 — Full-width wrap; form centers itself inside ───────── */

.kk-form-wrap {
    width: 100%;
}

/* 2 — Form: centered, max-width, design tokens ──────────── */

.kk-form {
    width: 100%;
    max-width: 480px;
    margin-inline: auto;

    --kk-primary:       oklch(0.48 0.15 330);
    --kk-primary-hover: oklch(0.56 0.13 330);
    --kk-on-primary:    oklch(1.000 0.000 0);
    --kk-bg:            oklch(1.000 0.000 0);
    --kk-surface:       oklch(0.975 0.004 330);
    --kk-border:        oklch(0.88 0.004 330);
    --kk-ink:           oklch(0.16 0.010 330);
    --kk-muted:         oklch(0.44 0.006 330);
    --kk-focus-ring:    oklch(0.48 0.15 330 / 0.15);
    --kk-r:             6px;
    --kk-t:             150ms;
    --kk-ease:          cubic-bezier(0.22, 1, 0.36, 1);

    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--kk-ink);
}

/* 3 — Field wrappers ────────────────────────────────────── */

.kk-form .kk-field {
    margin: 0 0 1.25rem;
}

/* Label above text/email inputs only (not consent, not submit) */
.kk-form .kk-field:not(.kk-consent) > label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--kk-ink);
    margin-bottom: 0.375rem;
}

/* 4 — Text / email inputs ───────────────────────────────── */

.kk-form input[type="text"],
.kk-form input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--kk-border);
    border-radius: var(--kk-r);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--kk-ink);
    background: var(--kk-bg);
    appearance: none;
    -webkit-appearance: none;
    transition:
        border-color var(--kk-t) var(--kk-ease),
        box-shadow var(--kk-t) var(--kk-ease);
}

.kk-form input[type="text"]:focus,
.kk-form input[type="email"]:focus {
    outline: none;
    border-color: var(--kk-primary);
    box-shadow: 0 0 0 3px var(--kk-focus-ring);
}

.kk-form input[type="text"]::placeholder,
.kk-form input[type="email"]::placeholder {
    color: var(--kk-muted);
    opacity: 1;
}

/* 5 — Consent checkbox ──────────────────────────────────── */

.kk-form .kk-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
}

.kk-form .kk-consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--kk-primary);
    cursor: pointer;
}

.kk-form .kk-consent > label {
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--kk-ink);
    cursor: pointer;
}

.kk-form .kk-consent > label a {
    color: var(--kk-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kk-form .kk-consent > label a:hover {
    opacity: 0.8;
}

/* 6 — Submit button ─────────────────────────────────────── */

.kk-form #kk-submit {
    width: 100%;
    padding: 12px 24px;
    background: var(--kk-primary);
    color: var(--kk-on-primary);
    border: none;
    border-radius: var(--kk-r);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background var(--kk-t) var(--kk-ease);
}

.kk-form #kk-submit:hover {
    background: var(--kk-primary-hover);
}

.kk-form #kk-submit:focus-visible {
    outline: 2px solid var(--kk-primary);
    outline-offset: 2px;
}

.kk-form #kk-submit:disabled {
    opacity: 0.65;
    cursor: progress;
}

/* 7 — Result message ────────────────────────────────────── */

.kk-form .kk-result {
    margin-top: 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    border-radius: var(--kk-r);
}

.kk-form .kk-result:not(:empty) {
    padding: 12px 16px;
}

.kk-form .kk-result.kk-ok {
    color: oklch(0.30 0.12 145);
    background: oklch(0.96 0.03 145);
    border: 1px solid oklch(0.84 0.07 145);
}

.kk-form .kk-result.kk-error {
    color: oklch(0.36 0.18 25);
    background: oklch(0.96 0.04 25);
    border: 1px solid oklch(0.85 0.08 25);
}

/* 8 — CTA link inside result ────────────────────────────── */

.kk-form .kk-cta {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--kk-primary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* 9 — Noscript warning ──────────────────────────────────── */

.kk-form .kk-noscript {
    color: oklch(0.36 0.18 25);
    background: oklch(0.96 0.04 25);
    border: 1px solid oklch(0.85 0.08 25);
    border-radius: var(--kk-r);
    padding: 12px 16px;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* 10 — Reduced motion ───────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .kk-form * {
        transition-duration: 0.01s !important;
    }
}
