/* =========================================
   0. CSS Variablen (per PHP steuerbar)
   ========================================= */
:root {
    --lux-primary: #203444;
    --lux-secondary: #f7f9fc;
    --lux-bubble: #000000;

    --lux-window-width: 380px;
    --lux-window-height: 600px;
    --lux-radius: 20px;

    --lux-bubble-size: 65px;
    --lux-font-size: 14px;
}

/* =========================================
   1. Chat Bubble
   ========================================= */
#lux-bubble {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: var(--lux-bubble-size);
    height: var(--lux-bubble-size);
    background: var(--lux-bubble);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    cursor: pointer;
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
}
#lux-bubble:hover {
    transform: scale(1.1) translateY(-4px);
}
#lux-bubble img,
#lux-bubble svg {
    width: 60%;
    height: 60%;
    fill: #fff;
    border-radius: 50%;
}

/* =========================================
   2. Chat Window
   ========================================= */
#lux-window {
    position: fixed;
    bottom: calc(var(--lux-bubble-size) + 35px);
    right: 25px;
    width: var(--lux-window-width);
    height: var(--lux-window-height);
    max-height: 85vh;
    background: #fff;
    border-radius: var(--lux-radius);
    box-shadow: 0 12px 40px rgba(0,0,0,.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
    animation: luxSlideUp .35s ease;
}

@keyframes luxSlideUp {
    from { opacity:0; transform:translateY(20px) scale(.96); }
    to { opacity:1; transform:none; }
}

/* =========================================
   3. Header
   ========================================= */
.lux-header {
    background: var(--lux-primary);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lux-header img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.7);
}

.lux-header strong {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.lux-close {
    cursor: pointer;
    font-size: 26px;
    opacity: .85;
}
.lux-close:hover { opacity:1; }

/* =========================================
   4. Messages
   ========================================= */
.lux-messages {
    flex: 1;
    padding: 18px;
    background: var(--lux-secondary);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: var(--lux-font-size);
}

.lux-msg {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.45;
    word-wrap: break-word;
}

.lux-msg.bot {
    background: #fff;
    color: #2c3e50;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.lux-msg.user {
    background: var(--lux-primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.lux-msg.loading {
    background: transparent;
    font-size: 12px;
    opacity: .6;
    padding: 0;
}

/* =========================================
   4a. LINK BUTTONS (KI + Booking) - OPTIMIERT
   ========================================= */
.lux-link-btn {
    display: inline-block;
    margin-top: 8px;
    margin-bottom: 8px;
    margin-right: 5px;
    padding: 10px 22px;
    background: var(--lux-primary);
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.lux-link-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* =========================================
   5. Suggestion Chips
   ========================================= */
.lux-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 5px;
}

.lux-chip {
    border: 1px solid var(--lux-primary);
    color: var(--lux-primary);
    background: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.lux-chip:hover {
    background: var(--lux-primary);
    color: #fff;
}

/* =========================================
   6. Booking Form (FINAL)
   ========================================= */
#lux-booking-form {
    border-top: 1px solid #ddd;
    background: var(--lux-secondary);
    padding: 16px;
    text-align: center;
    animation: luxSlideUpSmall .25s ease;
}

@keyframes luxSlideUpSmall {
    from { opacity:0; transform:translateY(10px); }
    to { opacity:1; transform:none; }
}

#lux-booking-form input[type="date"],
#lux-booking-form select {
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    background: #fff;
}

#lux-booking-form select {
    appearance: none;
    cursor: pointer;
}

/* =========================================
   7. Footer
   ========================================= */
.lux-chat-footer {
    font-size: 11px;
    text-align: center;
    padding: 8px;
    color: #8a96a3;
    background: var(--lux-secondary);
}

/* =========================================
   8. Input Area
   ========================================= */
.lux-input-area {
    display: flex;
    gap: 10px;
    padding: 14px;
    background: #fff;
    border-top: 1px solid #eee;
}

#lux-input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #ddd;
    font-size: var(--lux-font-size);
}

#lux-input:focus {
    border-color: var(--lux-primary);
    outline: none;
}

#lux-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--lux-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

/* =========================================
   9. Scrollbar
   ========================================= */
.lux-messages::-webkit-scrollbar {
    width: 5px;
}
.lux-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* =========================================
   10. Mobile
   ========================================= */
@media (max-width: 480px) {
    #lux-window {
        width: 100%;
        height: 100dvh;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }
}