/* === VV Schierstein Chatbot Widget === */

#vvs-chatbot {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    font-family: var(--font-body, 'Noto Sans', Arial, sans-serif);
}

.chatbot-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--color-primary, #0d1b40);
    color: var(--color-white, #fff);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: all 0.2s ease;
    min-height: 48px;
}

.chatbot-toggle-btn:hover {
    background-color: var(--color-primary-hover, #162a5e);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.chatbot-toggle-btn svg {
    flex-shrink: 0;
}

.chatbot-window {
    position: absolute;
    bottom: calc(100% + 1rem);
    right: 0;
    width: 340px;
    max-width: calc(100vw - 2rem);
    background: var(--color-white, #fff);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border: 1px solid #e0e0e0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

.chatbot-window[hidden] {
    display: none;
}

.chatbot-header {
    background: var(--color-primary, #0d1b40);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chatbot-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-body, inherit);
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
    border-radius: 4px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: rgba(255,255,255,0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
}

.chatbot-msg {
    max-width: 85%;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chatbot-msg.bot {
    background: #f0f4ff;
    border: 1px solid #dde4f5;
    align-self: flex-start;
    border-radius: 4px 12px 12px 12px;
}

.chatbot-msg.user {
    background: var(--color-primary, #0d1b40);
    color: white;
    align-self: flex-end;
    border-radius: 12px 4px 12px 12px;
}

.chatbot-msg a {
    color: var(--color-primary, #0d1b40);
    font-weight: 600;
}

.chatbot-msg.bot a {
    color: var(--color-primary, #0d1b40);
}

.chatbot-msg.user a {
    color: var(--color-accent, #f5c400);
}

.chatbot-quick-btns {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.chatbot-quick-btn {
    background: #f0f4ff;
    border: 1px solid #c5d0e8;
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--color-primary, #0d1b40);
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.chatbot-quick-btn:hover {
    background: var(--color-accent, #f5c400);
    border-color: var(--color-accent, #f5c400);
}

.chatbot-input-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 2px solid #ddd;
    border-radius: 24px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: var(--color-primary, #0d1b40);
}

.chatbot-send-btn {
    background: var(--color-primary, #0d1b40);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    background: var(--color-primary-hover, #162a5e);
}

/* === Chatbot inline contact form === */

.chatbot-contact-card {
    max-width: 100%;
    padding: 0;
    background: transparent;
    border: none;
}

.chatbot-contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f0f4ff;
    border: 1px solid #dde4f5;
    border-radius: 4px 12px 12px 12px;
    padding: 0.75rem;
}

.chatbot-contact-form input,
.chatbot-contact-form textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #c5d0e8;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.chatbot-contact-form input:focus,
.chatbot-contact-form textarea:focus {
    border-color: var(--color-primary, #0d1b40);
}

.chatbot-contact-form textarea {
    resize: vertical;
    min-height: 70px;
}

.chatbot-contact-form .ccf-send {
    align-self: flex-start;
    padding: 0.5rem 1.1rem;
    font-size: 0.88rem;
    background: var(--color-primary, #0d1b40);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s;
}

.chatbot-contact-form .ccf-send:hover:not(:disabled) {
    background: var(--color-primary-hover, #162a5e);
}

.chatbot-contact-form .ccf-send:disabled {
    opacity: 0.6;
    cursor: default;
}

.chatbot-contact-form .ccf-err {
    margin: 0;
    font-size: 0.82rem;
    color: #c0392b;
    min-height: 1.2em;
}

.chatbot-contact-form .ccf-success {
    margin: 0;
    font-size: 0.9rem;
    color: #1a6e38;
    font-weight: 600;
}

/* Mobile chatbot positioning */
@media (max-width: 480px) {
    #vvs-chatbot {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .chatbot-window {
        width: 100%;
        right: 0;
        left: 0;
        bottom: calc(100% + 0.75rem);
    }

    .chatbot-toggle-btn {
        width: 100%;
        justify-content: center;
    }
}
