/* ==========================================================================
   FlamingoTechs - 新客户建站信息收集卡 (Onboarding Page Styles)
   100% 纯原生重构：彻底剥离 Elementor 依赖
   ========================================================================== */

/* 1. 页面与主区块容器 */
.ft-onboard-page {
    width: 100%;
    background-color: #FAFAFC;
}

.ft-onboard-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-top: 80px;
    padding-bottom: 80px;
    padding-left: 0;
    padding-right: 0;
    background-color: #FAFAFC;
    box-sizing: border-box;
}

/* 2. 页面主标题区 */
.ft-onboard-header {
    text-align: center;
    width: 100%;
}

.ft-onboard-subtitle {
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 2rem; /* 32px */
    font-weight: 600;
    line-height: 1.1;
    color: #0D0D16;
    margin: 0;
    padding: 0;
    text-align: center;
}

.ft-onboard-title {
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 60px;
    font-weight: 800;
    line-height: 1.1;
    color: #0D0D16;
    margin: 12px 0 48px 0;
    padding: 0;
    text-align: center;
}

/* 3. 响应式适配 */
@media (max-width: 1024px) {
    .ft-onboard-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

@media (max-width: 767px) {
    .ft-onboard-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }
    .ft-onboard-subtitle {
        font-size: 20px;
        margin: 12px 0 12px 0;
    }
    .ft-onboard-title {
        font-size: 30px;
        margin: 0 0 20px 0;
    }
}

/* ==========================================================================
   4. 表单核心样式 (Form Core & Components)
   ========================================================================== */
    /* =========================================
       1. 核心变量 & 动画
       ========================================= */
    :root {
        --ft-purple: #7B61FF;
        --ft-pink: #f9736f;
        --ft-dark: #2D3748;
        --ft-gray: #718096;
        --ft-border: #E2E8F0;
        --ft-input-bg: #F8FAFC;
        --ft-success: #48BB78;
        --ft-error: #F56565;
    }

    /* 容器样式 (已移除原 body 样式，避免污染全局网页布局) */
    .ft-contact-section {
        font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
    }

    @media (max-width: 1280px) {
        .ft-contact-section {
            padding-left: 4%;
            padding-right: 4%;
        }
    }

    @keyframes barFlow {
        0% {
            background-position: 0% 50%;
        }
        50% {
            background-position: 100% 50%;
        }
        100% {
            background-position: 0% 50%;
        }
    }

    @keyframes softGlowPulse {
        0% {
            box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.05), 0 4px 10px rgba(123, 97, 255, 0.1);
        }
        50% {
            box-shadow: 0 0 0 4px rgba(249, 115, 111, 0.08), 0 6px 15px rgba(123, 97, 255, 0.15);
        }
        100% {
            box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.05), 0 4px 10px rgba(123, 97, 255, 0.1);
        }
    }

    @keyframes fadeSlideUp {
        from {
            opacity: 0;
            transform: translateY(15px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* =========================================
       2. 容器架构 & 3. 网格布局
       ========================================= */
    .ft-form-wrapper {
        position: relative;
        width: 100%;
        border-radius: 24px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
        z-index: 1;
    }

    .ft-bg-layer {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff;
        border-radius: 24px;
        border: 1px solid rgba(226, 232, 240, 0.5);
        overflow: hidden;
        z-index: 0;
        pointer-events: none;
    }

    .ft-top-bar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(90deg, var(--ft-purple), var(--ft-pink), var(--ft-purple));
        background-size: 200% 100%;
        animation: barFlow 4s linear infinite;
    }

    .ft-content-layer {
        position: relative;
        padding: 40px 60px;
        z-index: 2;
    }

    .ft-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .ft-form-full {
        grid-column: 1 / -1;
    }

    .ft-input-group {
        position: relative;
        display: flex;
        flex-direction: column;
    }

    /* =========================================
       多步进度条导航样式
       ========================================= */
    .ft-step-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 55px;
        position: relative;
        padding: 0 10%;
    }

    .ft-step-line {
        position: absolute;
        top: 18px;
        left: 15%;
        right: 15%;
        height: 4px;
        background-color: var(--ft-border);
        z-index: 1;
        border-radius: 2px;
    }

    .ft-step-line-progress {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        background: var(--ft-purple);
        width: 0%;
        transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 2px;
    }

    .ft-step-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        z-index: 2;
        cursor: pointer;
    }

    .ft-step-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background-color: white;
        border: 2px solid var(--ft-border);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 16px;
        color: var(--ft-gray);
        margin-bottom: 8px;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    }

    .ft-step-title {
        font-size: 15px;
        font-weight: 600;
        color: var(--ft-gray);
        transition: all 0.4s ease;
        letter-spacing: 0.5px;
    }

    /* 激活状态 */
    .ft-step-item.active .ft-step-icon {
        width: 42px;
        height: 42px;
        margin-top: -3px;
        margin-bottom: 5px;
        font-size: 18px;
        background: var(--ft-purple);
        border-color: transparent;
        color: white;
        border-radius: 12px;
    }

    .ft-step-item.active .ft-step-title {
        color: var(--ft-purple);
        font-weight: 700;
    }

    /* 完成状态 */
    .ft-step-item.completed .ft-step-icon {
        background-color: #F0EDFF;
        border-color: var(--ft-purple);
        color: var(--ft-purple);
    }

    .ft-step-item.completed .ft-step-title {
        color: var(--ft-dark);
    }

    .ft-step-content {
        display: none;
        animation: fadeSlideUp 0.5s ease forwards;
    }

    @media (min-width: 769px) {
        .ft-step-content {
            min-height: 500px;
        }
    }

    .ft-step-content.active {
        display: block;
    }

    /* Label 样式 */
    .ft-label {
        font-size: 18px;
        font-weight: 500;
        color: var(--ft-dark);
        margin-bottom: 10px;
        margin-left: 4px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        letter-spacing: 0.2px;
    }

    .ft-label-text {
        display: flex;
        align-items: center;
    }

    .ft-label-required {
        color: var(--ft-pink);
        margin-left: 4px;
    }

    .ft-label-note {
        font-size: 12px;
        font-weight: normal;
        color: var(--ft-gray);
        margin-left: 8px;
    }

    /* =========================================
       4. 输入框样式
       ========================================= */
    .ft-input,
    .ft-textarea {
        width: 100%;
        padding: 14px 18px;
        border-radius: 12px;
        color: var(--ft-dark);
        font-size: 15px;
        transition: all 0.3s ease-in-out;
        box-sizing: border-box;
        outline: none !important;
        border: 2px solid transparent !important;
        box-shadow: inset 0 0 0 1px #E2E8F0;
        background-color: var(--ft-input-bg) !important;
    }

    .ft-input::placeholder,
    .ft-textarea::placeholder {
        color: #A0AEC0;
        font-weight: 300;
    }

    .ft-input:hover,
    .ft-textarea:hover {
        background-color: #fff !important;
        box-shadow: inset 0 0 0 1px #CBD5E0, 0 4px 10px rgba(0, 0, 0, 0.02);
    }

    .ft-input:focus,
    .ft-textarea:focus {
        background-color: #fff !important;
        box-shadow: none;
        border-color: transparent !important;
        background-image: linear-gradient(#fff, #fff), linear-gradient(90deg, var(--ft-purple), var(--ft-pink), var(--ft-purple));
        background-origin: border-box;
        background-clip: padding-box, border-box;
        background-size: 200% 100%;
        animation: softGlowPulse 3s infinite alternate ease-in-out;
    }

    .ft-textarea {
        resize: none;
        min-height: 100px;
        overflow: hidden;
    }

    /* =========================================
       5. 卡片式多选/单选样式
       ========================================= */
    .ft-choice-group {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .ft-choice-item {
        position: relative;
        display: flex;
        align-items: center;
        cursor: pointer;
        background-color: var(--ft-input-bg);
        border: 1px solid var(--ft-border);
        border-radius: 12px;
        padding: 12px 16px;
        transition: all 0.3s ease;
        flex: 0 0 calc(50% - 5px);
        box-sizing: border-box;
    }

    .ft-choice-item.full-width {
        flex: 1 1 100%;
    }

    @media (min-width: 769px) {
        .ft-desktop-row .ft-choice-item {
            flex: 1 1 0;
            min-width: 120px;
        }

        .ft-desktop-4col .ft-choice-item {
            flex: 0 0 calc(25% - 7.5px);
        }

        .ft-desktop-4col .ft-conditional-input {
            flex: 1 1 calc(50% - 10px);
            margin-top: 0 !important;
        }
    }

    /* 平板端优化 */
    @media (min-width: 769px) and (max-width: 1024px) {
        .ft-desktop-4col .ft-choice-item {
            flex: 0 0 calc(33.33% - 7px);
        }

        .ft-desktop-4col .ft-conditional-input {
            flex: 1 1 calc(66.67% - 10px) !important;
        }

        .ft-content-layer {
            padding: 40px 40px;
        }
    }

    .ft-choice-group .ft-conditional-input {
        flex: 1 1 calc(50% - 10px);
        margin-top: 0 !important;
    }

    .vertical-half {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .vertical-half .ft-choice-item {
        width: calc(50% - 5px) !important;
        flex: 0 0 auto !important;
        margin-bottom: 10px;
    }

    .vertical-half .ft-choice-item:last-child {
        margin-bottom: 0;
    }

    @media (max-width: 768px) {
        .ft-choice-group .ft-conditional-input {
            flex: 1 1 120px !important;
            margin-top: 0 !important;
        }
    }

    .ft-choice-item:hover {
        background-color: #fff;
        border-color: #CBD5E0;
        transform: translateY(-1px);
    }

    .ft-choice-input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

    .ft-choice-mark {
        position: relative;
        width: 20px;
        height: 20px;
        border: 2px solid #CBD5E0;
        margin-right: 10px;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .ft-choice-input[type="radio"]~.ft-choice-mark {
        border-radius: 50%;
    }

    .ft-choice-input[type="radio"]:checked~.ft-choice-mark {
        background-color: var(--ft-purple);
        border-color: var(--ft-purple);
    }

    .ft-choice-input[type="radio"]:checked~.ft-choice-mark::after {
        content: '';
        display: block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: white;
    }

    .ft-choice-input[type="checkbox"]~.ft-choice-mark {
        border-radius: 6px;
    }

    .ft-choice-input[type="checkbox"]:checked~.ft-choice-mark {
        background-color: var(--ft-purple);
        border-color: var(--ft-purple);
    }

    .ft-choice-input[type="checkbox"]:checked~.ft-choice-mark::after {
        content: '';
        display: block;
        width: 5px;
        height: 10px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
        margin-bottom: 2px;
    }

    .ft-choice-text {
        font-size: 14px;
        color: var(--ft-dark);
    }

    .ft-choice-input:checked~.ft-choice-text {
        color: var(--ft-purple);
        font-weight: 600;
    }

    .ft-choice-item.selected {
        background-color: #F0F5FF;
        border-color: var(--ft-purple);
        box-shadow: 0 4px 12px rgba(123, 97, 255, 0.08);
    }

    .ft-conditional-input {
        display: none;
        margin-top: 10px;
        width: 100%;
        animation: fadeInDown 0.3s ease;
    }

    .ft-conditional-input.active {
        display: block;
    }

    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-5px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* 验证与错误样式 */
    .ft-validation-msg {
        font-size: 12px;
        margin-left: 10px;
        transition: all 0.3s ease;
    }

    .ft-validation-msg.invalid {
        color: var(--ft-error);
    }

    .ft-input.input-error,
    .ft-textarea.input-error {
        border-color: var(--ft-error) !important;
        box-shadow: inset 0 0 0 1px var(--ft-error) !important;
        background-color: #FFF5F5 !important;
    }

    /* =========================================
       6. 导航按钮 & 消息
       ========================================= */
    .ft-form-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        align-items: center;
        margin-top: 30px;
        padding-top: 25px;
        border-top: 1px solid var(--ft-border);
    }

    .ft-action-left {
        display: flex;
        justify-content: flex-start;
    }

    .ft-action-center {
        display: flex;
        justify-content: center;
    }

    .ft-action-right {
        display: flex;
        justify-content: flex-end;
    }

    .ft-nav-btn,
    .ft-submit-btn {
        padding: 14px 40px;
        border-radius: 50px;
        font-weight: 600;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
        outline: none;
    }

    .ft-prev-btn {
        background-color: white;
        border: 1px solid var(--ft-border);
        color: var(--ft-gray);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    }

    .ft-prev-btn:hover {
        background-color: #F8FAFC;
        border-color: #CBD5E0;
        color: var(--ft-dark);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    .ft-next-btn {
        background: var(--ft-purple);
        border: none;
        color: white;
        box-shadow: 0 4px 15px rgba(123, 97, 255, 0.3);
    }

    .ft-next-btn:hover {
        background: #6244FF;
        box-shadow: 0 6px 18px rgba(123, 97, 255, 0.4);
    }

    .ft-submit-btn {
        background: radial-gradient(circle, var(--ft-pink) 0%, var(--ft-purple) 100%);
        background-size: 200% auto;
        background-position: 0% 50%;
        border: none;
        color: white;
        box-shadow: 0 4px 15px rgba(123, 97, 255, 0.3);
    }

    .ft-submit-btn:hover {
        box-shadow: 0 6px 18px rgba(123, 97, 255, 0.4);
    }

    .ft-submit-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        animation: none;
        transform: none;
        box-shadow: none;
    }

    #ft-form-message,
    #ft-form-bottom-message {
        font-size: 15px;
        display: none;
        padding: 14px 24px;
        border-radius: 12px;
        text-align: center;
        margin-bottom: 25px;
        width: 100%;
        box-sizing: border-box;
    }

    #ft-form-message.success,
    #ft-form-bottom-message.success {
        color: #2F855A;
        background: #F0FFF4;
        border: 1px solid #C6F6D5;
    }

    #ft-form-message.error,
    #ft-form-bottom-message.error {
        color: #C53030;
        background: #FFF5F5;
        border: 1px solid #FEB2B2;
    }

    /* 移动端响应式 */
    @media (max-width: 768px) {
        .ft-content-layer {
            padding: 25px 15px;
        }

        .ft-form-grid {
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        .ft-step-container {
            padding: 0 2%;
            margin-bottom: 25px;
        }

        .ft-step-icon {
            width: 30px;
            height: 30px;
            font-size: 14px;
            border-radius: 8px;
            margin-bottom: 6px;
        }

        .ft-step-item.active .ft-step-icon {
            width: 36px;
            height: 36px;
            margin-top: -3px;
            margin-bottom: 3px;
            font-size: 16px;
            border-radius: 10px;
        }

        .ft-step-title {
            font-size: 12px;
        }

        .ft-step-line {
            top: 15px;
        }

        .ft-label {
            font-size: 14px;
            margin-bottom: 6px;
        }

        .ft-validation-msg {
            font-size: 11px;
            margin-left: 6px;
        }

        .ft-input::placeholder,
        .ft-textarea::placeholder {
            font-size: 13px;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
        }

        .ft-choice-item {
            padding: 10px 10px;
        }

        .ft-choice-text {
            font-size: 13px;
            line-height: 1.3;
        }

        .ft-choice-mark {
            width: 18px;
            height: 18px;
            margin-right: 8px;
            flex-shrink: 0;
        }

        .ft-desktop-4col .ft-choice-item {
            flex: 0 0 calc(33.33% - 7px) !important;
            padding: 10px 6px;
        }

        .ft-desktop-4col .ft-choice-text {
            font-size: 12px;
            letter-spacing: -0.3px;
        }

        .ft-form-actions {
            display: flex;
            gap: 12px;
        }

        .ft-action-left,
        .ft-action-center,
        .ft-action-right {
            display: contents;
        }

        .ft-nav-btn,
        .ft-submit-btn {
            flex: 1;
            width: auto;
            padding: 12px 24px;
            font-size: 15px;
        }
    }
