/* 单页 {{custom_form}} 嵌入表单。选择器写成 .cf-embed.cf-embed，压过各模板 .cat-main * 的 margin/padding 重置。 */

.cf-embed.cf-embed {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    padding: 20px 22px 18px;
    background: #fff;
    border: 1px solid #e3e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #333;
    text-align: start;
    text-transform: none;
    letter-spacing: normal;
}

.cf-embed.cf-embed.cf-embed--noborder {
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.cf-embed.cf-embed *,
.cf-embed.cf-embed *::before,
.cf-embed.cf-embed *::after {
    box-sizing: border-box;
    text-transform: none;
    letter-spacing: normal;
}

.cf-embed.cf-embed .cf-embed__row {
    display: flex;
    gap: 16px;
    margin: 0 0 16px;
}

.cf-embed.cf-embed .cf-embed__cell {
    flex: 1;
    min-width: 0;
}

.cf-embed.cf-embed .cf-embed__label {
    display: block;
    margin: 0 0 6px;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
}

.cf-embed.cf-embed .cf-embed__req {
    margin-inline-start: 2px;
    color: #e11d48;
    font-weight: 700;
}

.cf-embed.cf-embed input[type="text"],
.cf-embed.cf-embed select {
    display: block;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font: inherit;
    line-height: 40px;
    outline: none;
    box-shadow: none;
}

.cf-embed.cf-embed select {
    padding-inline-end: 28px;
}

.cf-embed.cf-embed textarea {
    display: block;
    width: 100%;
    min-height: 96px;
    height: auto;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font: inherit;
    line-height: 1.6;
    outline: none;
    box-shadow: none;
    resize: vertical;
}

.cf-embed.cf-embed input[type="text"]:focus,
.cf-embed.cf-embed select:focus,
.cf-embed.cf-embed textarea:focus {
    border-color: var(--cat-primary, #4267b2);
    box-shadow: 0 0 0 3px rgba(66, 103, 178, 0.16);
}

.cf-embed.cf-embed .cf-embed__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0;
    padding: 8px 0 0;
}

.cf-embed.cf-embed .cf-embed__choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #333;
    cursor: pointer;
}

.cf-embed.cf-embed .cf-embed__choice input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--cat-primary, #4267b2);
    cursor: pointer;
}

.cf-embed.cf-embed .cf-embed__captcha {
    margin: 0 0 16px;
}

.cf-embed.cf-embed .cf-embed__captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cf-embed.cf-embed .cf-embed__captcha-row input[type="text"] {
    flex: 1;
    width: auto;
    max-width: 220px;
}

.cf-embed.cf-embed .cf-embed__captcha-img {
    display: block;
    width: 120px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    background: #f8fafc;
    cursor: pointer;
}

.cf-embed.cf-embed .cf-embed__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    height: 40px;
    margin: 4px 0 0;
    padding: 0 22px;
    border: 0;
    border-radius: 6px;
    background: var(--cat-primary, #4267b2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.cf-embed.cf-embed .cf-embed__btn--full {
    display: flex;
    width: 100%;
}

.cf-embed.cf-embed .cf-embed__btn:hover {
    filter: brightness(0.92);
}

.cf-embed.cf-embed .cf-embed__btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

html.cf-toast-open,
html.cf-toast-open body {
    overflow: hidden;
}

.cf-toast.cf-toast {
    position: fixed;
    inset: 0;
    z-index: 10080;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    padding: 24px;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.cf-toast.cf-toast.is-open {
    opacity: 1;
    visibility: visible;
}

.cf-toast.cf-toast .cf-toast__card {
    box-sizing: border-box;
    width: min(380px, calc(100vw - 32px));
    margin: 0;
    padding: 36px 28px 28px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
    text-align: center;
    transform: translateY(14px) scale(0.96);
    transition: transform 0.28s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.cf-toast.cf-toast.is-open .cf-toast__card {
    transform: none;
}

.cf-toast.cf-toast .cf-toast__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #ecfdf3;
    color: #16a34a;
}

.cf-toast.cf-toast.cf-toast--err .cf-toast__icon {
    background: #fef2f2;
    color: #dc2626;
}

.cf-toast.cf-toast.cf-toast--ok .cf-toast__icon::after {
    content: "";
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(22, 163, 74, 0.28);
    border-radius: 50%;
    animation: cf-toast-halo 0.9s ease-out;
}

.cf-toast.cf-toast .cf-toast__icon svg {
    display: block;
    width: 72px;
    height: 72px;
}

.cf-toast.cf-toast .cf-toast__ring,
.cf-toast.cf-toast .cf-toast__mark {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
}

.cf-toast.cf-toast .cf-toast__ring {
    stroke-width: 2.4;
    stroke-dasharray: 188;
    stroke-dashoffset: 188;
    animation: cf-toast-draw 0.5s ease forwards;
}

.cf-toast.cf-toast .cf-toast__mark {
    stroke-width: 3.4;
    stroke-linejoin: round;
    stroke-dasharray: 52;
    stroke-dashoffset: 52;
    animation: cf-toast-draw 0.32s 0.34s ease forwards;
}

.cf-toast.cf-toast .cf-toast__title {
    margin: 0 0 22px;
    padding: 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: normal;
    text-transform: none;
    overflow-wrap: anywhere;
}

.cf-toast.cf-toast .cf-toast__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 42px;
    margin: 0;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: var(--cat-primary, #4267b2);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.cf-toast.cf-toast .cf-toast__btn:hover {
    filter: brightness(0.94);
}

.cf-toast.cf-toast .cf-toast__btn:focus-visible {
    outline: 2px solid var(--cat-primary, #4267b2);
    outline-offset: 3px;
}

@keyframes cf-toast-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes cf-toast-halo {
    from {
        opacity: 0.85;
        transform: scale(0.86);
    }
    to {
        opacity: 0;
        transform: scale(1.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cf-toast.cf-toast,
    .cf-toast.cf-toast .cf-toast__card,
    .cf-toast.cf-toast .cf-toast__ring,
    .cf-toast.cf-toast .cf-toast__mark,
    .cf-toast.cf-toast.cf-toast--ok .cf-toast__icon::after {
        animation: none;
        transition: none;
    }

    .cf-toast.cf-toast .cf-toast__ring,
    .cf-toast.cf-toast .cf-toast__mark {
        stroke-dashoffset: 0;
    }
}

@media (max-width: 640px) {
    .cf-embed.cf-embed {
        padding: 16px;
    }

    .cf-embed.cf-embed .cf-embed__row--2 {
        flex-direction: column;
    }
}
