/* Wrapper – transparenter Hintergrund */
.hpf-form input[type=number]::-webkit-inner-spin-button {
    opacity: 1
}

.hpf-form-wrapper {
    background-color: transparent;
    padding: 24px 0;
    color: #ffffff;
    max-width: 1000px;
    box-sizing: border-box;
    padding-bottom: 0;
    margin: auto;
}

/* Formular selbst */
.hpf-form {
    width: 100%;
    max-width: 700px;
    margin: auto;
}

.search-m2-label{
    position: absolute;
    right: 5px;
    color: #9098a9;
    top: 36.5%;
}
.search-m2-label-30{
  right: 40px;
}
@media(max-width: 455px){
    .search-m2-label-30{
  right: 10px;
}
}

/* Meldungen */
.hpf-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    color: black!important;
}

.hpf-message.hpf-success {
    background-color: rgba(0, 150, 80, 0.25);
    border: 1px solid rgba(0, 150, 80, 0.8);
}

.hpf-message.hpf-error {
    background-color: rgba(200, 60, 60, 0.25);
    border: 1px solid rgba(200, 60, 60, 0.8);
}

/* Reihen / Layout */
.hpf-row {
    margin-bottom: 18px;
}

.hpf-row-two {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

/* Name-Zeile (Anrede 1/5, Vorname 2/5, Nachname 2/5) */
.hpf-row-name {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.hpf-row-name .hpf-span-1-5 {
    width: calc(21% - 10px);
    min-width: 120px;
}

.hpf-row-name .hpf-span-2-5:not(.hpf-search-first-name) {
    width: calc(40.75% - 10px);
}
.hpf-search-first-name{
    width: calc(32.75% - 10px);
}
.hpf-row-contact, .hpf-row-ort, .hpf-row-street {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

/* Standard Feld */
.hpf-field {
    position: relative;
}

.hpf-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: rgba(25, 25, 25, .30);
}

/* Inputs / Textareas / Selects */
.hpf-field input,
.hpf-field select,
.hpf-field textarea {
    width: 100%;
    box-sizing: border-box;
    background-color: transparent;
    border-radius: 4px;
    border: 1px solid rgba(25,25,25, .15)!important;
    padding: 17px 18px;
    font-size: 15px;
    color: black!important;
    padding-left: 18px!important;
    outline: none;
    transition: background-color 0.2s ease, border-color 0.2s ease,
                box-shadow 0.2s ease, transform 0.12s ease;
}
.hpf-field select{
    padding: 13px 18px!important;
    background-image: linear-gradient(45deg, transparent 50%, #00663a 50%), linear-gradient(135deg, #00663a 50%, transparent 50%) !important;
    background-size: 5px 4px, 4px 4px;
    background-repeat: no-repeat;
    background-position: calc(100% - 12px), calc(100% - 8px);
    -webkit-appearance: none;
    appearance: none;
}
.hpf-field.has-value select{
    color: black !important;
}
.hpf-field:not(.has-value) select{
    color: rgba(25, 25, 25, .30) !important;
    font-weight: 450!important;
}

.hpf-dual-label{
    color: black;
    width: 100%;
    display: flex;
    gap: 20px;
    font-size: 15px;
    font-weight: 500;
}
.hpf-dual-label>span{
    width: 50%;
}
.hpf-single-label{
    color: black;
    width: 100%;
    font-size: 15px;
    font-weight: 500;
}
.hpf-row-4{
    row-gap: 5px;
}
.hpf-row-grundstueck{
    row-gap: 5px;
}
.hpf-row-grundstueck, .hpf-row-4{
    display: none;
}
.hpf-field-grundab, .hpf-field-grundbis, .hpf-field-bebaubar{
    width: calc(32.75% - 9px);
}
.hpf-field select:hover{
    cursor: pointer;
}
#hpf_expose_phone, #hpf_search_phone{    border-left-width: 0px !important; box-shadow: none!important; transform: none!important; border-top-left-radius: 0!important; border-bottom-left-radius: 0!important}
.hpf-form .hpf-field .hpf-country-select{    border-right-width: 0px!important; box-shadow: none!important; transform: none!important; border-top-right-radius: 0!important; border-bottom-right-radius: 0!important}
.hpf-field textarea {
    resize: vertical;
    min-height: 80px!important;
}
.hpf-detail-divider{
    height: 1px;
    width: 100%;
    background-color: #00663a;
    border-left: 30px solid white;
    border-right: 30px solid white;
}
.hpf-field-message:not(.is-focused) label{
    top: 24px!important;
}
.hpf-field input::placeholder,
.hpf-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* Floating Label Felder */
.hpf-field.hpf-floating label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    font-weight: 500;
    font-size: 15px;
    color: rgba(25, 25, 25, .30);
    pointer-events: none;
    transition: transform 0.18s ease, font-size 0.18s ease,
                top 0.18s ease, opacity 0.18s ease;
}

.hpf-field.hpf-floating .hpf-input {
        padding: 19px 17px 7px 10px!important;
}
.hpf-field .hpf-phone-wrapper{border: none!important; border: 0px!important; background: transparent!important;}
/* Zustand: Fokus oder Inhalt vorhanden */
.hpf-field.hpf-floating.is-focused label,
.hpf-field.hpf-floating.has-value label {
    top: 2px!important;
    transform: translateY(0);
    font-size: 11px;
    opacity: 0.9;
}

/* Hover / Focus */
.hpf-field input:focus,
.hpf-field select:focus,
.hpf-field textarea:focus {
    box-shadow: 0px 0px 2px rgba(25, 25, 25, .25);
    transition: box-shadow 0.2s ease;
    transform: translateY(0px);
}
.hpf-field input:hover,
.hpf-field select:hover,
.hpf-field textarea:hover {
    box-shadow: 0px 0px 2px rgba(25, 25, 25, .25);
    transition: box-shadow 0.2s ease;
    transform: translateY(0px);
}

/* Telefon + Länderauswahl */
.hpf-phone-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid #ffffff4a!important;
    background-color: #0b6940;
    border-radius: 0;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease,
                transform 0.12s ease;
}

.hpf-phone-wrapper:focus-within {
    box-shadow: 0px 0px 2px rgba(25, 25, 25, .25);
    transition: box-shadow 0.2s ease;
    border-radius: 4px;
    transform: translateY(0px);
}

.hpf-phone-wrapper .hpf-country-select {
    border: none;
    border-right: 1px solid #ffffff4a!important;
    padding: 13px 18px!important;
    font-size: 12px;
    background-color: transparent;
    color: black!important;
    outline: none;
    min-width: 70px;
    width: fit-content;
    cursor: pointer;
    padding-right: 0 !important;
    padding-left: 10px !important;
}
.hpf-phone-wrapper .hpf-floating{
    width: 100%;
}
.hpf-phone-wrapper .hpf-country-select option , .hpf-field-objekttyp option, .hpf-field-marketing option, .hpf-field-salutation option{
    color: #000000!important;
}

.hpf-phone-wrapper input {
    border: none;
    background: transparent;
    padding: 17px 18px;
    font-size: 16px;
    flex: 1 1 auto;
}

.hpf-field-email, .hpf-field-phone, .hpf-field-plz, .hpf-field-street, .hpf-field-hausnummer, .hpf-field-marketing{
    width: calc(50% - 9px);
}
.hpf-field-objekttyp, .hpf-field-preisbis, .hpf-field-ort, .hpf-field-umkreis{
     width: calc(50% - 10px);
}
.hpf-field-zimmerab, .hpf-field-zimmerbis, .hpf-field-spacefrom, .hpf-field-spaceto{
    width: calc(24.12% - 9px);
}
/* Consent */
.hpf-row-consent .hpf-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
}

.hpf-row-consent .hpf-consent input[type="checkbox"] {
    margin-top: 3px;
}

.hpf-row-consent .hpf-consent span {
    line-height: 1.4;
    color: black;
}
.hpf-row-consent .hpf-consent span a{
    color: black;
}
.hpf-row-consent .hpf-consent span a:hover{
    color: #00663a!important;
}

/* Button */
.hpf-submit {
    display: inline-block;
    padding: 14px 34px;
    width: 100%;
    border-radius: 4px;
    border: none;
    background-color: #00663a;
    color: white;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease,
                transform 0.12s ease, opacity 0.12s ease;
}
.submit-row{
    margin-bottom: 30px!important;
}

.hpf-submit:hover {
    background-color: #006d3e;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.hpf-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Button Loading */
.hpf-submit.hpf-loading {
    position: relative;
    opacity: 0.8;
    pointer-events: none;
}

.hpf-submit.hpf-loading::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0, 97, 56, 0.3);
    border-top-color: #00663a;
    transform: translateY(-50%);
    animation: hpf-spin 0.6s linear infinite;
}

@keyframes hpf-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Responsive */

@media (max-width: 640px) {
    .hpf-form-wrapper {
        padding: 16px 0;
        margin: 20px auto;
    }
}


/* Honeypot (unsichtbar) */
.hpf-hp-field {
    position: absolute;
    left: -99999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Step-Up Verifikation (Captcha) */
.hpf-row-verification {
    animation: hpf-fade-in 0.22s ease;
}

@keyframes hpf-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hpf-verify-box {
    border: 1px solid #ffffff4a;
    background-color: #ffffff0f;
    padding: 0px;
    border-radius: 0;
}

.hpf-verify-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: black
}

.hpf-verify-text {
    font-size: 13px;
    line-height: 1.45;
    color: black;
    margin-bottom: 14px;
}

.hpf-verify-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.hpf-captcha-img {
    width: 180px;
    height: 56px;
    object-fit: contain;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid #ffffff4a;
}
.hpf-captcha-input{
    max-width: 190px;
}
.hpf-captcha-refresh {
    width: 44px;
    height: 44px;
    border: 1px solid #ffffff4a;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    border-radius: 0;
    transition: transform 0.12s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.hpf-captcha-refresh:hover {
    background-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 12px rgba(0,0,0,0.18);
    transform: translateY(-1px);
}

.hpf-captcha-refresh:active {
    transform: translateY(0);
    box-shadow: none;
}

/*Mobile*/
@media(max-width: 767px){
    .hpf-row-name .hpf-span-2-5{
        width: calc(37.3% - 10px);
    }
    .hpf-row-name .hpf-span-1-5{
        width: calc(20% - 10px);
        min-width: 100px;
    }
    .hpf-row-name {
        flex-direction: row;
        flex-wrap: nowrap;
        column-gap: 10px;
    }
    .hpf-row-contact>div{
        width: 100%;
    }
    .hpf-row-two:has(.hpf-field-objekttyp), .hpf-row-two:has(.hpf-field-ort){
        column-gap: 10px;
    }
    .hpf-form-wrapper{
        padding-top: 0 !important;
        margin-top: 0!important; 
        padding-bottom: 0 !important;
        margin-bottom: 0!important; 
    }
    .hpf-row-4{
        column-gap: 10px;
    }
    .hpf-field-zimmerab, .hpf-field-zimmerbis, .hpf-field-spacefrom, .hpf-field-spaceto {
    width: calc(24.25% - 5px);
    }
    .hpf-dual-label{
        gap: 10px;
    }
    .hpf-row-grundstueck{
        column-gap: 10px;
    }
    .hpf-field-grundab, .hpf-field-grundbis, .hpf-field-bebaubar {
    width: calc(32.75% - 5px);
    }
}
@media(max-width: 352px){
    .hpf-field-zimmerab, .hpf-field-zimmerbis, .hpf-field-spacefrom, .hpf-field-spaceto {
    width: calc(24% - 5px)!important;
    }
    .hpf-field-grundab, .hpf-field-grundbis, .hpf-field-bebaubar {
        width: calc(32% - 5px);
    }
    .hpf-field label{
        font-size: 13px!important;
    }
}

@media (max-width: 767px) {

    .hpf-row-contact, .hpf-row-ort, .hpf-row-street {
        flex-direction: column;
    }
}
