/* ── Cotactic Multi-Step Form ─────────────────────────────── */
.cotactic-form-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

/* Progress / step label / step title — hidden */
.ctf-progress-bar,
.ctf-step-label,
.ctf-step-title { display: none !important; }

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

/* ── Step transition animations ─────────────────────────────── */
@keyframes ctf-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.ctf-step.ctf-anim { animation: ctf-fade-in 0.35s ease both; }

/* ── Question card ──────────────────────────────────────────── */
.ctf-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;
}

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

/* ── Label (acts as placeholder when empty) ─────────────────── */
.ctf-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, font-weight 0.15s, margin-bottom 0.15s;
}
.ctf-label .ctf-required { color: #e53935; margin-left: 2px; }

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

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

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

/* Chevron */
.ctf-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 (Textarea / Input) ────────────────────────────────── */
.ctf-question.ctf-text { cursor: text; }

.ctf-question textarea,
.ctf-question input[type="tel"],
.ctf-question input[type="email"] {
    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;
}

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

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

/* ── PDPA Consent ───────────────────────────────────────────── */
.ctf-pdpa-consent {
    margin-bottom: 12px;
}
.ctf-pdpa-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    line-height: 1.4;
}
.ctf-pdpa-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #fed312;
}
.ctf-pdpa-label .ctf-required { color: #e53935; margin-left: 2px; }
.ctf-pdpa-link {
    display: inline-block;
    margin-top: 4px;
    margin-left: 26px;
    font-size: 12px;
    color: #fed312;
    text-decoration: underline !important;
}
.ctf-pdpa-link:hover { color: #ffb010; }
.ctf-pdpa-consent .ctf-error-msg {
    margin-top: 6px;
    margin-left: 26px;
}

/* ── Navigation ─────────────────────────────────────────────── */
.ctf-nav {
    display: flex;
    align-items: center;
    margin-top: 12px;
    gap: 10px;
}

.ctf-btn {
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 800;
    padding: 14px 20px;
    font-family: inherit;
    line-height: 1;
    background: linear-gradient(90deg, rgba(254,211,18,1) 0%, rgba(255,176,16,1) 100%);
    color: #000000;
    transition: background 0.2s;
}
.ctf-btn:hover {
    background: linear-gradient(90deg, rgba(255,176,16,1) 0%, rgba(254,211,18,1) 100%);
    animation: ctfPulse 1.5s ease infinite;
}

@keyframes ctfPulse {
    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); }
}

.ctf-btn-prev {
    padding: 14px 18px;
    flex-shrink: 0;
    height: 48px;
    display: flex;
}

.ctf-btn-next,
.ctf-btn-submit {
    flex: 1;
    text-align: center;
    height: 48px;
}

/* ── Step 1: button absolute on top-right of input field ─────── */
.ctf-is-step1 #cotacticMultiStepForm,
.ctf-is-step1 #cotacticMultiStepFormRemove,
.ctf-is-step1 #cotacticMultiStepFormEn,
.ctf-is-step1 #cotacticMultiStepFormRemoveEn {
    position: relative;
    display: block;
}
.ctf-is-step1 #ctfStepsContainer,
.ctf-is-step1 #ctfStepsContainerRemove,
.ctf-is-step1 #ctfEnStepsContainer,
.ctf-is-step1 #ctfStepsContainerRemoveEn {
    display: block;
    width: 100%;
}
.ctf-is-step1 .ctf-step.active {
    display: block;
}
.ctf-is-step1 .ctf-question {
    @media(min-width:769px) {
        padding-right: 200px;
    }
    height: auto;
    min-height: 50px;
    margin-bottom: 0;
}
.ctf-is-step1 .ctf-chevron {
    @media(min-width:769px) {
        right: 180px;
    }
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg width='16' 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;
}
#cotactic-form-en-wrapper.ctf-is-step1 .ctf-chevron,
#cotactic-formremove-en-wrapper.ctf-is-step1 .ctf-chevron {
    @media(min-width:769px) {
        right: 250px;
    }
}
.ctf-is-step1 .ctf-question.has-value .ctf-label {
    display: none;
}
.ctf-is-step1 .ctf-val-display {
    font-size: 16px;
    color: #041936;
    font-weight: 400;
}
.ctf-is-step1 .ctf-nav {
    @media(min-width:769px) {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        margin: 0;
        padding: 0;
        gap: 0;
        display: flex;
        align-items: stretch;
        z-index: 3;
    }
}
.ctf-is-step1 #ctfNext,
.ctf-is-step1 #ctfNextRemove,
.ctf-is-step1 #ctfEnNext,
.ctf-is-step1 #ctfNextRemoveEn {
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    height: 100%;
    box-sizing: border-box;
    border-radius: px;
}

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

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