.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(calc(100% - 60px));
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    resize: both;
    min-width: 300px;
    min-height: 400px;
    max-width: 800px;
    max-height: 800px;
}

.chatbot-container.open {
    transform: translateY(0);
}

.chatbot-header {
    background: #2c3e50;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.chatbot-header:hover {
    background: #34495e;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    flex: 1;
}

.chatbot-title i {
    font-size: 1.2em;
}

.chatbot-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
    margin-left: 10px;
    transition: transform 0.2s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sticky-message {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    flex-shrink: 0;
    z-index: 10;
}

.sticky-message .message {
    margin: 0;
    max-width: 100%;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 13px;
    line-height: 1.3;
}

.sticky-message .message i {
    color: #f39c12;
    margin-top: 1px;
    flex-shrink: 0;
    font-size: 12px;
}

.messages-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
}

.user-message {
    align-self: flex-end;
    background: #2c3e50;
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message {
    align-self: flex-start;
    background: #f0f2f5;
    color: #2c3e50;
    border-bottom-left-radius: 5px;
}

.chatbot-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chatbot-input input:focus {
    border-color: #2c3e50;
}

.chatbot-input input.disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.send-button {
    background: #2c3e50;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-button:hover:not(.disabled) {
    background: #34495e;
    transform: scale(1.05);
}

.send-button.disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

/* Error message styling */
.error-message {
    background: #ffebee !important;
    color: #c62828 !important;
    border: 1px solid #ffcdd2 !important;
}

/* Enhanced typing indicator */
.typing-indicator {
    padding: 10px 15px;
    background: #f0f2f5;
    border-radius: 15px;
    display: inline-block;
    margin: 5px 0;
}

.typing-indicator .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2c3e50;
    margin-right: 5px;
    animation: typing 1.4s infinite ease-in-out both;
}

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

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

.typing-indicator .dot:nth-child(3) {
    margin-right: 0;
}

@keyframes typing {
    0%, 80%, 100% { 
        transform: scale(0);
    }
    40% { 
        transform: scale(1.0);
    }
}

/* Scrollbar styling */
.messages-content::-webkit-scrollbar {
    width: 6px;
}

.messages-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.messages-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.messages-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Highlight Animation */
.chatbot-highlight {
    position: fixed;
    bottom: 90px;
    right: 90px;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chatbot-highlight.animate {
    opacity: 1;
    transform: scale(1);
    animation: pulse 1s infinite;
}

.highlight-arrow {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 20px solid #2c3e50;
    position: absolute;
    bottom: -15px;
    right: 20px;
    animation: bounce 0.6s infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.highlight-text {
    background: #2c3e50;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: glow 1.5s infinite;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.1);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(44, 62, 80, 0.5);
    }
}

/* Add a shine effect to the text */
.highlight-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    20% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* Resize handle styles */
.resize-handle {
    position: absolute;
    background: transparent;
    z-index: 1001;
}

.resize-handle.right {
    right: 0;
    top: 0;
    width: 5px;
    height: 100%;
    cursor: e-resize;
}

.resize-handle.left {
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    cursor: w-resize;
}

.resize-handle.bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    cursor: s-resize;
}

.resize-handle.top {
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    cursor: n-resize;
}

.resize-handle.corner {
    width: 10px;
    height: 10px;
    background: #2c3e50;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resize-handle.corner:hover {
    opacity: 0.5;
}

.resize-handle.corner.top-right {
    top: 5px;
    right: 5px;
    cursor: ne-resize;
}

.resize-handle.corner.top-left {
    top: 5px;
    left: 5px;
    cursor: nw-resize;
}

.resize-handle.corner.bottom-right {
    bottom: 5px;
    right: 5px;
    cursor: se-resize;
}

.resize-handle.corner.bottom-left {
    bottom: 5px;
    left: 5px;
    cursor: sw-resize;
}

/* Mobile styles */
@media (max-width: 768px) {
    .chatbot-container {
        width: 100%;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        transform: translateY(calc(100% - 60px));
        min-width: 100%;
        min-height: 100vh;
        max-width: 100%;
        max-height: 100vh;
    }
    
    .chatbot-container.open {
        transform: translateY(0);
    }
    
    .sticky-message {
        padding: 10px 15px;
    }
    
    .sticky-message .message {
        padding: 6px 10px;
        font-size: 12px;
        line-height: 1.2;
        gap: 5px;
    }
    
    .sticky-message .message i {
        font-size: 11px;
        margin-top: 0;
    }
}

/* Message formatting styles */
.message-content {
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message-content strong {
    font-weight: 600;
    color: inherit;
}

.message-content em {
    font-style: italic;
    color: inherit;
}

.message-content code {
    background: rgba(0, 0, 0, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #2c3e50;
}

.bot-message .message-content code {
    background: rgba(44, 62, 80, 0.1);
    color: #2c3e50;
}

.user-message .message-content code {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.message-content pre {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
    overflow-x: auto;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

.bot-message .message-content pre {
    background: rgba(44, 62, 80, 0.05);
    border-color: rgba(44, 62, 80, 0.1);
    color: #2c3e50;
}

.user-message .message-content pre {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.message-content ul,
.message-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-content li {
    margin: 4px 0;
    line-height: 1.4;
}

.message-content ul li {
    list-style-type: disc;
}

.message-content ol li {
    list-style-type: decimal;
}

.message-content a {
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
}

.message-content a:hover {
    text-decoration: underline;
}

.user-message .message-content a {
    color: #ecf0f1;
}

.user-message .message-content a:hover {
    color: #fff;
}

/* Ensure proper spacing for line breaks */
.message-content br {
    line-height: 1.6;
} 