/* CHATBOT / PROJEKTBERATER */

.chatbot-page{
    padding-top:90px;
}

.chatbot-hero{
    min-height:calc(100vh - 90px);
    display:flex;
    align-items:center;
    padding:90px 0;
    background:
        radial-gradient(circle at top left, rgba(111,154,64,.13), transparent 34%),
        linear-gradient(180deg, #f8f8f4 0%, #eef2e7 100%);
}

.chatbot-shell{
    display:grid;
    grid-template-columns:.9fr 1.1fr;
    gap:44px;
    align-items:center;
}

.chatbot-intro h1{
    margin:18px 0 18px;
    max-width:620px;
    font-size:clamp(40px, 5vw, 72px);
    line-height:.98;
    letter-spacing:-.045em;
}

.chatbot-intro p{
    max-width:560px;
    margin:0;
    font-size:19px;
    line-height:1.72;
    color:var(--sr-muted);
}

.chatbot-box{
    background:rgba(255,255,255,.92);
    border:1px solid rgba(17,24,39,.08);
    border-radius:32px;
    box-shadow:var(--sr-shadow-xl);
    overflow:hidden;
}

.chatbot-header{
    padding:24px 28px;
    background:linear-gradient(180deg, #171c22 0%, #0f1216 100%);
    color:#fff;
}

.chatbot-header strong{
    display:block;
    font-size:21px;
}

.chatbot-header span{
    color:rgba(255,255,255,.72);
    font-size:14px;
}

.chatbot-messages{
    height:520px;
    overflow:auto;
    padding:24px;
    background:
        radial-gradient(circle at top right, rgba(111,154,64,.10), transparent 32%),
        #fafbf8;
}

.chatbot-messages::-webkit-scrollbar,
.chatbot-widget-messages::-webkit-scrollbar{
    width:8px;
}

.chatbot-messages::-webkit-scrollbar-thumb,
.chatbot-widget-messages::-webkit-scrollbar-thumb{
    background:rgba(17,24,39,.16);
    border-radius:999px;
}

.chat-message{
    max-width:88%;
    margin-bottom:16px;
    padding:16px 18px;
    border-radius:22px;
    font-size:15px;
    line-height:1.58;
    animation:chatbotFadeIn .22s ease both;
}

.chat-message p{
    margin:0;
}

.chat-message p + p{
    margin-top:12px;
}

.chat-message.bot{
    background:#fff;
    border:1px solid rgba(17,24,39,.08);
    color:var(--sr-text);
    box-shadow:0 12px 32px rgba(16,24,40,.06);
}

.chat-message.user{
    margin-left:auto;
    background:linear-gradient(180deg, #82ad4f 0%, #6f9a40 100%);
    color:#fff;
    box-shadow:0 14px 34px rgba(111,154,64,.24);
}

.chatbot-persona-title{
    font-size:17px;
}

.chatbot-section{
    margin-top:18px;
}

.chatbot-section-title{
    margin:0 0 10px !important;
}

.chatbot-card-grid{
    display:grid;
    gap:10px;
}

.chatbot-smart-card{
    display:grid;
    grid-template-columns:46px 1fr;
    gap:12px;
    align-items:center;
    min-height:72px;
    padding:12px 16px;
    border-radius:18px;
    text-decoration:none !important;
    border:1px solid rgba(17,24,39,.08);
    background:#fff;
    transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.chatbot-smart-card.is-selected,
.chatbot-choice.is-selected,
.chatbot-option.is-selected{
    border-color:#6f9a40;
    background:linear-gradient(180deg, rgba(111,154,64,.10) 0%, #fff 100%);
}

.chatbot-smart-card .chatbot-card-icon,
.chatbot-smart-card .chatbot-multi-mark{
    width:40px;
    height:40px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    background:rgba(255,255,255,.9);
    box-shadow:inset 0 0 0 1px rgba(17,24,39,.08);
    font-size:18px;
    font-weight:800;
    color:#1f2937;
}

.chatbot-smart-card.is-selected .chatbot-card-icon,
.chatbot-smart-card.is-selected .chatbot-multi-mark{
    background:#6f9a40;
    color:#fff;
    box-shadow:none;
}

.chatbot-smart-card .chatbot-card-content{
    display:flex;
    flex-direction:column;
    justify-content:center;
    min-width:0;
}

.chatbot-smart-card .chatbot-card-content strong{
    margin:0;
    line-height:1.25;
}

.chatbot-smart-card .chatbot-card-content em{
    margin-top:4px;
}

.chatbot-smart-card .chatbot-multi-mark + .chatbot-card-icon,
.chatbot-smart-card .chatbot-card-icon + .chatbot-multi-mark,
.chatbot-smart-card .chatbot-multi-mark + .chatbot-multi-mark{
    display:none !important;
}

.chatbot-smart-card:hover{
    transform:translateY(-3px);
    box-shadow:0 16px 38px rgba(16,24,40,.10);
}

.chatbot-smart-card-service{
    background:linear-gradient(180deg, rgba(111,154,64,.11) 0%, rgba(255,255,255,.96) 100%);
    border-color:rgba(111,154,64,.24);
}

.chatbot-smart-card-living{
    background:linear-gradient(180deg, rgba(15,18,22,.06) 0%, rgba(255,255,255,.96) 100%);
}

.chatbot-smart-card-guide{
    background:linear-gradient(180deg, rgba(180,142,72,.12) 0%, rgba(255,255,255,.96) 100%);
    border-color:rgba(180,142,72,.20);
}

.chatbot-card-icon{
    width:38px;
    height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:14px;
    background:rgba(255,255,255,.76);
    box-shadow:inset 0 0 0 1px rgba(17,24,39,.06);
    font-size:18px;
}

.chatbot-card-content{
    display:grid;
    gap:4px;
}

.chatbot-card-content strong{
    color:var(--sr-text);
    font-size:15px;
    line-height:1.2;
}

.chatbot-card-content small{
    color:var(--sr-muted);
    font-size:13px;
    line-height:1.42;
}

.chatbot-card-content em{
    margin-top:3px;
    color:var(--sr-green-dark);
    font-style:normal;
    font-weight:700;
    font-size:13px;
}

.chatbot-question-box{
    margin-top:18px;
    padding:15px 16px;
    border-radius:18px;
    background:rgba(15,18,22,.04);
    border:1px solid rgba(17,24,39,.07);
}

.chatbot-question-box ul{
    margin:8px 0 0;
    padding-left:19px;
}

.chatbot-question-box li{
    margin:5px 0;
}

.chatbot-cta-row{
    margin-top:18px !important;
}

.chatbot-cta{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:0 18px;
    border-radius:999px;
    background:linear-gradient(180deg, #82ad4f 0%, #6f9a40 100%);
    color:#fff !important;
    font-weight:800;
    text-decoration:none !important;
    box-shadow:0 16px 34px rgba(111,154,64,.28);
    transition:transform .22s ease, box-shadow .22s ease;
}

.chatbot-cta:hover{
    transform:translateY(-2px);
    box-shadow:0 22px 44px rgba(111,154,64,.34);
}

.chatbot-quick-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:16px;
}

.chatbot-quick-actions button,
.chatbot-choice,
.chatbot-option{
    border:1px solid rgba(111,154,64,.22);
    background:rgba(111,154,64,.08);
    color:var(--sr-green-dark);
    border-radius:999px;
    padding:10px 14px;
    font-weight:700;
    cursor:pointer;
    transition:transform .2s ease, background .2s ease, border-color .2s ease;
}

.chatbot-quick-actions button:hover,
.chatbot-choice:hover,
.chatbot-option:hover{
    transform:translateY(-2px);
    background:rgba(111,154,64,.13);
    border-color:rgba(111,154,64,.34);
}

.chatbot-form{
    display:flex;
    gap:10px;
    padding:18px;
    background:#fff;
    border-top:1px solid rgba(17,24,39,.08);
}

.chatbot-form input{
    flex:1;
    min-height:54px;
    border:1px solid rgba(17,24,39,.12);
    border-radius:999px;
    padding:0 18px;
    font:inherit;
    outline:none;
}

.chatbot-form input:focus{
    border-color:rgba(111,154,64,.55);
    box-shadow:0 0 0 4px rgba(111,154,64,.10);
}

.chatbot-form button{
    min-height:54px;
    border:0;
    border-radius:999px;
    padding:0 24px;
    background:var(--sr-green);
    color:#fff;
    font-weight:800;
    cursor:pointer;
}

/* NEUE MEISTER-KARTEN */

.chatbot-extra-blocks{
    margin-top:14px;
    display:grid;
    gap:10px;
}

.chatbot-info-card{
    display:grid;
    grid-template-columns:42px 1fr;
    gap:14px;
    align-items:flex-start;
    padding:14px 16px;
    border-radius:18px;
    border:1px solid rgba(17,24,39,.08);
    background:#fff;
    box-shadow:0 10px 28px rgba(16,24,40,.05);
}

.chatbot-info-card strong{
    display:block;
    margin-bottom:4px;
    font-size:14px;
    color:var(--sr-text);
}

.chatbot-info-card p{
    margin:0;
    color:var(--sr-muted);
    font-size:14px;
    line-height:1.5;
}

.chatbot-info-card-tip{
    border-left:5px solid #6f9a40;
}

.chatbot-info-card-recommendation{
    border-left:5px solid #3d8bfd;
}

.chatbot-info-card-warning{
    border-left:5px solid #d97706;
}

.chatbot-info-card-icon{
    width:40px;
    height:40px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    background:#f5f7f2;
    box-shadow:inset 0 0 0 1px rgba(17,24,39,.06);
}

.chatbot-recommendation{
    margin-top:16px;
    padding:16px;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(111,154,64,.08), rgba(111,154,64,.03));
    border:1px solid rgba(111,154,64,.18);
}

/* MEHRFACHAUSWAHL */

.chatbot-multi-actions{
    margin-top:14px;
    display:flex;
    justify-content:flex-end;
}

.chatbot-multiple-submit{
    border:0;
    cursor:pointer;
}

.chatbot-multiple-submit:disabled{
    opacity:.5;
    cursor:not-allowed;
    transform:none;
    box-shadow:none;
}

.chatbot-multi-mark{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:24px;
    height:24px;
    margin-right:8px;
    border-radius:999px;
    background:rgba(111,154,64,.12);
    color:#6f9a40;
    font-weight:900;
}

.is-selected .chatbot-multi-mark{
    background:#6f9a40;
    color:#fff;
}

/* LADEANIMATION */

.chatbot-loading{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:5px;
}

.chatbot-loading-dot{
    width:7px;
    height:7px;
    border-radius:999px;
    background:#6f9a40;
    animation:chatbotPulse 1.2s infinite;
}

.chatbot-loading-dot:nth-child(2){
    animation-delay:.2s;
}

.chatbot-loading-dot:nth-child(3){
    animation-delay:.4s;
}

/* FLOATING CHATBOT WIDGET */

.chatbot-widget{
    position:fixed;
    right:22px;
    bottom:22px;
    z-index:1200;
    font-family:inherit;
}

.chatbot-widget-button{
    display:inline-flex;
    align-items:center;
    gap:10px;
    min-height:56px;
    padding:0 18px;
    border:0;
    border-radius:999px;
    background:linear-gradient(180deg, #82ad4f 0%, #6f9a40 100%);
    color:#fff;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 20px 48px rgba(111,154,64,.36);
    transition:transform .22s ease, box-shadow .22s ease;
}

.chatbot-widget-button:hover{
    transform:translateY(-3px);
    box-shadow:0 28px 62px rgba(111,154,64,.42);
}

.chatbot-widget-button span{
    font-size:14px;
}

.chatbot-widget-panel{
    position:absolute;
    right:0;
    bottom:74px;
    width:min(420px, calc(100vw - 34px));
    max-height:min(720px, calc(100vh - 110px));
    display:grid;
    grid-template-rows:auto auto auto 1fr auto;
    overflow:hidden;
    border-radius:28px;
    background:rgba(255,255,255,.96);
    border:1px solid rgba(17,24,39,.10);
    box-shadow:0 34px 100px rgba(15,18,22,.24);
    animation:chatbotPanelIn .22s ease both;
}

.chatbot-widget-panel[hidden]{
    display:none;
}

.chatbot-widget-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:18px 20px;
    background:linear-gradient(180deg, #171c22 0%, #0f1216 100%);
    color:#fff;
}

.chatbot-widget-head strong{
    font-size:17px;
}

.chatbot-widget-head span{
    display:block;
    margin-top:2px;
    font-size:13px;
    color:rgba(255,255,255,.72);
}

.chatbot-widget-head button{
    width:34px;
    height:34px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:999px;
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:23px;
    line-height:1;
    cursor:pointer;
}

/* WIDGET FORTSCHRITT */

.chatbot-widget-progress{
    padding:14px 18px;
    background:#f7f9f4;
    border-bottom:1px solid rgba(17,24,39,.06);
}

.chatbot-widget-progress[hidden]{
    display:none;
}

.chatbot-widget-progress-text{
    display:block;
    margin-bottom:8px;
    font-size:13px;
    font-weight:800;
    color:#263221;
}

.chatbot-widget-progress-bar{
    display:block;
    height:7px;
    background:#e8ece2;
    border-radius:999px;
    overflow:hidden;
}

.chatbot-widget-progress-bar span{
    display:block;
    height:100%;
    width:0;
    background:linear-gradient(90deg,#6f9a40,#82ad4f);
    transition:width .35s ease;
}

/* WIDGET AKTIONEN */

.chatbot-widget-actions{
    display:flex;
    gap:8px;
    padding:12px;
    background:#fafbf8;
    border-bottom:1px solid rgba(17,24,39,.05);
}

.chatbot-widget-actions button{
    flex:1;
    border:0;
    border-radius:999px;
    padding:10px;
    cursor:pointer;
    font-weight:800;
    font-size:13px;
    background:#eef3e7;
    color:#334155;
    transition:background .2s ease, transform .2s ease;
}

.chatbot-widget-actions button:hover{
    background:#dfe8d4;
    transform:translateY(-1px);
}

.chatbot-widget-messages{
    min-height:320px;
    max-height:min(520px, calc(100vh - 260px));
    overflow:auto;
    padding:18px;
    background:
        radial-gradient(circle at top right, rgba(111,154,64,.10), transparent 35%),
        #fafbf8;
}

.chatbot-widget .chat-message{
    max-width:94%;
    padding:13px 14px;
    border-radius:18px;
    font-size:14px;
    margin-bottom:12px;
}

.chatbot-widget .chatbot-smart-card{
    grid-template-columns:42px 1fr;
    min-height:68px;
    padding:10px 12px;
    border-radius:16px;
}

.chatbot-widget .chatbot-card-icon{
    width:34px;
    height:34px;
    border-radius:12px;
}

.chatbot-widget .chatbot-info-card{
    grid-template-columns:38px 1fr;
    padding:12px;
    border-radius:16px;
}

.chatbot-widget .chatbot-info-card-icon{
    width:36px;
    height:36px;
    font-size:18px;
}

.chatbot-widget-form{
    display:flex;
    gap:8px;
    padding:14px;
    background:#fff;
    border-top:1px solid rgba(17,24,39,.08);
}

.chatbot-widget-form input{
    flex:1;
    min-height:46px;
    min-width:0;
    border:1px solid rgba(17,24,39,.12);
    border-radius:999px;
    padding:0 14px;
    font:inherit;
    outline:none;
}

.chatbot-widget-form input:focus{
    border-color:rgba(111,154,64,.55);
    box-shadow:0 0 0 4px rgba(111,154,64,.10);
}

.chatbot-widget-form button{
    min-height:46px;
    border:0;
    border-radius:999px;
    padding:0 15px;
    background:var(--sr-green);
    color:#fff;
    font-weight:800;
    cursor:pointer;
}

.chatbot-widget-form button:disabled,
.chatbot-widget-form input:disabled{
    opacity:.65;
    cursor:not-allowed;
}

@keyframes chatbotFadeIn{
    from{
        opacity:0;
        transform:translateY(6px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@keyframes chatbotPanelIn{
    from{
        opacity:0;
        transform:translateY(12px) scale(.98);
    }
    to{
        opacity:1;
        transform:translateY(0) scale(1);
    }
}

@keyframes chatbotPulse{
    0%,80%,100%{
        transform:scale(.6);
        opacity:.5;
    }

    40%{
        transform:scale(1);
        opacity:1;
    }
}

@media (max-width:980px){
    .chatbot-shell{
        grid-template-columns:1fr;
    }

    .chatbot-messages{
        height:460px;
    }
}

@media (max-width:640px){
    .chatbot-hero{
        padding:50px 0;
    }

    .chatbot-messages{
        height:410px;
        padding:18px;
    }

    .chat-message{
        max-width:94%;
        padding:14px;
    }

    .chatbot-form{
        flex-direction:column;
    }

    .chatbot-form button{
        width:100%;
    }

    .chatbot-widget{
        right:12px;
        bottom:12px;
        left:12px;
    }

    .chatbot-widget-button{
        width:100%;
        justify-content:center;
    }

    .chatbot-widget-panel{
        right:0;
        left:0;
        width:auto;
        bottom:70px;
        max-height:calc(100vh - 92px);
        border-radius:24px;
    }

    .chatbot-widget-messages{
        max-height:calc(100vh - 275px);
    }

    .chatbot-widget-actions{
        padding:10px;
    }

    .chatbot-widget-actions button{
        font-size:12px;
        padding:9px 8px;
    }
}


/* ==========================================================
   Desktop größer / Mobil kleiner Floating-Button
   ========================================================== */

@media (min-width:981px){
    .chatbot-widget-panel{
        width:min(560px, calc(100vw - 60px));
        max-height:min(780px, calc(100vh - 120px));
    }

    .chatbot-widget-messages{
        min-height:420px;
        max-height:min(600px, calc(100vh - 300px));
    }
}

@media (max-width:640px){

    .chatbot-widget{
        left:auto;
        right:18px;
        bottom:18px;
        width:auto;
    }

    .chatbot-widget-button{
        width:58px;
        height:58px;
        min-width:58px;
        min-height:58px;
        padding:0;
        border-radius:999px;
        justify-content:center;
    }

    .chatbot-widget-label{
        display:none;
    }

    .chatbot-widget-icon{
        font-size:22px;
    }

    .chatbot-widget-panel{
        position:fixed;
        left:12px;
        right:12px;
        bottom:88px;
        width:auto;
        max-height:calc(100vh - 110px);
    }
}
