triggerBtnBg ?? '#2b446d'; // Convert RGB color to hex if needed (database might have rgb(r,g,b) format) $color = trim($color); if (strpos($color, 'rgb') !== false) { preg_match('/rgb\((\d+),\s*(\d+),\s*(\d+)\)/', $color, $matches); if (count($matches) === 4) { $color = sprintf("#%02x%02x%02x", $matches[1], $matches[2], $matches[3]); } else { $color = '#2b446d'; // Fallback } } $position = $site_options->buttonPosition ?? 'bottom-right'; $size = $site_options->triggerBtnSize ?? '55'; $icon = $site_options->triggerSVG ?? 'Default'; $shape = $site_options->triggerBtnRadius ?? '50'; $white_label = $site_options->isWhitelabel ?? false; ?>