/* ── Cotactic E-Book Multi-Step Form ──────────────────────────── */
.cotactic-ebook-form-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    background: transparent;
    box-sizing: border-box;
    font-family: inherit;
    padding: 40px 0px;
}

/* ── Step panel ──────────────────────────────────────────────── */
.cef-step { display: none; }
.cef-step.active { display: block; }

@keyframes cef-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cef-step.cef-anim { animation: cef-fade-in 0.3s ease both; }

/* ── Question card ───────────────────────────────────────────── */
.cef-question {
    position: relative;
    background: #fff;
    border-radius: 4px;
    padding: 0 48px 0 16px;
    margin-bottom: 10px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    cursor: pointer;
}

.cef-question              { outline: 2px solid rgba(4, 24, 52, 0.2); }
.cef-question.is-focused   { outline: 2px solid rgba(254,211,18,1); }
.cef-question.cef-error-state { outline: 2px solid #e53935; }

/* ── Label ───────────────────────────────────────────────────── */
.cef-label {
    display: block;
    font-size: 16px;
    font-weight: 400;
    color: #838486;
    line-height: 1.4;
    margin: 0;
    pointer-events: none;
    transition: font-size 0.15s, color 0.15s, margin-bottom 0.15s;
}
.cef-label .cef-required { color: #e53935; margin-left: 2px; }

.cef-question.has-value .cef-label {
    font-size: 12px;
    color: #838486;
    margin-bottom: 2px;
}

/* ── Choice: value display + invisible select overlay ─────────── */
.cef-val-display {
    font-size: 16px;
    font-weight: 400;
    color: #041936;
    line-height: 1.4;
    display: none;
}
.cef-question.has-value .cef-val-display { display: block; }

.cef-question.cef-choice select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    font-size: 15px;
}

/* Chevron */
.cef-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg width='21' height='13' viewBox='0 0 21 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.19336 1.19234L10.2599 11.5449L19.3265 1.19234' stroke='%23041936' stroke-width='2.38593' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* ── Text inputs ─────────────────────────────────────────────── */
.cef-question.cef-text { cursor: text; }

.cef-question textarea,
.cef-question input[type="tel"],
.cef-question input[type="email"],
.cef-question input[type="text"] {
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #041936;
    padding: 0;
    resize: none;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.4;
    height: 0;
    overflow: hidden;
    opacity: 0;
    display: block;
    transition: height 0.15s, opacity 0.15s;
}

.cef-question.has-value textarea,
.cef-question.is-focused textarea,
.cef-question.has-value input[type="tel"],
.cef-question.is-focused input[type="tel"],
.cef-question.has-value input[type="email"],
.cef-question.is-focused input[type="email"],
.cef-question.has-value input[type="text"],
.cef-question.is-focused input[type="text"] {
    height: 22px;
    opacity: 1;
}

/* ── Validation ──────────────────────────────────────────────── */
.cef-error-msg {
    color: #e53935;
    font-size: 11px;
    margin-top: 4px;
    display: none;
}
.cef-error-msg.visible { display: block; }

/* ── Navigation ──────────────────────────────────────────────── */
.cef-nav {
    margin-top: 12px;
}

.cef-btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
    padding: 16px 24px;
    font-family: inherit;
    line-height: 1;
    text-align: center;
    box-sizing: border-box;
    background: linear-gradient(90deg, #fed312 0%, #ffb010 100%);
    color: #000;
    transition: background 0.2s;
}

.cef-btn:hover {
    background: linear-gradient(90deg, #ffb010 0%, #fed312 100%);
    animation: cefPulse 1.5s ease infinite;
}

@keyframes cefPulse {
    0%   { box-shadow: 0 0 0 0   rgba(254, 211, 18, 0.7); }
    70%  { box-shadow: 0 0 0 12px rgba(254, 211, 18, 0); }
    100% { box-shadow: 0 0 0 0   rgba(254, 211, 18, 0); }
}

/* ── Back button ─────────────────────────────────────────────── */
.cef-back-wrap {
    text-align: center;
    margin-top: 10px;
}

.cef-btn-back {
    background: none;
    border: none;
    color: #838486;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    text-decoration: underline;
}
.cef-btn-back:hover { color: #041936; }

/* ── Success ─────────────────────────────────────────────────── */
.cef-success {
    text-align: center;
    padding: 40px 20px;
}
.cef-success-icon { font-size: 48px; color: #43a047; margin-bottom: 16px; }
.cef-success p { font-size: 16px; color: #041936; }

/* ── Loading ─────────────────────────────────────────────────── */
.cef-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.cef-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #fed312;
    border-radius: 50%;
    animation: cefSpin 0.7s linear infinite;
}
@keyframes cefSpin { to { transform: rotate(360deg); } }
