/* REFER A FRIEND FORM
   Fields, .delete-btn and .grey-heading are inherited from lead-form.css so the
   look matches the other forms. Only the repeater layout, the add button and the
   success state are defined here. */

/* Referral row — each set on a light-grey card.
   align-items: flex-start keeps the input tops aligned (so a validation error
   under one field doesn't shift the others). The delete button is pushed down
   past the label height so its icon lines up with the inputs (see below). */
.referral-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background-color: #f6f6f6;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 15px;
}
.referral-form .form-heading {
    font-size: 24px;
    padding-bottom: 5px;
    border-bottom: 2px solid #17b3c4;
}
.referral-item > .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Inputs stay white so they stand out against the grey card */
.referral-item .form-group input {
    background-color: #fff;
}

/* Dustbin aligned to the vertical centre of the input fields (desktop).
   margin-top clears the field label (label height + its margin + the input's
   3px margin-top), so the 40px button overlaps the input and centres the icon. */
.referral-item .delete-btn {
    top: 0;
    height: 40px;
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
	background: #f6f6f6;
}

/* Disabled remove control (only one referral entry left) */
.referral-item .delete-btn:disabled {
    cursor: default;
    opacity: 0.35;
}

/* The trash SVG is an external image, so its colour can't be set directly.
   Paint it via a CSS mask instead — background-color becomes the icon colour. */
.referral-item .dustbin-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-color: #d81671;
    -webkit-mask: url("/wp-content/uploads/2024/08/Icon-feather-trash-2.svg") no-repeat center / contain;
            mask: url("/wp-content/uploads/2024/08/Icon-feather-trash-2.svg") no-repeat center / contain;
}

/* Add button — same style as #add-family-member */
#add-referral {
    display: block;
    background: #fff;
    font-size: 16px;
    margin: 20px auto;
    font-weight: 700;
    font-family: 'Lato';
    border-radius: 4px;
    padding: 10px 20px;
    border: 2px solid #ccc;
    cursor: pointer;
}

.referral-submit-btn {
    width: 100%;
}

/* --- Success state --- */
.referral-success {
    text-align: center;
    padding: 20px 10px 10px;
}

.referral-success-check {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border: 3px solid #3fb950;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.referral-success-heading {
    font-size: 22px;
    font-weight: bold;
    color: #1b2a3a;
    margin-bottom: 14px;
}

.referral-success-text {
    font-size: 15px;
    color: #6b7c8c;
    line-height: 1.5;
    max-width: 380px;
    margin: 0 auto 24px;
}

@media (max-width: 640px) {
    .referral-item {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    .referral-item > .form-group {
        margin-bottom: 12px;
    }

    /* On mobile the bare icon reads as ambiguous, so present it as a clearly
       labelled "Remove" button anchored to the bottom of this set's card. */
    .referral-item .delete-btn {
        position: static;
        top: 0;
        height: auto;
        align-self: center;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 4px;
        padding: 6px 12px;
        background: #fff;
        border: 1px solid #e4e9f0;
		color: #d81671;
        font-family: 'Lato';
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;
    }

    .referral-item .delete-btn .dustbin-icon {
        width: 16px;
        height: 16px;
    }

    .referral-item .delete-btn::after {
        content: "Remove";
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px){
	.review-form-wrapper .vc_column-inner{	
	    display: flex;
	    justify-content: center;
	}
	.review-form-wrapper .vc_col-sm-6{	
		width: 100%;
	}
}

@media only screen and (min-width: 1024px){
	.review-form-wrapper .vc_column-inner{	
		padding-left:20px;
	}
}