/* Main container styles */
#replypilot-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-height: 70vh;
    min-height:500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: all 0.3s ease;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
   
}

#replypilot-chatbot-container:not(.closed) {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Header styles */
#replypilot-chatbot-header {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    position: relative;
}

#replypilot-chatbot-avatar {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4285f4;
    font-weight: bold;
}
#replypilot-chatbot-avatar img {
    width: 30px;
    height: auto;
}

#replypilot-chatbot-header span {
    flex: 1;
    font-weight: 500;
    font-size: 16px;
}


#replypilot-chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: left;
    margin-left: 10px;
    opacity: 0.8;
    transition: opacity 0.2s;
    font-size: 38px;
}

#replypilot-chatbot-minimize:hover,
#replypilot-chatbot-close:hover {
    opacity: 1;
}

/* Messages area */
#replypilot-chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.replypilot-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

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

.replypilot-user-message {
    background: #4285f4;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-size: 16px;
}

.replypilot-bot-message {
    background: #ffffff;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-size: 16px;
}

.replypilot-welcome {
    background: #e8f0fe;
    color: #1967d2;
}

.replypilot-message-content {
    word-wrap: break-word;
    line-height: 1.4;
}

.replypilot-message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.replypilot-user-message .replypilot-message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* Typing indicator */
.replypilot-typing .replypilot-message-content {
    display: flex;
    align-items: center;
    height: 20px;
}
.replypilot-message-content a{
text-decoration: none;
color: #4285f4;
}
.replypilot-typing-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 2px;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.replypilot-typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.replypilot-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.replypilot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

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

/* Input area */
#replypilot-chatbot-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid #eee;
    background: white;
    align-items: flex-end;
    font-size: 16px;
}

#replypilot-chatbot-user-input {
    flex: 1;
    padding: 7px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    max-height: 60px;
    outline: none;
    font-family: inherit;
    font-size: 16px;
    transition: border 0.2s;
	height:40px;
}

#replypilot-chatbot-user-input:focus {
    border-color: #4285f4;
}

#replypilot-chatbot-send {
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 40px;
    font-family: arial ,sans-serif;
    font-weight: 500;
    padding: 0;
}

#replypilot-chatbot-send:hover {
    background: #3367d6;
}

#replypilot-chatbot-send svg {
    width: 20px;
    height: 20px;
}

/* Toggle button */
#replypilot-chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    transition: all 0.3s ease;
}

#replypilot-chatbot-toggle:hover {
    transform: scale(1.05);
}

#replypilot-chatbot-toggle-icon {
    font-size: 0px;
   
}
#replypilot-chatbot-toggle-icon img{
    width: 43px;
    height: auto;
}

/* User data form */
#replypilot-user-data-form {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 390px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    padding: 20px;
    display: none;
     color: #2D3748;
     box-sizing: border-box;
	font-family: Arial, Helvetica, sans-serif;
}
#replypilot-user-data-form p{
    font-size: 16px;
}
#replypilot-user-data-form h3 {
    margin-top: 0;
    color: #4285f4;
  font-size: 26px;

}

#replypilot-user-data-form .form-group {
    margin-bottom: 15px;
}

#replypilot-user-data-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

#replypilot-user-data-form input[type="text"],
#replypilot-user-data-form input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
        
}

#replypilot-user-data-form button[type="submit"] {
    background: #4285f4;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: background 0.2s;
    font-weight: 400;
    text-transform: capitalize;
}

#replypilot-user-data-form button[type="submit"]:hover {
    background: #3367d6;
}

#replypilot-chatbot-messages .replypilot-service-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

#replypilot-chatbot-messages .replypilot-service-btn strong:hover {
    background: #f0f7ff;
    border-color: #4285f4;
}

#replypilot-chatbot-messages .replypilot-service-btn strong {
     color: #4285f4;
    font-size: 14px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    #replypilot-chatbot-container,
    #replypilot-user-data-form {
        width: 90%;
        right: 5%;
        bottom: 10px;
        max-height: 80vh;
    }
    
    #replypilot-chatbot-toggle {
        right: 5%;
        bottom: 10px;
    }
    
    .message {
        max-width: 90%;
    }
}