/* ==========================================================
   SEITENCHECKER  –  Google-Suchfeld-Design  v1.1
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* ---- Wrapper -------------------------------------------- */
.stc-wrapper {
    width: 100%;
    max-width: 860px;
    margin: 40px auto 60px;
    font-family: 'Roboto', Arial, sans-serif;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ---- Suchbox-Container ---------------------------------- */
.stc-search-box {
    display: flex;
    align-items: center;
    width: 100%;
    height: 70px;
    border: 2px solid #dfe1e5;
    border-radius: 40px;
    background: #fff;
    padding: 0 14px 0 24px;
    gap: 10px;
    box-sizing: border-box;
    box-shadow: none !important;
    transition:
        border-color 0.25s ease;
    position: relative;
}

/* ---- Hover-Schatten ------------------------------------- */
.stc-search-box:hover {
    box-shadow: none !important;
    border-color: rgba(223, 225, 229, 0);
}

/* ---- Fokus-Schatten (beim Tippen) ----------------------- */
.stc-search-box:focus-within {
    box-shadow: none !important;
    border-color: rgba(223, 225, 229, 0);
}

/* ---- Lupe-Icon ------------------------------------------ */
.stc-icon-search {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.7;
}

.stc-icon-search svg {
    width: 28px;
    height: 28px;
}

/* ---- Input ---------------------------------------------- */
.stc-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 19px;
    color: #202124;
    line-height: 1;
    padding: 0;
    margin: 0;
    caret-color: #fca311;
    box-shadow: none !important;
    -webkit-appearance: none;
    min-width: 0;
}

/* Placeholder in hellem Grau */
.stc-input::placeholder {
    color: #9aa0a6;
    font-size: 18px;
}
.stc-input::-webkit-input-placeholder { color: #9aa0a6; }
.stc-input:-ms-input-placeholder      { color: #9aa0a6; }

/* ---- Clear-Button (×) ----------------------------------- */
.stc-clear-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    transition: background 0.15s ease;
    line-height: 0;
}

.stc-clear-btn:hover {
    background: #f1f3f4;
}

.stc-clear-btn.visible {
    display: flex;
}

.stc-clear-btn svg {
    width: 22px;
    height: 22px;
}

/* ---- Trennlinie ----------------------------------------- */
.stc-divider {
    width: 1px;
    height: 36px;
    background: #dfe1e5;
    flex-shrink: 0;
    margin: 0 6px;
}

/* ---- Submit-Button wie Website-Vorlage, aber grün ------- */
.stc-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

#stc-submit-btn,
#stc-submit-btn-mobile {
    background: #44c832 !important;
    color: #fff !important;
    border: 1px solid #2b8f1f !important;
    border-radius: 70px !important;
    padding: 1em 2em !important;
    height: auto !important;
    box-sizing: border-box;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    box-shadow: none !important;
    filter: none !important;
    transition: background-color 0.3s ease, color 0.3s ease,
                border-color 0.3s ease, box-shadow 0.3s ease !important;
}

#stc-submit-btn:hover,
#stc-submit-btn-mobile:hover {
    background: #44c832 !important;
    color: #fff !important;
    border-color: #2b8f1f !important;
    box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.5) !important;
    filter: none !important;
}

#stc-submit-btn:active,
#stc-submit-btn-mobile:active {
    background: #44c832 !important;
    color: #fff !important;
}

/* ---- Spinner (während Senden) --------------------------- */
.stc-btn-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: stc-spin 0.7s linear infinite;
}

.stc-btn-spinner.active {
    display: inline-block;
}

@keyframes stc-spin {
    to { transform: rotate(360deg); }
}

/* Mobil-Button: Basisstyle (wird per Media Query eingeblendet) */
.stc-submit-btn-mobile {
    display: none;
}

/* ---- Fehlermeldung -------------------------------------- */
.stc-error {
    display: none;
    color: #d93025;
    font-size: 15px;
    margin: 10px 0 0 28px;
    padding: 0;
}

.stc-error.visible {
    display: block;
}

/* ---- Bestätigungs-Banner -------------------------------- */
.stc-confirm {
    display: none;
    align-items: center;
    gap: 16px;
    background: #e6f4ea;
    border: 1px solid #ceead6;
    border-radius: 16px;
    padding: 20px 28px;
    margin-bottom: 24px;
    animation: stc-fadeIn 0.4s ease forwards;
}

.stc-confirm.visible {
    display: flex;
}

.stc-confirm-icon {
    font-size: 28px;
    color: #188038;
    line-height: 1;
}

.stc-confirm-text {
    font-size: 17px;
    color: #1e7e34;
    font-weight: 500;
}

@keyframes stc-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive: Tablet --------------------------------- */
@media (max-width: 700px) {
    .stc-wrapper {
        margin: 24px auto 40px;
        padding: 0 16px;
    }

    .stc-search-box {
        height: 62px;
        padding: 0 12px 0 20px;
        gap: 8px;
    }

    .stc-input {
        font-size: 16px;
    }

    .stc-input::placeholder {
        font-size: 15px;
    }

}

/* ---- Responsive: Mobil (Button unter Eingabe) ----------- */
@media (max-width: 520px) {
    .stc-wrapper {
        margin: 16px auto 32px;
        padding: 0 12px;
    }

    .stc-search-box {
        height: 54px;
        border-radius: 28px;
        padding: 0 10px 0 18px;
        gap: 6px;
    }

    /* Trennlinie und Submit-Button aus der Box ausblenden */
    .stc-divider,
    .stc-search-box .stc-submit-btn {
        display: none;
    }

    .stc-input {
        font-size: 16px;
        width: 100%;
    }

    .stc-input::placeholder {
        font-size: 14px;
    }

    /* Formular als Spalte: Suchbox oben, Button unten */
    .stc-form {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Mobil-Button: volle Breite, sichtbar nur < 520px */
    .stc-submit-btn-mobile {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
        gap: 8px;
        cursor: pointer;
    }

    .stc-error {
        margin-left: 18px;
        font-size: 14px;
    }

    .stc-confirm {
        padding: 16px 20px;
        border-radius: 12px;
        gap: 12px;
    }

    .stc-confirm-text {
        font-size: 15px;
    }
}

/* Desktop: Mobil-Button verstecken */
@media (min-width: 521px) {
    .stc-submit-btn-mobile {
        display: none !important;
    }
}

