/* ---------- General Form Styles ---------- */
.ca-mortgage-form {
    max-width: 700px;
    margin: 0 auto;
    font-family: 'Manrope', sans-serif;
    color: #41555C;
}

.ca-mortgage-form fieldset {
    border: none;
    padding: 20px 0;
    display: none;
}

.ca-mortgage-form fieldset.active {
    display: block;
}

.ca-mortgage-form label {
    display: block;
    margin-bottom: 15px;
    font-size: 14px;
    cursor: pointer;
}

.ca-mortgage-form input,
.ca-mortgage-form select,
.ca-mortgage-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.ca-mortgage-form textarea {
    min-height: 80px;
}

/* ---------- Buttons ---------- */
.ca-mortgage-form button {
    background: #77B09D;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    margin: 10px 5px 0 0;
    transition: background 0.2s ease;
}

.ca-mortgage-form button:hover {
    background: #5c8f7c;
}

/* ---------- Progress Bar ---------- */
.ca-form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    text-align: center;
}

.ca-form-progress::before {
    content: "";
    position: absolute;
    top: 20px; /* align with circles */
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    z-index: 1;
}

.ca-form-progress .step {
    flex: 1;
    position: relative;
    z-index: 2;
}

.ca-form-progress .circle {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 6px;
    transition: background 0.3s ease, color 0.3s ease;
}

.ca-form-progress .label {
    display: block;
    font-size: 12px;
    color: #555;
    max-width: 90px;
    margin: 0 auto;
}

.ca-form-progress .step.current .circle {
    background: #77B09D;
    color: #fff;
}

.ca-form-progress .step.completed .circle {
    background: #41555C;
    color: #fff;
}


/* ---------- Error Messages ---------- */
.error-msg {
    color: #FF6B6B;
    font-size: 13px;
    margin-top: 4px;
}

/* ---------- Success & Error Messages ---------- */
#ca-form-response {
    margin-top: 20px;
    font-size: 15px;
}

#ca-form-response .ca-success {
    padding: 15px;
    border-radius: 6px;
    background: #e9f7f2;
    border: 1px solid #77B09D;
    color: #2c3e3a;
}

#ca-form-response .ca-error {
    padding: 15px;
    border-radius: 6px;
    background: #fdecea;
    border: 1px solid #FF6B6B;
    color: #8a1f1f;
}

/* ---------- Conditional Sections ---------- */
#joint-applicant-fields {
    display: none;
    padding: 15px;
    border: 1px dashed #ccc;
    margin-bottom: 20px;
    border-radius: 6px;
}

/* ---------- Radios & Checkboxes as Buttons ---------- */
.ca-option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.ca-option {
    flex: 1 1 calc(50% - 10px);
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 14px;
}

.ca-option input {
    display: none;
}

.ca-option:hover {
    background: #eaeaea;
    border-color: #bbb;
}

.ca-option input:checked + span {
    background: #77B09D;
    color: #fff;
    border-radius: 6px;
    padding: 12px;
    display: block;
}
