/**
 * FitUp LeadGen – Chatbot Widget Styles v4.0
 * Statische Styles fuer das Chat-Widget
 * Dynamische Werte (Farben, Position, Groesse) werden inline per PHP gesetzt
 */

/* Toggle Button */
#fcb-toggle {
    position: fixed;
    z-index: 99999;
    width: var(--fcb-bs);
    height: var(--fcb-bs);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--fcb-c);
    color: #fff;
    box-shadow: 0 6px 28px rgba(0,0,0,.2);
    transition: all .3s cubic-bezier(.4,0,.2,1);
    display: flex;
    align-items: center;
    justify-content: center;
}
#fcb-toggle:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}
#fcb-toggle svg {
    width: 28px;
    height: 28px;
    fill: #fff;
    transition: all .3s;
}
#fcb-toggle.open .fcb-ico-chat { display: none; }
#fcb-toggle.open .fcb-ico-close { display: block; }
#fcb-toggle .fcb-ico-close { display: none; }

/* Widget Container */
#fcb-widget {
    position: fixed;
    z-index: 99998;
    width: var(--fcb-w);
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: var(--fcb-r);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(.96);
    pointer-events: none;
    transition: all .35s cubic-bezier(.4,0,.2,1);
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
}
#fcb-widget.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header */
.fcb-header {
    background: linear-gradient(135deg, var(--fcb-c), color-mix(in srgb, var(--fcb-c) 85%, #000));
    color: #fff;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.fcb-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}
.fcb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.fcb-header-info {
    flex: 1;
    min-width: 0;
}
.fcb-header-name {
    font-weight: 700;
    font-size: calc(var(--fcb-fs) + 1px);
}
.fcb-header-status {
    font-size: calc(var(--fcb-fs) - 2px);
    opacity: .85;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.fcb-header-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #7fff7f;
    border-radius: 50%;
    flex-shrink: 0;
}
.fcb-close {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.fcb-close:hover {
    background: rgba(255,255,255,.3);
}

/* Messages Area */
.fcb-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    background: #f7f8fa;
    min-height: var(--fcb-mh);
    max-height: 60vh;
    scroll-behavior: smooth;
}
.fcb-messages::-webkit-scrollbar {
    width: 5px;
}
.fcb-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

/* Message Bubbles */
.fcb-msg {
    max-width: 85%;
    padding: 12px 16px;
    margin-bottom: 10px;
    font-size: var(--fcb-fs);
    line-height: 1.6;
    word-wrap: break-word;
    animation: fcbSlideIn .3s ease;
    white-space: pre-line;
}
@keyframes fcbSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.fcb-msg.bot {
    background: #fff;
    border-radius: 4px 18px 18px 18px;
    color: var(--fcb-fc);
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.fcb-msg.user {
    background: var(--fcb-c);
    color: #fff;
    border-radius: 18px 4px 18px 18px;
    margin-left: auto;
}

/* Typing Indicator */
.fcb-typing {
    display: flex;
    gap: 5px;
    padding: 14px 18px;
}
.fcb-typing span {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    animation: fcbBounce 1.2s infinite;
}
.fcb-typing span:nth-child(2) { animation-delay: .2s; }
.fcb-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes fcbBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Slot Buttons */
.fcb-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    max-width: 90%;
}
.fcb-slot-btn {
    background: var(--fcb-c);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: calc(var(--fcb-fs) - 1px);
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.fcb-slot-btn:hover {
    filter: brightness(1.12);
    transform: scale(1.03);
}
.fcb-slot-btn:active {
    transform: scale(.97);
}

/* Decline Button */
.fcb-decline-btn {
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: calc(var(--fcb-fs) - 2px);
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    margin-top: 4px;
}
.fcb-decline-btn:hover {
    border-color: #bbb;
    color: #666;
}

/* DSGVO Consent Box */
.fcb-gdpr-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    padding: 16px;
    margin: 10px 0;
    max-width: 90%;
    animation: fcbSlideIn .3s ease;
}
.fcb-gdpr-text {
    font-size: calc(var(--fcb-fs) - 1px);
    color: #555;
    line-height: 1.5;
    margin-bottom: 12px;
}
.fcb-gdpr-text a {
    color: var(--fcb-c);
    text-decoration: underline;
}
.fcb-gdpr-buttons {
    display: flex;
    gap: 8px;
}
.fcb-gdpr-accept {
    background: var(--fcb-c);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: var(--fcb-fs);
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    font-weight: 600;
}
.fcb-gdpr-accept:hover {
    filter: brightness(1.1);
}
.fcb-gdpr-decline {
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: var(--fcb-fs);
    font-family: inherit;
    cursor: pointer;
}

/* Summary Box */
.fcb-summary-box {
    background: #fff;
    border: 2px solid var(--fcb-c);
    border-radius: 14px;
    padding: 18px;
    margin: 10px 0;
    max-width: 90%;
    animation: fcbSlideIn .3s ease;
}
.fcb-summary-title {
    font-weight: 700;
    font-size: calc(var(--fcb-fs) + 1px);
    color: var(--fcb-c);
    margin-bottom: 10px;
}
.fcb-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: calc(var(--fcb-fs) - 1px);
    border-bottom: 1px solid #f0f0f0;
}
.fcb-summary-label {
    color: #888;
}
.fcb-summary-value {
    font-weight: 600;
    color: var(--fcb-fc);
}

/* Book Button */
.fcb-book-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    background: var(--fcb-c);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: calc(var(--fcb-fs) + 1px);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.fcb-book-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}
.fcb-book-btn:active {
    transform: scale(.98);
}
.fcb-book-btn:disabled {
    opacity: .6;
    cursor: default;
    transform: none;
}

/* Input Bar */
.fcb-input-bar {
    display: flex;
    align-items: center;
    border-top: 1px solid #eee;
    padding: 10px 12px 10px 18px;
    background: #fff;
    gap: 10px;
}
.fcb-input-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: var(--fcb-fs);
    font-family: inherit;
    padding: 10px 0;
    color: var(--fcb-fc);
    background: transparent;
}
.fcb-input-bar input::placeholder {
    color: #aaa;
}
.fcb-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--fcb-c);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}
.fcb-send-btn:hover {
    filter: brightness(1.1);
}
.fcb-send-btn:disabled {
    opacity: .4;
    cursor: default;
}
.fcb-send-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* Powered By */
.fcb-powered {
    text-align: center;
    padding: 6px;
    font-size: 10px;
    color: #bbb;
    background: #fff;
    border-top: 1px solid #f5f5f5;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #fcb-widget {
        bottom: 0 !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100%;
        max-width: 100%;
        border-radius: var(--fcb-r) var(--fcb-r) 0 0;
        margin-top: 0;
        max-height: 85vh;
    }
    .fcb-messages {
        max-height: 55vh;
    }
    #fcb-toggle {
        bottom: 16px !important;
        top: auto !important;
    }
}
