/* Rank Brain Webchat for GoHighLevel v1.0.0 */

.rbwg-root {
    --rbwg-primary: #026392;
    --rbwg-primary-dark: #024e75;
    --rbwg-panel-bg: #F5F5F3;
    --rbwg-intro-bg: #E8EEF5;
    --rbwg-text: #1F1F1F;
    --rbwg-muted: #6B6B6B;
    --rbwg-border: rgba(0,0,0,0.08);
    --rbwg-shadow: 0 10px 40px rgba(0,0,0,0.15);
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.4;
}

.rbwg-root *,
.rbwg-root *::before,
.rbwg-root *::after {
    box-sizing: border-box;
}

.rbwg-bubble {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--rbwg-primary);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 14px 22px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--rbwg-shadow);
    transition: transform 0.15s ease, background 0.15s ease;
    font-family: inherit;
    line-height: 1;
}
.rbwg-bubble:hover {
    background: var(--rbwg-primary-dark);
    transform: translateY(-1px);
}
.rbwg-bubble:focus-visible {
    outline: 3px solid rgba(0,0,0,0.2);
    outline-offset: 2px;
}
.rbwg-bubble-icon { flex: 0 0 auto; }
.rbwg-bubble-text { white-space: nowrap; }

.rbwg-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: var(--rbwg-panel-bg);
    border-radius: 14px;
    box-shadow: var(--rbwg-shadow);
    overflow: hidden;
    animation: rbwg-in 0.18s ease-out;
}
@keyframes rbwg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.rbwg-panel[hidden] { display: none; }

.rbwg-panel-header {
    background: var(--rbwg-primary);
    color: #ffffff;
    padding: 16px 44px 16px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    position: relative;
}
.rbwg-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    opacity: 0.85;
    font-family: inherit;
}
.rbwg-close:hover { opacity: 1; }

.rbwg-panel-body { padding: 16px 18px 18px; }

.rbwg-intro-bubble {
    background: var(--rbwg-intro-bg);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--rbwg-text);
    margin-bottom: 14px;
    display: inline-block;
    max-width: 90%;
}

.rbwg-form {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px 18px 18px;
    border: 1px solid var(--rbwg-border);
    margin: 0;
}
.rbwg-field {
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.12);
    padding-bottom: 6px;
    transition: border-color 0.15s ease;
}
.rbwg-field:last-of-type { margin-bottom: 6px; }
.rbwg-field label {
    display: block;
    font-size: 12px;
    color: var(--rbwg-muted);
    margin-bottom: 2px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.rbwg-field input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--rbwg-text);
    padding: 2px 0;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
}
.rbwg-field-active { border-bottom-color: var(--rbwg-primary); }
.rbwg-field-active label {
    color: var(--rbwg-primary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.rbwg-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rbwg-compliance {
    font-size: 11px;
    color: var(--rbwg-muted);
    line-height: 1.45;
    margin: 14px 0;
}

.rbwg-submit {
    display: block;
    margin: 0 auto;
    background: var(--rbwg-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 11px 40px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    opacity: 0.45;
    transition: opacity 0.15s ease, background 0.15s ease;
    min-width: 140px;
}
.rbwg-submit:not(:disabled) { opacity: 1; }
.rbwg-submit:not(:disabled):hover { background: var(--rbwg-primary-dark); }
.rbwg-submit:disabled { cursor: not-allowed; }
.rbwg-submit.rbwg-loading { opacity: 0.7; cursor: wait; }

.rbwg-error {
    color: #B3261E;
    font-size: 13px;
    margin: 10px 0 0;
    text-align: center;
}

.rbwg-success {
    padding: 40px 24px;
    text-align: center;
    color: var(--rbwg-primary);
}
.rbwg-success p {
    color: var(--rbwg-text);
    font-size: 15px;
    margin: 14px 0 0;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .rbwg-root { bottom: 14px; right: 14px; left: 14px; }
    .rbwg-bubble { margin-left: auto; display: flex; width: fit-content; }
    .rbwg-panel {
        right: 0;
        left: 0;
        width: auto;
        max-width: none;
        bottom: 68px;
    }
}
