/* Butoni 💬 fiks ne fund të ekranit */
#chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #002d72;
    color: #fff;
    width: 50px;
    height: 50px;
    font-size: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
    z-index: 9999;
}

#chatbot-toggle:hover {
    background: #001a47;
}

/* Chatbox sipër butonit */
#chatbot-container {
    position: fixed;
    bottom: 70px;
    right: 80px;
    width: 300px;
    display: none;
    z-index: 9998;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#chatbot-container.active {
    display: block;
    opacity: 1;
    transform: scale(1);
}

#chatbot-box {
    width: 100%;
    max-height: 720px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
	overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 0;
}

#chatbot-header {
    background-color: #002d72;
    color: white;
    font-weight: 600;
    font-size: 16px;
    padding: 14px;
    border-radius: 16px 16px 0 0;
    text-align: center;
    position: relative;
    margin: -16px -16px 10px -16px;
}

/* Mesazhet */
#chatbot-messages {
    max-height: 430px;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-right: 5px;
    display: block;
	text-align: initial;
	display: block;
    text-align: initial;
}

/* Mesazhe */
.bot-msg, .user-msg {
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 75%;
    font-size: 12px;
    line-height: 1.5;
    margin: 6px 0;
    display: inline-block;
    word-wrap: break-word;
    clear: both;
}

.bot-msg {
    background: #f1f1f1;
    color: #333;
    float: left;
    margin-left: 6px;
    border-bottom-left-radius: 6px;
}

.user-msg {
    background: #002d72;
    color: white;
    float: right;
    margin-right: 6px;
    
}

/* Butonat e opsioneve */
#chatbot-container .chat-option {
    all: unset;
    display: block;
    background: #002d72;
    color: white;
    border: 1px solid #002d72 !important;
    padding: 8px 14px !important;
    border-radius: 22px !important;
    cursor: pointer;
    font-size: 12px !important;
    margin: 4px auto;
    width: 50%;
    max-width: 70%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: right;
    transition: all 0.2s ease;
	margin-right: 4px;
}
#chatbot-container .chat-option:hover {
    color: #ffe600;
}
#chatbot-toggle-wrapper {
  position: fixed;
  bottom: 30px;
  right: 75px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
}

#chatbot-toggle-wrapper {
  position: fixed;
  bottom: 30px;
  right: 80px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
}

#chatbot-hint-text {
  background: #002d72;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
  animation: fadeIn 0.3s ease-in-out;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#chatbot-hint-text.hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

/* Ikona me rreth dhe valë */
.chatbot-icon-circle {
  width: 50px;
  height: 50px;
  background-color: #002d72;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  animation: pulse 5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 230, 0, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 230, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 230, 0, 0.5);
  }
}
@keyframes chatbotFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#chatbot-container.active {
  animation: chatbotFadeInUp 0.4s ease-out;
}
.chat-link {
    color: #007bff;
    text-decoration: underline;
    font-weight: 500;
}
.chat-link:hover {
    text-decoration: none;
}
#chatbot-hint-text.fade-out {
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}




/* 📱 Mobile optimization (max 624px) */
@media (max-width: 600px) {
    #chatbot-container {
		position:fixed !important;
        right: 17vw!important;
        bottom: 60px!important;
		width: 70vw;
		left:auto;
	}
	html, body{
		overflow-x:hidden;
		overscroll-behavior: none;
	}	
    #chatbot-box {
        max-height: 195vh;
        padding: 14px;
		max-width:100vw;
		box-sizing:border-box;
    }

    #chatbot-header {
        font-size: 15px;
        padding: 12px;
    }

    .bot-msg, .user-msg {
        font-size: 11px;
        padding: 7px 11px;
    }

    .chat-option {
        font-size: 10px;
        padding: 7px 12px;
		word-break:break-word;
		overflow-wrap:break-word;
		max-width:100vw;
		box-sizing:border-box;
		
		
    }

    #chatbot-toggle {
		position:fixed!important;
		right: 5vw!important;
        bottom: 25px!important;
        width: 50px !important;
        height: 50px !important;
        font-size: 20px;
    }
}

/* 🧾 Tablet optimization (625px - 1024px) */
@media (min-width: 601px) and (max-width: 1024px) {
    #chatbot-container {
        width: 280px;
        right: 50px;
        bottom: 80px;
    }

    #chatbot-box {
        max-height: 100vh;
        padding: 16px;
    }

    .chat-option {
        
		display: inline-block;
        float: right;
        margin-right: 10px;
        text-align: right;
    }

    .bot-msg, .user-msg {
        font-size: 12px;
    }

    #chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}