/* Hidden by default — revealed by a click on a .cdc-show-trigger element
   (e.g. a budi_button with that custom class) */
.cdc-wrapper {
    display: none;
}

.cdc-wrapper.cdc-visible {
    display: block;
}

.cdc-wrapper {
    --cdc-red: var(--color-main);
    --cdc-red-soft: #FF4540;
    --cdc-panel-bg: #F6F6F6;
    --cdc-border: rgba(23, 23, 23, 0.15);
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}

/* ---------- Header ---------- */

.cdc-header {
    margin-bottom: 50px;
    text-align: center;
}

.cdc-header__sub-title {
    color: var(--cdc-red);
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.cdc-header__title {
    color: var(--color-sub);
    margin: 0 auto;
    max-width: 750px;
}

.cdc-header__description {
    color: var(--color-sub);
    font-size: 18px;
    margin: 15px auto 0;
    max-width: 750px;
}

.cdc-header__description p:last-child {
    margin-bottom: 0;
}

/* ---------- Panel ---------- */

.cdc-panel {
    background: var(--cdc-panel-bg);
    border-radius: 24px;
    padding: 50px;
}

/* ---------- Progress bar ---------- */

.cdc-progress {
    margin-bottom: 40px;
    padding-top: 26px;
}

.cdc-progress__track {
    background: #E4E4E4;
    border-radius: 100px;
    height: 15px;
    overflow: visible;
    width: 100%;
}

.cdc-progress__fill {
    background: linear-gradient(270deg, var(--cdc-red-soft) 0%, var(--cdc-red) 100%);
    border-radius: 999px;
    display: block;
    height: 100%;
    min-width: 40px;
    position: relative;
    transition: width 0.3s ease;
    width: 16%;
}

.cdc-progress__label {
    color: var(--color-sub);
    font-size: 20px;
    position: absolute;
    right: 0;
    top: -30px;
}

/* ---------- Step panels ---------- */

.cdc-step {
    display: none;
}

.cdc-step.is-active {
    display: block;
}

.cdc-intro {
    color: var(--color-sub);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 50px;
}

/* ---------- Questions ---------- */

.cdc-step--questions {
    counter-reset: cdc-question;
}

.cdc-question {
    margin-bottom: 30px;
}

.cdc-question__title {
    align-items: center;
    color: var(--color-sub);
    display: flex;
    font-size: 22px;
    font-weight: 600;
    gap: 10px;
    line-height: 1.3;
    margin: 0 0 22px;
}

.cdc-question__title::before {
    align-items: center;
    background: linear-gradient(270deg, var(--cdc-red-soft) 0%, var(--cdc-red) 100%);
    border-radius: 50%;
    color: #ffffff;
    content: counter(cdc-question);
    counter-increment: cdc-question;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 600;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.cdc-question.cdc-error .cdc-question__title {
    color: var(--cdc-red);
}

/* ---------- Choices ---------- */

.cdc-choices {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(3, 1fr);
}

.cdc-choice {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--cdc-border);
    border-radius: 14px;
    color: var(--color-sub);
    cursor: pointer;
    display: flex;
    font-size: 17px;
    justify-content: center;
    margin: 0;
    min-height: 80px;
    padding: 12px 20px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cdc-choice:hover {
    border-color: var(--cdc-red);
}

.cdc-choice.is-active {
    background: linear-gradient(270deg, var(--cdc-red-soft) 0%, var(--cdc-red) 100%);
    border-color: var(--cdc-red);
    color: #ffffff;
    font-weight: 600;
}

.cdc-question.cdc-error .cdc-choice {
    border-color: var(--cdc-red);
}

.cdc-choice--icon {
    gap: 14px;
}

.cdc-choice--icon img {
    flex: 0 0 auto;
    height: 42px;
    width: 42px;
}

.cdc-choice.is-active img {
    filter: brightness(0) invert(1);
}

/* Hide the native radio — the label itself acts as the button */
.cdc-choice input[type="radio"] {
    height: 1px;
    margin: 0;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.cdc-choice .wpcf7-form-control-wrap,
.cdc-choice .wpcf7-radio,
.cdc-choice .wpcf7-list-item {
    display: inline;
    margin: 0;
}

.cdc-choice .wpcf7-list-item-label {
    pointer-events: none;
}

/* ---------- Result step (step 2) ---------- */

.cdc-result-head {
    margin: 0 auto 40px;
    max-width: 850px;
    text-align: center;
}

.cdc-result-head__icon {
    height: 65px;
    margin-bottom: 15px;
    width: 65px;
}

.cdc-result-head__highlight {
    color: var(--cdc-red);
    font-size: 26px;
    font-weight: 600;
    margin: 0;
}

.cdc-result-head__title {
    color: var(--color-sub);
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 30px;
}

.cdc-result-head__text {
    color: var(--color-sub);
    font-size: 18px;
    margin: 0;
}

/* ---------- Contact fields ---------- */

.cdc-fields {
    display: grid;
    gap: 15px 30px;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 40px;
}

.cdc-field label {
    color: var(--color-sub);
    display: block;
    font-size: 17px;
    margin-bottom: 8px;
}

.cdc-field .wpcf7-form-control-wrap {
    display: block;
}

.cdc-wrapper .cdc-field input[type="text"],
.cdc-wrapper .cdc-field input[type="email"],
.cdc-wrapper .cdc-field input[type="tel"] {
    background: #ffffff;
    border: 1px solid var(--cdc-border) !important;
    border-radius: 10px;
    color: var(--color-sub);
    font-size: 17px;
    height: 56px;
    padding: 10px 18px;
    width: 100%;
}

.cdc-wrapper .cdc-field input:focus {
    border-color: var(--cdc-red);
    outline: none;
}

.cdc-field .wpcf7-not-valid {
    border-color: var(--cdc-red) !important;
}

.cdc-field .wpcf7-not-valid-tip {
    color: var(--cdc-red);
    font-size: 14px;
    margin-top: 5px;
}

/* ---------- Buttons ---------- */

.cdc-actions {
    display: flex;
}

.cdc-actions--end {
    justify-content: flex-end;
}

.cdc-actions--center {
    justify-content: center;
}

/* Parent theme styles every button aggressively — see CLAUDE.md */
.cdc-wrapper .cdc-button,
.cdc-wrapper .wpcf7-submit {
    background: linear-gradient(270deg, var(--cdc-red-soft) 0%, var(--cdc-red) 100%) !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit !important;
    font-size: 18px !important;
    font-weight: 600;
    padding: 15px 40px !important;
    transition: opacity 0.2s ease;
}

.cdc-wrapper .cdc-button:hover,
.cdc-wrapper .cdc-button:focus,
.cdc-wrapper .wpcf7-submit:hover,
.cdc-wrapper .wpcf7-submit:focus {
    color: #ffffff !important;
    opacity: 0.9;
}

.cdc-submit-wrap {
    align-items: center;
    flex-direction: column;
    gap: 15px;
    position: relative;
}

.cdc-submit-wrap.is-submitting::after {
    animation: cdc-spin 0.8s linear infinite;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    content: "";
    height: 18px;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    pointer-events: none;
    position: absolute;
    top: 50%;
    width: 18px;
}

.cdc-submit-wrap.is-submitting .wpcf7-submit {
    color: transparent !important;
    cursor: wait;
    pointer-events: none;
}

@keyframes cdc-spin {
    to {
        transform: rotate(360deg);
    }
}

.cdc-wrapper .cdc-field.cdc-error input[type="text"],
.cdc-wrapper .cdc-field.cdc-error input[type="email"],
.cdc-wrapper .cdc-field.cdc-error input[type="tel"] {
    border-color: var(--cdc-red) !important;
}

.cdc-wrapper .wpcf7-spinner {
    display: none;
}

.cdc-wrapper .wpcf7-response-output {
    border-color: var(--cdc-red);
    border-radius: 10px;
    margin: 25px 0 0;
    padding: 15px 20px;
    text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .cdc-panel {
        padding: 35px 25px;
    }

    .cdc-choices {
        grid-template-columns: repeat(2, 1fr);
    }

    .cdc-header {
        margin-bottom: 30px;
    }
}

@media (max-width: 600px) {
    .cdc-panel {
        border-radius: 16px;
        padding: 30px 18px;
    }

    .cdc-intro {
        font-size: 20px;
    }

    .cdc-question__title {
        font-size: 18px;
    }

    .cdc-choices,
    .cdc-fields {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cdc-choice {
        min-height: 56px;
    }

    .cdc-actions--end {
        justify-content: center;
    }

    .cdc-wrapper .cdc-button,
    .cdc-wrapper .wpcf7-submit {
        width: 100%;
        justify-content: center;
    }
}