.bot-widget-container { 
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    z-index: 9999; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; 
}
.bot-widget-button { 
    width: 72px; 
    height: 72px; 
    border-radius: 50%; 
    background: var(--widget-color, #0088cc); 
    color: white; 
    border: none; 
    cursor: pointer; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 29px; 
    transition: all 0.3s ease; 
}
.bot-widget-button:hover { 
    transform: scale(1.1); 
    box-shadow: 0 6px 16px rgba(0,0,0,0.2); 
}
.bot-widget-window { 
    position: absolute; 
    bottom: 96px; 
    right: 0; 
    width: var(--widget-width, 456px); 
    max-width: calc(100vw - 40px); 
    height: var(--widget-height, 720px); 
    max-height: calc(100vh - 100px); 
    background: white; 
    border-radius: var(--widget-border-radius, 20px); 
    overflow: hidden; 
    box-shadow: 0 8px 32px rgba(0,0,0,0.2); 
    display: flex; 
    flex-direction: column; 
    opacity: 0; 
    transform: translateY(20px) scale(0.9); 
    transition: all 0.3s ease; 
    pointer-events: none; 
}
.bot-widget-window.open { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
    pointer-events: all; 
}
.bot-widget-header { 
    background: var(--widget-color, #0088cc); 
    color: white; 
    padding: 19px 24px; 
    border-radius: var(--widget-border-radius, 20px) var(--widget-border-radius, 20px) 0 0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.bot-widget-header h3 { 
    margin: 0; 
    font-size: var(--widget-header-title-size, 22px); 
    font-weight: 600; 
    color: var(--widget-header-title-color, white); 
    font-family: var(--widget-header-title-font, inherit); 
}
.bot-widget-close { 
    background: none; 
    border: none; 
    color: var(--widget-close-color, white); 
    font-size: var(--widget-close-size, 29px); 
    font-family: var(--widget-close-font, inherit); 
    cursor: pointer; 
    padding: 0; 
    width: 36px; 
    height: 36px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    transition: background 0.2s; 
}
.bot-widget-close:hover { 
    background: rgba(255,255,255,0.2); 
}
.bot-widget-messages { 
    flex: 1; 
    overflow-y: auto; 
    padding: 24px; 
    display: flex; 
    flex-direction: column; 
    gap: 14px; 
}
.bot-widget-message { 
    max-width: 100%; 
    padding: 14px 19px; 
    border-radius: 14px; 
    word-wrap: break-word; 
    line-height: 1.6; 
    white-space: pre-wrap; 
}
.bot-widget-message.user { 
    align-self: flex-end; 
    background: var(--widget-color, #0088cc); 
    color: white; 
    border-bottom-right-radius: 5px; 
}
.bot-widget-message.bot { 
    align-self: flex-start; 
    background: #f1f3f5; 
    color: #333; 
    border-bottom-left-radius: 5px; 
}
.bot-widget-message strong { 
    font-weight: 600; 
}
.bot-widget-message em { 
    font-style: italic; 
}
.bot-widget-message code { 
    background: rgba(0,0,0,0.1); 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-family: monospace; 
    font-size: 0.9em; 
}
.bot-widget-message.user code { 
    background: rgba(255,255,255,0.2); 
}
.bot-widget-message a { 
    color: var(--widget-color, #0088cc); 
    text-decoration: underline; 
    word-break: break-all; 
}
.bot-widget-message a:hover { 
    opacity: 0.85; 
}
.bot-widget-message.user a { 
    color: rgba(255,255,255,0.95); 
    text-decoration: underline; 
}
.bot-widget-input-area { 
    padding: 19px; 
    border-top: 1px solid #e0e0e0; 
    border-radius: 0 0 var(--widget-border-radius, 20px) var(--widget-border-radius, 20px); 
    display: flex; 
    gap: 10px; 
}
.bot-widget-input { 
    flex: 1; 
    padding: 14px 19px; 
    border: 1px solid #ddd; 
    border-radius: 29px; 
    font-size: 17px; 
    outline: none; 
    color: #333; 
    background: white; 
}
.bot-widget-input::placeholder { 
    color: #999; 
}
.bot-widget-input:focus { 
    border-color: var(--widget-color, #0088cc); 
}
.bot-widget-send { 
    width: 48px; 
    height: 48px; 
    border-radius: 50%; 
    background: var(--widget-color, #0088cc); 
    color: white; 
    border: none; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 22px; 
    transition: all 0.2s; 
}
.bot-widget-send:hover { 
    transform: scale(1.1); 
}
.bot-widget-send:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
    transform: none; 
}
.bot-widget-loading { 
    display: inline-block; 
    width: 24px; 
    height: 24px; 
    border: 4px solid rgba(255,255,255,0.3); 
    border-top-color: white; 
    border-radius: 50%; 
    animation: spin 0.8s linear infinite; 
}
@keyframes spin { 
    to { transform: rotate(360deg); } 
}

