/* Add custom Js code below */ // Shohrah Social Media Widget // Add this script to your website (function() { // Add CSS const styleElement = document.createElement("style"); styleElement.innerHTML = ` @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap"); .shohrah-container * { margin: 0; padding: 0; box-sizing: border-box; font-family: "Poppins", sans-serif; } .shohrah-container { position: fixed; /* Changed from absolute to fixed for better positioning */ bottom: 20px; /* Position from bottom instead of top */ left: 0px; /* Position from left edge with some margin */ display: flex; flex-direction: column-reverse; align-items: center; z-index: 9999; /* Ensure it stays on top of other elements */ } .media-icons { display: flex; align-items: flex-start; flex-direction: column; justify-content: center; background-color: #fff; padding: 6px; border-radius: 6px; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); transform: translateX(-100%); transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); } .close-btn.open ~ .media-icons { transform: translateX(0); } .media-icons a { text-decoration: none; position: relative; height: 35px; width: 35px; display: flex; align-items: center; justify-content: center; border-radius: 6px; margin: 6px; } .media-icons a i { color: #fff; } .media-icons a .tooltip { position: absolute; left: 55px; font-size: 14px; font-weight: 400; pointer-events: none; background-color: #fff; padding: 4px 8px; border-radius: 4px; transform: translateY(-25px); opacity: 0; transition: all 0.2s linear; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05); } a:hover .tooltip { opacity: 1; transform: translateY(0); } a .tooltip::before { content: ""; position: absolute; height: 10px; width: 10px; top: 50%; left: -5px; transform: translateY(-50%) rotate(45deg); background-color: #fff; } .close-btn { display: flex; align-items: center; justify-content: center; height: 35px; width: 35px; border-radius: 50%; color: #fff; font-size: 18px; margin-bottom: 10px; /* Changed from margin-top to margin-bottom */ background-color: #215c68; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); cursor: pointer; transform: rotate(45deg); transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); } .close-btn.open { transform: rotate(90deg); background-color: #de0611; }`; document.head.appendChild(styleElement); // Add FontAwesome const fontAwesomeLink = document.createElement("link"); fontAwesomeLink.rel = "stylesheet"; fontAwesomeLink.href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css"; document.head.appendChild(fontAwesomeLink); // Add HTML const socialWidgetContainer = document.createElement("div"); socialWidgetContainer.innerHTML = `