/* assets/chatbot.css */
/* Add to your chatbot.css */

#openai-chatbot-container {
  position: fixed;
    bottom: 22px;
    right: 30px;
    width: 400px;
    max-width: 95%;
    height: 90%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 99999;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	font-size: 14px;
  overflow: hidden;
}
#openai-chatbot-container.active {
    transform: translateY(0);
    opacity: 1;
}
#openai-chatbot-container.closed {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#chatbot-launcher {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e291f 0%, #16A085 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    transition: all 0.3s ease;
}
#chatbot-launcher img.chatbot-avatar-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 2;
  position: relative;
}
/* Video-style ripple animation */
#chatbot-launcher::before,
#chatbot-launcher::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid #50b6a8;
  border-radius: 50%;
  opacity: 0;
  z-index: 1;
  animation: launcher-ripple 2.4s infinite ease-out;
}

#chatbot-launcher::after {
  animation-delay: 1.2s;
}

@keyframes launcher-ripple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}
#chatbot-launcher:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.pre-chat-form {
  padding: 20px;
  background-color: #fdfdfd;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  max-width: 350px;
  margin: auto;
  flex: 1;
  overflow-y: auto;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

/* Card layout */
.prechat-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.prechat-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.prechat-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

/* Form fields */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  color: #444;
  margin-bottom: 5px;
}

.form-group input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  border-color: #50b6a8;
  outline: none;
}

/* Button styling */
#prechat-submit {
  padding: 12px;
  background-color: #50b6a8;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#prechat-submit:hover {
  background-color: #429c90;
}

#prechat-submit:disabled {
  background-color: #7a9e97;
  cursor: not-allowed;
}
.chatbot-messages ul,
.chatbot-messages ol {
  margin: 0 0 0.75em 1.80em;
}

.chatbot-header {
    background: linear-gradient(135deg, #1e291f 0%, #16A085 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    position: relative;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    position: relative;
}
img.chatbot-avatar-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 2;
  position: relative;
}


.avatar-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: pulse 2s infinite;
    z-index: 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.chatbot-info {
    flex: 1;
}

.chatbot-info h3 {
    margin: 0 0 3px;
    font-size: 18px;
    font-weight: 600;
}

.chatbot-info p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.chatbot-minimize, .chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    transition: all 0.2s ease;
}

.chatbot-minimize:hover, .chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 85%;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-message {
    align-self: flex-end;
}

.bot-message {
    align-self: flex-start;
}

.message-content {
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
    line-height: 1.5;
}

.user-message .message-content {
    background: #16A085;
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message .message-content {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 5px;
}

.chatbot-typing-indicator {
    background: #f1f1f1;
    padding: 10px 15px;
    display: none;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.typing-text {
    margin-right: 10px;
}

.typing-animation {
    display: flex;
}

.dot {
    width: 8px;
    height: 8px;
    background: #888;
    border-radius: 50%;
    margin: 0 3px;
    animation: typing 1.4s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

.chatbot-input-container {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
}

#chatbot-user-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 15px;
    transition: border-color 0.3s;
}

#chatbot-user-input:focus {
    border-color: #6a11cb;
}

#chatbot-send-button {
    background: linear-gradient(135deg, #1e291f 0%, #16A085 100%);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

#chatbot-send-button:hover {
    transform: scale(1.05);
}

/* Minimized state */
#openai-chatbot-container.minimized {
    height: auto;
    width: 300px;
    max-height: 88px;
    overflow: hidden;
}

#openai-chatbot-container.minimized .chatbot-header {
    padding: 12px 20px;
}

#openai-chatbot-container.minimized .chatbot-minimize i {
    transform: rotate(180deg);
}

/* Responsive design */
@media (max-width: 480px) {
    #openai-chatbot-container {
        width: 95%;
        max-width: 95%;
        right: 2.5%;
        bottom: 70px;
		height: 700px;
    }
    
    #chatbot-launcher {
        bottom: 50px;
        right: 50px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}