/* Chatbot Widget Styles - Premium Design */
#chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

#chatbot-widget #chatbot-toggle {
    pointer-events: auto;
}

#chatbot-widget #chatbot-container.show {
    pointer-events: auto;
}

#chatbot-messages,
.chatbot-message-content {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#chatbot-container {
    display: none;
    width: 420px;
    max-width: calc(100vw - 32px);
    height: min(680px, calc(100vh - 120px));
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow:
        0 25px 60px -12px rgba(10, 14, 39, 0.45),
        0 0 0 1px rgba(255, 215, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border: none;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 12px;
    will-change: transform, opacity;
    transform: translateZ(0);
    opacity: 0;
    transform: translateY(30px) scale(0.92);
    transition: opacity 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#chatbot-container.show {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

#chatbot-container.minimized {
    display: none;
}

#chatbot-header {
    background: linear-gradient(135deg, #0a0e27 0%, #141b2d 45%, #0f1629 100%);
    color: #f8fafc;
    padding: 0;
    font-weight: 600;
    position: relative;
    border-radius: 20px 20px 0 0;
    box-shadow: inset 0 -1px 0 rgba(255, 215, 0, 0.25);
    overflow: hidden;
}

#chatbot-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.9), rgba(255, 165, 0, 0.6), transparent);
    pointer-events: none;
}

#chatbot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.08) 0%, transparent 100%);
    pointer-events: none;
}

.chatbot-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    position: relative;
    z-index: 1;
}

.chatbot-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.chatbot-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 8px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.35);
}

.chatbot-logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.chatbot-logo-fallback {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 22px;
    flex-shrink: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chatbot-logo-fallback .logo-main {
    color: #ffffff;
}

.chatbot-logo-fallback .logo-accent {
    color: #FFD700;
    opacity: 1;
}

.chatbot-header-text {
    flex: 1;
    min-width: 0;
}

.chatbot-header-text p {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fffbeb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.chatbot-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.chatbot-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.25);
}

.chatbot-header-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.chatbot-header-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #fff;
    border-color: rgba(255, 215, 0, 0.5);
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.chatbot-header-btn:active {
    transform: scale(0.9);
}

#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    position: relative;
}

#chatbot-messages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
    pointer-events: none;
    z-index: 1;
}

.chatbot-message {
    margin-bottom: 18px;
    display: flex;
    animation: messageSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-message.user {
    justify-content: flex-end;
    animation-delay: 0.05s;
}

.chatbot-message.bot {
    justify-content: flex-start;
    animation-delay: 0.05s;
}

.chatbot-message-content {
    max-width: 80%;
    padding: 16px 20px;
    border-radius: 24px;
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 15px;
    animation: messagePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes messagePop {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }
    60% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.chatbot-message.user .chatbot-message-content {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1f2937;
    border-bottom-right-radius: 8px;
    font-weight: 500;
    box-shadow: 
        0 8px 20px rgba(255, 215, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.chatbot-message.bot .chatbot-message-content {
    background: #ffffff;
    color: #0f172a;
    border-bottom-left-radius: 8px;
    box-shadow:
        0 4px 18px rgba(10, 14, 39, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-left: 3px solid #d4a520;
}

#chatbot-input-container {
    display: flex;
    padding: 16px 18px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(10, 14, 39, 0.08);
    gap: 10px;
    align-items: center;
    box-shadow: 0 -8px 24px rgba(10, 14, 39, 0.06);
}

#chatbot-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f8fafc;
    font-family: inherit;
}

#chatbot-input:focus {
    border-color: #ca8a04;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
    transform: none;
}

#chatbot-input::placeholder {
    color: #a0a0a0;
    font-weight: 400;
}

#chatbot-send {
    padding: 12px 20px;
    background: linear-gradient(135deg, #0a0e27 0%, #1e293b 100%);
    color: #fefce8;
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 14px rgba(10, 14, 39, 0.25);
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

#chatbot-send:hover {
    background: linear-gradient(135deg, #141b2d 0%, #0a0e27 100%);
    border-color: #fbbf24;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(10, 14, 39, 0.35);
}

#chatbot-send:active {
    transform: translateY(-1px) scale(0.98);
}

#chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Floating launch button — usklađeno sa headerom */
#chatbot-toggle {
    width: auto;
    min-width: 168px;
    height: 54px;
    padding: 0 22px;
    border-radius: 14px;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 55%, #0a0e27 100%);
    border: 1px solid rgba(255, 215, 0, 0.4);
    cursor: pointer;
    box-shadow:
        0 12px 32px rgba(10, 14, 39, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
}

.chatbot-toggle-emoji {
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.chatbot-toggle-text {
    font-size: 14px;
    color: #fef3c7;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

#chatbot-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

#chatbot-toggle:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.75);
    box-shadow:
        0 16px 40px rgba(10, 14, 39, 0.55),
        0 0 24px rgba(255, 215, 0, 0.12);
}

#chatbot-toggle:hover .chatbot-toggle-text {
    color: #fff;
}

#chatbot-toggle:active {
    transform: scale(0.95);
}

#chatbot-toggle.hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#chatbot-toggle.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#typing-indicator {
    margin-bottom: 18px;
    display: flex;
    justify-content: flex-start;
    animation: fadeIn 0.4s ease;
}

#typing-indicator .chatbot-message-content {
    background: #ffffff;
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 24px;
    border-bottom-left-radius: 8px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#typing-indicator span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    animation: typingBounce 1.6s infinite;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-14px) scale(1.3);
        opacity: 1;
    }
}

#typing-indicator span:nth-child(2) {
    animation-delay: 0.25s;
}

#typing-indicator span:nth-child(3) {
    animation-delay: 0.5s;
}

#chatbot-messages::-webkit-scrollbar {
    width: 10px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.4) 0%, rgba(255, 165, 0, 0.4) 100%);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

#chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.6) 0%, rgba(255, 165, 0, 0.6) 100%);
    background-clip: padding-box;
}

/* Mobile Responsive - Tablets */
@media (max-width: 768px) {
    #chatbot-widget {
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        position: fixed;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: 0;
        z-index: 9998;
        pointer-events: none;
    }
    
    #chatbot-widget #chatbot-toggle {
        pointer-events: auto;
    }
    
    #chatbot-widget #chatbot-container.show {
        pointer-events: auto;
    }
    
    #chatbot-container {
        width: 100%;
        max-width: none !important; /* not .has-contact-hub Kachel */
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh !important;
        min-height: 0 !important;
        right: 0;
        left: 0;
        top: 0;
        bottom: 0;
        margin: 0;
        margin-bottom: 0 !important;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom);
        border-radius: 0 !important; /* „Vera Pro“-Theme überschreiben */
        box-shadow: none !important;
        border: none !important;
        position: fixed;
        overflow: hidden;
        /* edge-to-edge: kein Karten-„Pop“ */
        transform: none !important;
        opacity: 1 !important;
        transition: opacity 0.2s ease !important;
    }
    
    #chatbot-container.show {
        display: flex;
        flex-direction: column;
    }
    
    #chatbot-header {
        border-radius: 0 !important;
        flex-shrink: 0;
        min-height: auto;
    }
    
    .chatbot-header-content {
        padding: 16px 18px;
        min-height: auto;
    }
    
    .chatbot-logo {
        width: 42px;
        height: 42px;
    }
    
    #chatbot-header p {
        font-size: 14px;
    }
    
    #chatbot-messages {
        padding: 20px 18px;
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
    }
    
    .chatbot-message-content {
        max-width: 85%;
        font-size: 15px;
        padding: 14px 18px;
    }
    
    #chatbot-input-container {
        padding: 16px 18px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        gap: 10px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        min-height: auto;
    }
    
    #chatbot-input {
        font-size: 16px;
        padding: 14px 18px;
        min-height: 48px;
    }
    
    #chatbot-send {
        padding: 14px 24px;
        font-size: 14px;
        min-width: 75px;
        min-height: 48px;
    }
    
    #chatbot-toggle {
        min-width: 140px;
        height: 50px;
        padding: 0 18px;
        border-radius: 14px;
        bottom: calc(18px + env(safe-area-inset-bottom));
        right: calc(18px + env(safe-area-inset-right));
        position: fixed;
        z-index: 9998;
        border-width: 1px;
        box-shadow: 0 10px 28px rgba(10, 14, 39, 0.4);
    }
    
    .chatbot-toggle-emoji {
        font-size: 20px;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
    }
    
    .chatbot-toggle-text {
        font-size: 13px;
        font-weight: 600;
    }
}

/* Mobile Responsive - Small Phones */
@media (max-width: 480px) {
    #chatbot-widget {
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        position: fixed;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: 0;
        z-index: 9998;
        pointer-events: none;
    }
    
    #chatbot-widget #chatbot-toggle {
        pointer-events: auto;
    }
    
    #chatbot-widget #chatbot-container.show {
        pointer-events: auto;
    }
    
    #chatbot-container {
        width: 100%;
        max-width: none !important;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh !important;
        min-height: 0 !important;
        bottom: 0;
        top: 0;
        left: 0;
        right: 0;
        margin: 0;
        margin-bottom: 0 !important;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom);
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        position: fixed;
        overflow: hidden;
        transform: none !important;
        opacity: 1 !important;
        transition: opacity 0.2s ease !important;
    }
    
    #chatbot-container.show {
        display: flex;
        flex-direction: column;
    }
    
    #chatbot-header {
        border-radius: 0 !important;
        flex-shrink: 0;
        min-height: auto;
    }
    
    .chatbot-header-content {
        padding: 14px 16px;
        min-height: auto;
    }
    
    .chatbot-logo {
        width: 38px;
        height: 38px;
    }
    
    #chatbot-header p {
        font-size: 13px;
    }
    
    .chatbot-header-brand {
        gap: 10px;
    }
    
    #chatbot-messages {
        padding: 16px;
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
    }
    
    .chatbot-message {
        margin-bottom: 14px;
    }
    
    .chatbot-message-content {
        max-width: 88%;
        font-size: 14px;
        padding: 12px 16px;
        line-height: 1.5;
    }
    
    #chatbot-input-container {
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        gap: 8px;
        border-top: 1px solid rgba(255, 215, 0, 0.15);
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        min-height: auto;
    }
    
    #chatbot-input {
        font-size: 16px;
        padding: 14px 16px;
        border-radius: 24px;
        min-height: 48px;
    }
    
    #chatbot-send {
        padding: 14px 20px;
        font-size: 14px;
        border-radius: 24px;
        min-width: 65px;
        min-height: 48px;
    }
    
    #chatbot-toggle {
        min-width: 120px;
        height: 46px;
        padding: 0 14px;
        border-radius: 50px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        right: calc(16px + env(safe-area-inset-right));
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
        position: fixed;
        z-index: 9998;
        border-width: 2.5px;
    }
    
    .chatbot-toggle-emoji {
        font-size: 18px;
        filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.7)) 
                drop-shadow(0 0 6px rgba(255, 215, 0, 0.4));
    }
    
    .chatbot-toggle-text {
        font-size: 11px;
        font-weight: 700;
    }
    
    .chatbot-header-btn {
        width: 40px;
        height: 40px;
    }
    
    .chatbot-header-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    #chatbot-container {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    #chatbot-messages {
        padding: 16px 18px;
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }
    
    .chatbot-message-content {
        max-width: 82%;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    #chatbot-input-container {
        flex-shrink: 0;
        padding: 14px 18px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .chatbot-logo {
        width: 36px;
        height: 36px;
    }
    
    #chatbot-header p {
        font-size: 12px;
    }
    
    .chatbot-header-brand {
        gap: 10px;
    }
    
    #chatbot-toggle {
        min-width: 110px;
        height: 44px;
        padding: 0 12px;
        font-size: 10px;
    }
    
    .chatbot-toggle-emoji {
        font-size: 16px;
        filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.6)) 
                drop-shadow(0 0 4px rgba(255, 215, 0, 0.3));
    }
    
    .chatbot-toggle-text {
        font-size: 10px;
    }
    
    .chatbot-message-content {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    #chatbot-input {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    #chatbot-send {
        padding: 14px 20px;
        font-size: 13px;
        min-width: 65px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    #chatbot-toggle {
        min-width: 130px;
        height: 50px;
        padding: 0 16px;
    }
    
    #chatbot-send {
        min-height: 52px;
        padding: 16px 28px;
    }
    
    #chatbot-input {
        min-height: 52px;
    }
    
    #chatbot-toggle:hover {
        transform: translateY(-2px);
    }
    
    #chatbot-send:hover {
        transform: none;
    }
}

/* ========== Vera Pro v4 — krem, schwarz, „Referenz“-Stil ========== */

#chatbot-container {
    --vera-cream: #f0f0ea;
    --vera-cream2: #e4e4dc;
    --vera-black: #0a0a0a;
    --vera-green: #16a34a;
    --vera-border: rgba(0, 0, 0, 0.1);
    background: var(--vera-cream) !important;
    border-radius: 18px !important;
    box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.14), 0 0 0 1px var(--vera-border) !important;
    border: 1px solid var(--vera-border) !important;
}

#chatbot-header {
    background: var(--vera-cream) !important;
    color: var(--vera-black) !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--vera-border) !important;
    padding: 0 !important;
}

#chatbot-header::before,
#chatbot-header::after {
    display: none !important;
}

.chatbot-header-content {
    padding: 16px 16px 14px !important;
    align-items: flex-start !important;
}

.chatbot-header-brand {
    align-items: center !important;
    gap: 12px !important;
}

.chatbot-header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--vera-black);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chatbot-header-avatar svg {
    stroke: currentColor;
}

.chatbot-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.chatbot-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--vera-black) !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: none !important;
    white-space: normal !important;
}

.chatbot-status-line {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--vera-green) !important;
}

.chatbot-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--vera-green);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
    animation: veraPulse 2.2s ease-in-out infinite;
}

@keyframes veraPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.9);
        opacity: 0.85;
    }
}

.chatbot-header-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--vera-black) !important;
    border: 1px solid var(--vera-border) !important;
    box-shadow: none !important;
}

.chatbot-header-btn:hover {
    background: #fafaf8 !important;
    transform: none !important;
    border-color: rgba(0, 0, 0, 0.16) !important;
}

#chatbot-messages {
    background: var(--vera-cream) !important;
    padding: 16px 14px 20px !important;
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.chatbot-welcome-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chatbot-message.bot,
.chatbot-message.user {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
    max-width: 100%;
}

.chatbot-message.user {
    margin-left: auto;
    flex-direction: row-reverse;
    max-width: 90%;
}

.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--vera-border);
    color: var(--vera-black);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.chatbot-avatar svg {
    stroke: currentColor;
}

.chatbot-message.bot .chatbot-message-content {
    background: #fafaf6 !important;
    color: #1a1a1a !important;
    border: 1px solid var(--vera-border) !important;
    border-left: 1px solid var(--vera-border) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    border-radius: 14px 14px 14px 4px !important;
    line-height: 1.5;
    font-size: 14px;
    padding: 12px 14px !important;
}

.chatbot-message.user .chatbot-message-content {
    background: var(--vera-black) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 14px 14px 4px 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    line-height: 1.5;
    font-size: 14px;
    padding: 12px 14px !important;
}

.chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
    padding-left: 40px;
}

.chatbot-quick-replies[hidden] {
    display: none !important;
}

.chatbot-chip {
    appearance: none;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 9999px;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.chatbot-chip:hover {
    background: #fafaf8;
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

#chatbot-input-container {
    display: block !important;
    background: #fff !important;
    border-top: 1px solid var(--vera-border) !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.chatbot-input-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 4px;
}

#chatbot-input {
    flex: 1;
    min-width: 0;
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 12px !important;
    font-size: 15px;
    color: #1a1a1a;
    padding: 12px 14px !important;
}

#chatbot-input::placeholder {
    color: #9a9a90;
}

#chatbot-input:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.28) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08) !important;
}

#chatbot-send {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--vera-black) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0 !important;
    line-height: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

#chatbot-send:hover {
    background: #1a1a1a !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-1px);
}

#chatbot-send svg {
    display: block;
    fill: currentColor;
}

.chatbot-footer {
    margin: 0;
    padding: 0 16px 12px;
    text-align: center;
    font-size: 11px;
    line-height: 1.4;
    color: #8a8a80;
}

.chatbot-footer strong {
    color: #2a2a2a;
    font-weight: 600;
}

.chatbot-footer a {
    color: #3d3d38;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    transition: color 0.2s, border-color 0.2s;
}

.chatbot-footer a:hover {
    color: #0a0a0a;
    border-color: #0a0a0a;
}

.chatbot-footer-sep {
    margin: 0 6px;
    opacity: 0.5;
}

/* Launcher — schwarz, Icon */
#chatbot-toggle,
#chatbot-toggle.chatbot-toggle-pro {
    min-width: 0 !important;
    width: 58px !important;
    height: 58px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: var(--vera-black) !important;
    color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

#chatbot-toggle::before {
    display: none !important;
}

.chatbot-toggle-emoji,
.chatbot-toggle-text {
    display: none !important;
}

#chatbot-toggle .chatbot-toggle-text {
    display: none !important;
}

#chatbot-toggle .chatbot-toggle-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
}

#chatbot-toggle:hover {
    transform: translateY(-2px) scale(1.02) !important;
    background: #1a1a1a !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25) !important;
}

/* Tipp-Animation: neutrale Kugeln */
#typing-indicator {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 8px;
    margin-bottom: 0 !important;
}

#typing-indicator .chatbot-message-content {
    background: #fafaf6 !important;
    border: 1px solid var(--vera-border) !important;
    border-radius: 14px 14px 14px 4px !important;
    padding: 12px 16px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

#typing-indicator .chatbot-message-content span {
    background: #b8b8ae !important;
    box-shadow: none !important;
    width: 7px;
    height: 7px;
}

@media (max-width: 768px) {
    .chatbot-quick-replies {
        padding-left: 0;
    }

    #chatbot-toggle,
    #chatbot-toggle.chatbot-toggle-pro {
        width: 54px !important;
        height: 54px !important;
    }
}

/* Mit Kontakt-Hub: nur auf Desktop Kachel-Größe; mobil: volle Fläche (siehe @media 768) */
@media (min-width: 769px) {
    body.has-contact-hub #chatbot-container {
        max-width: calc(100vw - 20px) !important;
        width: min(420px, calc(100vw - 20px)) !important;
        height: min(640px, calc(100svh - 100px)) !important;
        max-height: min(640px, calc(100dvh - 100px)) !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        margin-bottom: 0 !important;
    }

    body.has-contact-hub #chatbot-messages {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    body.has-contact-hub #chatbot-input-container {
        flex-shrink: 0 !important;
    }
}

/* Mobil: kein horizontales Verschieben, kein iOS-Auto-Zoom im Eingabefeld (min. 16px) */
@media (max-width: 768px) {
    #chatbot-widget,
    #chatbot-container,
    #chatbot-messages,
    #chatbot-input-container,
    .chatbot-input-row {
        box-sizing: border-box;
        min-width: 0;
    }

    #chatbot-widget,
    #chatbot-container {
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden;
    }

    #chatbot-messages,
    .chatbot-message,
    .chatbot-message-content {
        min-width: 0;
    }

    .chatbot-message-content {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .chatbot-input-row {
        max-width: 100% !important;
    }

    #chatbot-input,
    #chatbot-input::placeholder {
        font-size: 16px !important;
    }

    #chatbot-input:focus {
        font-size: 16px !important;
    }
}
