   /* Chat icon styles */
        #tifaChatIcon {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background-image: url('https://chat.portibook.com/images/avatars/9.png');
            background-size: calc(100% - 10px);
            background-position: center;
            background-repeat: no-repeat;
            background-color: #fff;
            cursor: pointer;
            z-index: 1000;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            border: 3px solid #fff;
        }

        #tifaChatIcon:hover {
            transform: scale(1.1) rotate(5deg);
            box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
        }

        #tifaChatBubble {
            position: fixed;
            bottom: 110px;
            right: 30px;
            background-color: #fff;
            color: #333;
            padding: 12px 20px;
            border-radius: 20px;
            font-size: 16px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.3s ease;
            z-index: 999;
        }

        #tifaChatBubble::after {
            content: '';
            position: absolute;
            bottom: -10px;
            right: 20px;
            border-width: 10px 10px 0;
            border-style: solid;
            border-color: #fff transparent transparent transparent;
        }

        #tifaChatIcon:hover + #tifaChatBubble {
            opacity: 1;
            transform: translateY(0);
        }

        /* Styles for the pop-up */
        #tifaChatPopup {
            position: fixed;
            bottom: 70px;
            right: 30px;
            width: 380px;
            height: 600px;
            max-width: 95%;
            max-height: 80vh;
            background-color: #fff;
            border-radius: 20px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
            display: none;
            flex-direction: column;
            overflow: hidden;
            z-index: 1001;
            
            animation: slideIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);

        }

        #tifaChatPopupHeader {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            font-size: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        #tifaChatPopupBody {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            background-color: #f7f9fc;
        }

        #tifaChatForm input,
        #tifaChatForm textarea {
            width: calc(100% - 20px);
            margin-bottom: 15px;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid #e1e5e9;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        #tifaChatForm input:focus,
        #tifaChatForm textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        #tifaChatForm button {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        #tifaChatForm button:hover:enabled {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }

        #tifaChatForm button:disabled {
            background: #a0aec0;
            cursor: not-allowed;
        }

        .chat-message {
            padding: 12px 16px;
            border-radius: 18px;
            margin-bottom: 15px;
            max-width: 80%;
            animation: fadeIn 0.5s ease;
        }

        .chat-message-user {
            background-color: #dcf8c6;
            align-self: flex-end;
            margin-left: auto;
            border-bottom-right-radius: 4px;
        }

        .chat-message-system {
            background-color: #fff;
            align-self: flex-start;
            border-bottom-left-radius: 4px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }

        #tifaChatFooter {
            display: flex;
            align-items: center;
            padding: 15px;
            background-color: #fff;
            border-top: 1px solid #e1e5e9;
        }

        #messageInput {
            flex: 1;
            padding: 12px;
            border: 1px solid #e1e5e9;
            border-radius: 20px;
            font-size: 14px;
            resize: none;
            transition: all 0.3s ease;
        }

        #messageInput:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        #sendMessageButton {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            margin-left: 10px;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: all 0.3s ease;
        }

        #sendMessageButton:hover:enabled {
            transform: scale(1.1);
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
        }

        #sendMessageButton:disabled {
            background: #a0aec0;
            cursor: not-allowed;
        }

        .typing-indicator {
            background-color: #f1f3f5;
            padding: 12px 16px;
            border-radius: 18px;
            margin-bottom: 15px;
            align-self: flex-start;
            display: inline-block;
            animation: fadeIn 0.5s ease;
        }

        .typing-indicator::after {
            content: '';
            display: inline-block;
            width: 30px;
            height: 15px;
            background-image: url("data:image/svg+xml,%3Csvg width='30' height='15' viewBox='0 0 120 30' xmlns='http://www.w3.org/2000/svg' fill='%23999'%3E%3Ccircle cx='15' cy='15' r='15'%3E%3Canimate attributeName='r' from='15' to='15' begin='0s' dur='0.8s' values='15;9;15' calcMode='linear' repeatCount='indefinite' /%3E%3Canimate attributeName='fill-opacity' from='1' to='1' begin='0s' dur='0.8s' values='1;.5;1' calcMode='linear' repeatCount='indefinite' /%3E%3C/circle%3E%3Ccircle cx='60' cy='15' r='9' fill-opacity='0.3'%3E%3Canimate attributeName='r' from='9' to='9' begin='0s' dur='0.8s' values='9;15;9' calcMode='linear' repeatCount='indefinite' /%3E%3Canimate attributeName='fill-opacity' from='0.5' to='0.5' begin='0s' dur='0.8s' values='.5;1;.5' calcMode='linear' repeatCount='indefinite' /%3E%3C/circle%3E%3Ccircle cx='105' cy='15' r='15'%3E%3Canimate attributeName='r' from='15' to='15' begin='0s' dur='0.8s' values='15;9;15' calcMode='linear' repeatCount='indefinite' /%3E%3Canimate attributeName='fill-opacity' from='1' to='1' begin='0s' dur='0.8s' values='1;.5;1' calcMode='linear' repeatCount='indefinite' /%3E%3C/circle%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: center;
        }

        @keyframes slideIn {
            from { transform: translateY(100%); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        @keyframes slideOut {
            from { transform: translateY(0); opacity: 1; }
            to { transform: translateY(100%); opacity: 0; }
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* Responsive Design */
        @media (max-width: 480px) {
            #tifaChatPopup {
                width: 92%;
                height: 80vh;
                bottom: 30px;
                right: 6px;
                border-radius: 20px;
            }

            #tifaChatIcon {
                bottom: 20px;
                right: 20px;
            }

            #tifaChatBubble {
                bottom: 90px;
                right: 20px;
            }
        }

 #tifaChatPopupHeader button {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            height: 20px;
        }

        #tifaChatPopupHeader button span {
            display: block;
            height: 2px;
            background-color: white;
            width: 24px;
            transition: all 0.3s ease;
        }

        #tifaChatPopupHeader button.open span:nth-child(1) {
            transform: rotate(45deg) translate(5px, 5px);
        }

        #tifaChatPopupHeader button.open span:nth-child(2) {
            opacity: 0;
        }

        #tifaChatPopupHeader button.open span:nth-child(3) {
            transform: rotate(-45deg) translate(5px, -5px);
        }

        .dropdown {
            position: absolute;
            top: 60px;
            right: 20px;
            background-color: white;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            overflow: hidden;
            display: none;
            z-index: 1;
        }

        .dropdown a {
            display: block;
            padding: 12px 20px;
            color: #333;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .dropdown a:hover {
            background-color: #f7f9fc;
        }