/* Stylesheet for public floating widget component */
.bbt-chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.bbt-chat-widget-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
.bbt-chat-widget-icon {
    width: 28px;
    height: 28px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.bbt-chat-widget-icon.has-bg {
    background-image: var(--widget-icon-url);
}
.bbt-chat-widget-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    height: 420px;
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.bbt-chat-widget-window.hidden {
    display: none;
}
.bbt-chat-widget-header {
    background-color: #1e293b;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #334155;
}
.bbt-chat-widget-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #475569;
    background-size: cover;
    background-position: center;
}
.bbt-chat-widget-avatar.has-bg {
    background-image: var(--avatar-bg-url);
}
.bbt-chat-widget-badge.hidden {
    display: none;
}
.bbt-chat-widget-header-text {
    display: flex;
    flex-direction: column;
}
.bbt-chat-widget-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
}
.bbt-chat-widget-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
}
.bbt-chat-widget-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #0f172a;
}
.bbt-chat-bubble {
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 85%;
    font-size: 0.875rem;
    line-height: 1.25rem;
}
.bot-bubble {
    background-color: #1e293b;
    color: #ffffff;
    align-self: flex-start;
    border-radius: 8px 8px 8px 0;
}
.user-bubble {
    background-color: #3b82f6;
    color: #ffffff;
    align-self: flex-end;
    border-radius: 8px 8px 0 8px;
}
.bbt-chat-widget-input-area {
    padding: 10px;
    background-color: #1e293b;
    border-top: 1px solid #334155;
    display: flex;
    gap: 8px;
}
.bbt-chat-widget-input {
    flex: 1;
    padding: 6px;
    background-color: #0f172a;
    border: 1px solid #475569;
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.85rem;
    outline: none;
}
.bbt-chat-widget-input:focus {
    border-color: #3b82f6;
}
.bbt-chat-widget-send {
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}
@keyframes pulse {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(0.9); opacity: 1; }
}

.bbt-chat-cert-wrap {
    margin-top: 8px;
    width: 100%;
}
.bbt-chat-cert-preview {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #334155;
}
.bbt-chat-action-btn {
    margin-top: 8px;
    width: 100%;
    background-color: #6c757d;
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}
.bbt-chat-action-btn.primary {
    background-color: #3b82f6;
}
.bbt-chat-action-btn.success {
    background-color: #10b981;
}

/* =========================================================================
   Chat Box Forms custom input styling
   ========================================================================= */

.wbfb-chat-select-wrap,
.wbfb-chat-radio-wrap,
.wbfb-chat-checkbox-wrap,
.wbfb-chat-checkbox-group-wrap,
.wbfb-chat-range-wrap,
.wbfb-chat-signature-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
}

.bbt-chat-widget-select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #334155;
    background-color: #1e293b;
    color: #ffffff;
}

.bbt-chat-choice-btn {
    width: 100%;
    padding: 8px 12px;
    background-color: #334155;
    color: #ffffff;
    border: 1px solid #475569;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.1s ease;
}

.bbt-chat-choice-btn:hover {
    background-color: #475569;
}

.bbt-chat-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #ffffff;
}

.bbt-chat-widget-slider {
    width: 100%;
    cursor: pointer;
}

.bbt-chat-slider-value {
    text-align: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: #60a5fa;
}

.bbt-chat-signature-canvas {
    border: 1px solid #334155;
    border-radius: 6px;
    background-color: #ffffff;
    cursor: crosshair;
    width: 100%;
    max-width: 280px;
    height: 120px;
}

.bbt-chat-signature-actions {
    display: flex;
    gap: 8px;
}

