.akpf-modal,
.akpf-modal * {
    box-sizing: border-box;
}

.akpf-modal {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
    font-family: inherit;
}

.akpf-modal.akpf-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.akpf-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 13, 24, .60);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.akpf-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: min(860px, calc(100vh - 48px));
    overflow: auto;
    background: rgba(255,255,255,.985);
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 28px;
    box-shadow: 0 30px 100px rgba(0,0,0,.24);
    transform: translateY(18px) scale(.985);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    scrollbar-width: thin;
}

.akpf-modal.akpf-open .akpf-dialog {
    transform: translateY(0) scale(1);
}

.akpf-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 1px solid #e7e9ee;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}

.akpf-close:hover {
    transform: rotate(6deg);
    background: #f7f8fa;
}

.akpf-close span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 1.5px;
    background: #111827;
    border-radius: 2px;
}

.akpf-close span:first-child { transform: translate(-50%,-50%) rotate(45deg); }
.akpf-close span:last-child  { transform: translate(-50%,-50%) rotate(-45deg); }

.akpf-modal-content {
    min-height: 220px;
}

.akpf-form-shell {
    padding: 42px;
}

.akpf-heading {
    padding-right: 54px;
    margin-bottom: 28px;
}

.akpf-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid #e8eaf0;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: .12em;
    color: #6b7280;
    background: #fbfbfc;
    margin-bottom: 14px;
}

.akpf-heading h3 {
    margin: 0;
    font-size: clamp(28px,4vw,42px);
    line-height: 1.08;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -.035em;
}

.akpf-heading p {
    margin: 12px 0 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.8;
    max-width: 620px;
}

.akpf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 18px;
}

.akpf-field.akpf-full {
    grid-column: 1 / -1;
}

.akpf-field label {
    display: block;
    margin: 0 0 8px;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
}

.akpf-required {
    color: #ef4444;
}

.akpf-field input,
.akpf-field select {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    border: 1px solid #e3e6eb;
    border-radius: 14px;
    outline: none;
    background: #fafbfc;
    color: #111827;
    font: inherit;
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.akpf-field input:hover,
.akpf-field select:hover {
    background: #fff;
    border-color: #d5d9e1;
}

.akpf-field input:focus,
.akpf-field select:focus {
    background: #fff;
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17,24,39,.06);
}

.akpf-field.akpf-has-error input,
.akpf-field.akpf-has-error select {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.07);
}

.akpf-field-error {
    display: block;
    min-height: 16px;
    margin-top: 5px;
    color: #dc2626;
    font-size: 11px;
}

.akpf-submit {
    width: 100%;
    min-height: 56px;
    margin-top: 10px;
    border: 0;
    border-radius: 16px;
    background: #0f172a;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.akpf-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15,23,42,.18);
}

.akpf-submit:disabled {
    cursor: wait;
    opacity: .75;
    transform: none;
}

.akpf-submit-icon {
    font-size: 18px;
    line-height: 1;
}

.akpf-submit-loader {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: akpfSpin .7s linear infinite;
}

.akpf-form.akpf-sending .akpf-submit-loader { display: inline-block; }
.akpf-form.akpf-sending .akpf-submit-icon { display: none; }

.akpf-form-message {
    min-height: 22px;
    margin-top: 2px;
    font-size: 13px;
}

.akpf-form-message.akpf-success {
    margin: 10px 0 0;
    padding: 13px 15px;
    border: 1px solid #d6eee0;
    background: #f2fbf6;
    color: #166534;
    border-radius: 13px;
}

.akpf-form-message.akpf-error {
    color: #b91c1c;
}

.akpf-hp {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
}

.akpf-loader {
    min-height: 260px;
    display: grid;
    place-items: center;
}

.akpf-loader span {
    width: 32px;
    height: 32px;
    border: 3px solid #eceef2;
    border-top-color: #111827;
    border-radius: 50%;
    animation: akpfSpin .7s linear infinite;
}

.akpf-shortcode-button {
    appearance: none;
    border: 0;
    border-radius: 14px;
    background: #0f172a;
    color: white;
    padding: 14px 20px;
    font-weight: 700;
    cursor: pointer;
}

body.akpf-lock {
    overflow: hidden;
}

@keyframes akpfSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
    .akpf-modal {
        padding: 10px;
        align-items: end;
    }

    .akpf-dialog {
        width: 100%;
        max-height: calc(100vh - 10px);
        border-radius: 24px 24px 18px 18px;
    }

    .akpf-form-shell {
        padding: 28px 18px 22px;
    }

    .akpf-heading {
        padding-right: 44px;
        margin-bottom: 22px;
    }

    .akpf-heading h3 {
        font-size: 28px;
    }

    .akpf-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .akpf-field.akpf-full {
        grid-column: auto;
    }

    .akpf-field input,
    .akpf-field select {
        height: 49px;
        border-radius: 13px;
    }

    .akpf-submit {
        min-height: 52px;
        border-radius: 14px;
        margin-top: 6px;
    }

    .akpf-close {
        top: 14px;
        right: 14px;
    }
}
