/* CSS for PartnAIR Search Fom */

/* flatsome override */
.cf7mls_next.action-button img {
    /* Note: display: none does not work as cf7mls uses !important on display: inline-block */
    /* display: none !important; /* get rid of loading spinner */
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    visibility: hidden;
    position: absolute;
    /* break it out with position absolute and change color (easiest way) with:
    filter: invert(32%) sepia(98%) saturate(1200%) hue-rotate(188deg) brightness(95%) contrast(101%);
    */
}

/* tool tip for invalid input */
.wpcf7-not-valid-tip {
    margin-top: 10px !important; /* !important to overwrite flatsome theme */
}

.wpcf7-form-control-wrap input, .wpcf7-form-control-wrap select {
    margin-bottom: 0;
}
.cf7mls_next.button.primary, .cf7mls_back.button.primary {
    line-height: 1em;
}

fieldset.cf7mls_current_fs {
    min-width: 0;
    width: 100%;
}

.cf-various-rows {
    display: flex;
    flex-flow: column;
    align-items: center;
    text-align: center;
}

.cf7mls_bar_style_navigation_horizontal_round.cf7mls_bar_style_text_vertical {
    margin-bottom: 109px;
 }

.cf7mls_bar_style_navigation_horizontal_round.cf7mls_bar_style_text_vertical li::after,
.cf7mls_bar_style_navigation_horizontal_round.cf7mls_bar_style_text_vertical li::before {
    background: none;
}

.cf7mls_bar_style_navigation_horizontal_round.cf7mls_bar_style_text_vertical li::after {
    margin-left: 22px;
    width: calc(100% - 38px);
    height: 2px;
    top: 19px;
    background: #0069B488;
    font-weight: 600;
}

.cf7mls_bar_style_navigation_horizontal_round.cf7mls_bar_style_text_vertical li.active::after {
    background: #0069B4;
}

.cf7_mls_count_step {
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    width: 38px;
    height: 38px;
    line-height: 32px;
}

.cf7_mls_steps_item {
    color: var(--primary-color);
}

/* titles in progress bar */
.cf7mls_progress_bar {
    font-size: 26px;
    color: var(--primary-color);
    font-size: 26px;
}

.cf7mls_progress_bar .cf7_mls_count_step {
    background: none;
    color: var(--primary-color);
    opacity: 0.5;
    display: block !important;
}

/* suppress check box circle and stick with numbers */
.cf7_mls_check {
    display: none !important;
}

.cf7mls_progress_bar li .cf7_mls_count_step {
    color: var(--primary-color);
    opacity: 0.5;
    font-size: 23px;
}

.cf7mls_progress_bar li.active .cf7_mls_count_step {
    color: var(--primary-color);
    opacity: 1.0;
}

.cf7mls_progress_bar li .cf7mls_progress_bar_title {
    margin-bottom: 0;
}

/* text underneath step counter */
.cf7mls_progress_bar .cf7_mls_steps_item_content p {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.5;
}

.cf7mls_progress_bar li.active .cf7_mls_steps_item_content p {
    opacity: 1.0;
}

/* text in step circle */
li.active .cf7_mls_steps_item_icon span.cf7_mls_count_step {
    opacity: 1.0;
}

li.active:not(.current) .cf7_mls_steps_item_icon span.cf7_mls_count_step {
    background: var(--primary-color);
    color: #FFF;
}

.wpcf7 li.active::before {
    background: none !important;
    color: var(--primary-color);
}

.wpcf7-spinner {
    display: none; /* hide the randomly placed spinner */
}

/* overwrite paragraphs in Contact Form 7 */
.wpcf7 p {
    color: #000;
    width: 100%;
}

/* overwrite headers in Contact Form 7 */
.wpcf7 h2 {
    /* color: #000; */
    font-size: 1.5em;
    margin-bottom: 27px;
}

/* Page 2 - Contact form */
.cf-col-block .cf7-textinput-label p {
    text-align: left;
    font-weight: 700;
    margin-bottom: 9px;
}
/* end of page 2, contact form */

/* Checkbox labels */
.wpcf7 label {
    font-size: 1.0em;
    color: #000;
    font-weight: normal;
    text-align: left;
}

.wpcf7-form-control.wpcf7-checkbox label {
    margin-left: 35px;
}

.cf7mls_number_step_wrap .cf7mls_step_current, .cf7mls_number {
    font-size: 1.5em !important;
    font-weight: 700;
    color: var(--primary-color) !important;
}

/* Container layout */
.radio-toggle-group {
    display: flex;
    gap: 60px;
    justify-content: center;
    text-align: center;
    text-transform: uppercase;
    font-size: 2rem;
    width: 100%;
}

/* parent container of checkbox. Make it wide engouh for max width */
.radio-toggle-group p {
    width: 100%;
    max-width: 200px;
    display: flex;
    justify-content: center;
}

.radio-toggle-group .icon-card span, .radio-toggle-group .text-card span {
    font-size: 25px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
}

.radio-toggle-group .icon-card span {
    padding-top: 8px;
}

.radio-toggle-group .text-card span {
    line-height: 1.2em;
}

.radio-toggle-group .wpcf7-list-item {
    display: none;
}

/* Hide default radio input dots */
.radio-toggle-group input[type="radio"] {
    display: none !important;
}

/* Style the clickable label container */
.radio-toggle-group label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 200px;
    max-height: 200px;
    padding: 15px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    text-align: center;
    width:100%;
    height: 100%;
    aspect-ratio: 1/1;
}

/* Unselected icon state (grayscale / dimmed) */
.radio-toggle-group label img,
.radio-toggle-group label svg {
    width: 80%;
    max-width: 100px;
    transition: all 0.25s ease-in-out;
}

/* Hover state */
.radio-toggle-group label:hover {
    border-color: var(--primary-color);
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);    /* ~10% opacity */
}

/* SELECTED STATE: Highlight border & restore icon color */
.radio-toggle-group input[type="radio"]:checked + .wpcf7-list-item-label,
.radio-toggle-group label:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);    /* ~10% opacity */
    border: 3px solid var(--primary-color);
}

.radio-toggle-group label:has(input[type="radio"]:checked) img,
.radio-toggle-group label:has(input[type="radio"]:checked) svg {
    filter: grayscale(0%); /* Full color */
    opacity: 1;
    transform: scale(1.05); /* Slight pop effect */
}

.radio-toggle-group .wpcf7-list-item-label {
    visibility: hidden;
}

/* Unselected image style */
.radio-toggle-group .wpcf7-list-item-label img {
    width: 48px;
    height: 48px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.25s ease-in-out;
}

/* Active/Checked image style */
.radio-toggle-group label:has(input[type="radio"]:checked) .wpcf7-list-item-label img {
    filter: grayscale(0%);
    opacity: 1;
}

.slider-group {
    margin: 20px 0;
    width: 100%;
    display: flex;
    align-items: center;
    flex-flow: column;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 0 4px;
}

.slider-wrapper p {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Flex layout to push left text to far-left and right text to far-right */
.slider-labels {
    display: flex;
    justify-content: space-between;
    width: calc(100% - 55px); /* Matches track width by offsetting counter box width + gap */
    margin: 0;
    font-size: 0.85rem;
    color: #666666;
    font-weight: 700;
    text-transform: uppercase;
	justify-content: center;
}
.slider-labels p {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

/* Style the output counter box */
#slider-value {
    display: block;
    width: max-content;
    font-weight: bold;
    font-size: 25px;
    color: #0073aa;
    text-transform: uppercase;
}

/* Base slider input styling */
.slider-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    --percentage: 50%; /* fallback value */
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) var(--percentage), #e0e0e0 var(--percentage), #e0e0e0 100%);
    border-radius: 5px;
    outline: none;
    margin-bottom: 0;
}

/* Slider Track Handle (Thumb) - Webkit (Chrome/Safari/Edge) */
.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.15s ease;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Slider Track Handle (Thumb) - Firefox */
.slider-group input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #FFF;
    background: #0069B4 0% 0% no-repeat padding-box;
    box-shadow: 0px 3px 6px #00000029;
}

.cf-checkbox-wrapper .wpcf7-form-control-wrap {
    max-width: 800px;
    text-align: left;
}

.cf-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    left: 0;
    margin: 5px 0 0 0;
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    outline: none;
    display: inline-block;
    vertical-align: middle;
}

.cf-checkbox-wrapper input[type="checkbox"]:checked {
    background-color: var(--primary-color);
}

.cf-checkbox-wrapper input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 6px;
    width: 8px;
    height: 14px;
    border: solid #ffffff; /* Color of the checkmark */
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.cf-checkbox-wrapper span[data-name="datenschutz"] {
    position: absolute;
}

.cf-checkbox-wrapper span[data-name="datenschutz"] span.wpcf7-form-control {
    width: 0; /* overwrite checkbox size so it's in line with checkboxes in 'what's important' box */
}

.cf-checkbox-wrapper span[data-name="datenschutz"] ~label {
    margin-left: 13px;
    text-align: left;
}

.acceptance-label-wrapper {
    display: flex;
    margin-left: 35px;
}

.contact-form-flex {
    display: flex;
    max-width: 800px;
    width: 100%;
}

.contact-form-flex input[type="checkbox"] {
    left: -35px;
    top: 0;
}

.wpcf7 .google-captcha-text p {
    font-size: 12px;
    max-width: 800px;
    text-align: left;
}

/* add some space between the blocks */
.cf-col-block {
    margin-bottom: 42px;
}

.cf-col-block p {
    margin-bottom: 30px;
    padding: 0 2px;
}

/* Disable the Next button on Step 1 */
.cf7mls-btns {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 30px;
    font-size: 0.97rem; /* overwrites cf-wrapper-block */
}

.wpcf7 .cf7mls_next {
    opacity: 0.4 !important;
    pointer-events: none !important; /* Prevents clicks/taps */
    cursor: not-allowed !important;
    filter: grayscale(100%);
    transition: all 0.25s ease-in-out;
}

.cf7mls_next.action-button, .cf7mls_back.action-button {
    border: 2px solid var(--primary-color);
    padding: 10px 30px !important; /* !important to override cf7mls style */
}

.cf7mls-btns.cf7mls-btns-last-step {
    display: flex;
    justify-content: flex-start;
}

.cf7mls-btns.cf7mls-btns-last-step .cf7mls_back.action-button {
    left: 50%;
    transform: translateX(-115%);
    margin: 0;
}

#partnair-submit-button {
    display: flex;
    justify-content: center;
    transform: translateY(100%);
}
#partnair-submit-button.processing::before {
    display: none;
    visibility: hidden;
}

#partnair-submit-button p {
    font-size: 0.97em; /* reset .wpcf7 p font-size */
    position: relative;
    display: inline-block;
    margin: 0; /* Clear CF7 default paragraph margins */
    width: 250px;
    left: 0;
    transform: translateX(50%);
}

#partnair-submit-button p::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 25px;
  height: 15px;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="25" height="15" viewBox="0 0 27.59 13.364"%3E%3Cg id="right-arrow" transform="translate(0 -132)"%3E%3Cg id="Gruppe_23" data-name="Gruppe 23" transform="translate(0 132)"%3E%3Cpath id="Pfad_69" data-name="Pfad 69" d="M27.274,137.919h0l-5.631-5.6a1.078,1.078,0,0,0-1.521,1.528L23.9,137.6H1.078a1.078,1.078,0,0,0,0,2.155H23.9l-3.781,3.763a1.078,1.078,0,0,0,1.521,1.528l5.631-5.6h0A1.079,1.079,0,0,0,27.274,137.919Z" transform="translate(0 -132)" fill="%23ffffff"%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
  color: var(--primary-color);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  z-index: 10; /* BRINGS ARROW IN FRONT OF INPUT BACKGROUND */
  pointer-events: none;
}

#partnair-submit-button p:hover::before {
    color: #FFF;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="25" height="15" viewBox="0 0 27.59 13.364"%3E%3Cg id="right-arrow" transform="translate(0 -132)"%3E%3Cg id="Gruppe_23" data-name="Gruppe 23" transform="translate(0 132)"%3E%3Cpath id="Pfad_69" data-name="Pfad 69" d="M27.274,137.919h0l-5.631-5.6a1.078,1.078,0,0,0-1.521,1.528L23.9,137.6H1.078a1.078,1.078,0,0,0,0,2.155H23.9l-3.781,3.763a1.078,1.078,0,0,0,1.521,1.528l5.631-5.6h0A1.079,1.079,0,0,0,27.274,137.919Z" transform="translate(0 -132)" fill="%230069b4"%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    animation: bounce-right-submit-botton 0.7s ease 1;
}

@keyframes bounce-right-submit-botton {
  0% {
    transform: translateY(-50%) translateX(0px);
  }
  50% {
    transform: translateY(-50%) translateX(5px);
  }
  100% {
    transform: translateY(-50%) translateX(0px);
  }
}

#partnair-submit-button input[type="submit"] {
  position: relative;
  z-index: 1;
  padding-left: 50px !important; /* Make room for the arrow on the left */
  left: 0;
  margin: 0;
  line-height: 1.0em;
}

#partnair-submit-button input[type="submit"]:hover {
    background-color: #FFF;
    color: var(--primary-color);
    /* flatsome overwrites */
    background-color: #ffffff !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
}

form.cf7mls input.wpcf7-form-control.wpcf7-submit {
    font-size: 0.97em; /* in line with back button style */
    font-weight: 700;
    max-width: 270px;
    position: absolute;
    left: 55%;
    padding: 13px 29px !important;
    margin-top: 16px;
    border: 2px solid var(--primary-color);
    line-height: 1em;
    width: 250px;
}

/* If CF7 MLS wraps the button or uses its icon class */
/* overwrites to get rid of the -> at submit button */
form.cf7mls input.wpcf7-form-control.wpcf7-submit::-webkit-input-placeholder,
form.cf7mls .cf7mls_next_btn i,
form.cf7mls .cf7mls_back_btn i {
    display: none !important;
}

/* Enable the button ONLY when "Datenschutz" checkbox is checked */
.wpcf7:has(input[name="datenschutz"]:checked) .cf7mls_next {
    opacity: 1 !important;
    pointer-events: auto !important; /* Restores clicks */
    cursor: pointer !important;
    filter: grayscale(0%);
}

.cf-wrapper-block {
    font-size: 20px;
    padding: 0 4px;
}

.cf-col-block p.messageHeader {
    text-align: left;
    margin-top: 54px;
    margin-bottom: 9px;
}

#partnair-summary-table {
    font-size: 20px;
    display: flex;
    flex-flow:column;
    width:100%;
    text-align: left;
}

#partnair-summary-table p {
    margin:0;
}

#partnair-summary-table>div {
    margin-top: 54px;
    display: flex;
}

#partnair-summary-table>div>div:first-child {
    font-weight: bold;
    min-width: 350px;
}

.partnair-table-listing {
    display: flex;
    flex-wrap: wrap;
}

.partnair-table-listing p {
    width: 100%;
    position: relative;
    margin-bottom: 8px;
}

.partnair-table-listing p:not(.hasContent) {
    display: none;
}

.partnair-message-textfield {
    width: 100%;
    height: 220px;
    resize: none;
}

.wrapper-step-2 .cf-various-cols {
    gap: 18px;
}

/* hide CF 7 message "Vielen Dank für deine Nachricht. Sie wurde gesendet." */
.wpcf7 form.sent .wpcf7-response-output {
    /* display: none !important; */
	/* should only be suppressed at PartnAIR search */
}

@media screen and (max-width: 549px) {
    .wpcf7 p {
        font-size: 0.8em;
    }

    .wpcf7 label {
        width: 85%;
    }
	
    .wpcf7 h2 {
        font-size: 0.9em;
        margin-bottom: 27px;
    }

    .cf7mls-btns.cf7mls-btns-last-step .cf7mls_back.action-button {
        transform: translateX(0);
    }

    #partnair-submit-button {
        transform: translateY(-25px);
    }

    #partnair-submit-button p {
        transform: translateX(0);
    }

    .cf-checkbox-wrapper input[type="checkbox"] {
        margin: 5px 0 0 0;
    }

    .wrapper-step-2 .cf-various-cols {
        gap: 0;
    }

    .cf-various-cols {
        margin-top: 0;
    }

    .cf7mls-btns {
        gap: 20px;
    }

    .cf7mls-btns.cf7mls-btns-last-step .cf7mls_back.action-button {
        transform: translateX(-50%);
    }

    form.cf7mls input.wpcf7-form-control.wpcf7-submit {
        margin-top: -50px;
        left: 50%;
    }

    #partnair-summary-table>div {
        flex-direction: column;
        margin-top: 27px;
    }

    .partnair-table-listing div {
        margin-left: 20px;
        padding-left: 15px;
        font-size: 0.8em;
    }

    .radio-toggle-group {
        gap: 5%;
    }

    .radio-toggle-group p {
        width: 44%;
        height: 44%;
    }

    .radio-toggle-group label {
        width: 150px;
        height: 150px;
        font-size: 0.8em;
    }

    .radio-toggle-group .icon-card span, .radio-toggle-group .text-card span {
        font-size: 0.8em;
    }
}

@media screen and (min-width: 550px) and (max-width: 849px) {
    .radio-toggle-group .icon-card span, .radio-toggle-group .text-card span {
        font-size: 0.7em;
    }

    form.cf7mls input.wpcf7-form-control.wpcf7-submit {
        margin-top: 16px;
        left: 50%;
    }
}

@media screen and (max-width: 849px) {
    .wpcf7 p {
        font-size: 0.9em;
    }

    .cf-col-block {
        margin-top: 36px;
    }

    .cf-col-block p {
        margin-bottom: 0;
    }

    .cf7mls_number_step_wrap {
        margin-top: 0;
    }

    .cf-various-cols {
        margin-top: 18px;
    }

    #partnair-submit-button input[type="submit"] {
          line-height: 1.0345em;
    }

    #partnair-submit-button p {
        font-size: 1em;
        margin-top: 0;
    }

    .messageHeader {
        margin-top: 54px;
    }

    #partnair-summary-table>div>div:first-child {
        min-width: 275px;
    }
}

@media screen and (max-width: 400px) {
    .radio-toggle-group label {
        width: 120px;
        height: 120px;
    }
}