/* Chat Popup */
#gpt-chat-popup {
    display: none;  /* Initially hidden */
    position: fixed;
    bottom: 20px;  /* Changed from 50px to 20px */
    right: 20px;   /* Changed from 50px to 20px */
    width: 350px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    z-index: 1000;  /* Higher than the toggle button */
}
#gpt-chat-header {
    background-color: #0073aa;
    color: #fff;
    padding: 15px;
    font-weight: bold;
    font-size: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#gpt-chat-header-text {
    flex-grow: 1;
}
#gpt-chat-header-buttons {
    display: flex;
    align-items: center;
}
#gpt-chat-reset {
    cursor: pointer;
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    margin-right: 20px; /* Add gap between reset and close icons */
}
#gpt-chat-reset:hover {
    opacity: 1;
}
#gpt-chat-reset svg {
    width: 16px;
    height: 16px;
    display: block;
}
#gpt-chat-body {
    height: 350px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f5f5f5;
}
#gpt-chat-messages {
    display: flex;
    flex-direction: column;
}
.user-message, .gpt-message {
    max-width: 80%;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 18px;
    line-height: 1.4;
}
.user-message {
    align-self: flex-end;
    background-color: #0073aa;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.gpt-message {
    align-self: flex-start;
    background-color: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
#gpt-chat-input-container {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
}
#gpt-chat-input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 14px;
}
#gpt-chat-send {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

#gpt-chat-send svg {
    width: 16px;
    height: 16px;
    color: #fff;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: block;
}

#gpt-chat-send:hover svg {
    opacity: 0.8;  /* Instead of changing color, we'll use opacity for hover effect */
}

/* Chat Toggle Button */
#gpt-chat-toggle {
    position: fixed;
    bottom: 20px;  /* Changed from 50px to 20px */
    right: 20px;   /* Changed from 50px to 20px */
    background-color: #0073aa;
    color: white;
    padding: 13px 20px;
    border-radius: 25px;
    cursor: pointer;
    z-index: 999;  /* Lower than the chat window */
    font-weight: bold;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#gpt-chat-toggle:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}
/* Close Button */
#gpt-chat-close {
    cursor: pointer;
    font-size: 24px;  /* Increased from 16px to 24px */
    font-weight: bold;
    color: #fff;  /* Changed from #0073aa to #fff */
    background: none;
    border: none;
    padding: 0;  /* Added to remove any default padding */
    line-height: 1;  /* Added to improve vertical alignment */
    margin-left: 5px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
#gpt-chat-close:hover {
    opacity: 1;
}
/* Typing Indicator */
.typing-indicator {
    align-self: flex-start;
    background-color: #fff;
    width: auto;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 10px;
    display: inline-block;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

.typing-indicator span {
    height: 6px;
    width: 6px;
    float: left;
    margin: 0 1px;
    background-color: #9e9ea1;
    display: block;
    border-radius: 50%;
    opacity: 0.4;
}

.typing-indicator span:nth-of-type(1) {
    animation: 1s blink infinite 0.3333s;
}

.typing-indicator span:nth-of-type(2) {
    animation: 1s blink infinite 0.6666s;
}

.typing-indicator span:nth-of-type(3) {
    animation: 1s blink infinite 0.9999s;
}

@keyframes blink {
    50% {
        opacity: 1;
    }
}

/* Footer */
#gpt-chat-footer {
    background-color: #f0f0f0;
    color: #666;
    padding: 5px;
    text-align: center;
    font-size: 10px;
    border-top: 1px solid #ccc;
    border-radius: 0 0 8px 8px;
}

#gpt-chat-footer a {
    color: #0073aa;
    text-decoration: none;
}

#gpt-chat-footer a:hover {
    text-decoration: underline;
}

/* Greeting Message Styles */
.gpt-message:first-child {
    margin-top: 0;
}
