/* Woodline Technologies Chat Widget */
/* Matches website theme: dark (#0d1117, #161b22) with white/gray accents */

/* Chat Button */
.wt-chat-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s ease;
}

.wt-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.3);
}

.wt-chat-button svg {
    width: 28px;
    height: 28px;
    fill: #0d1117;
}

/* Chat Window */
.wt-chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 140px);
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wt-chat-window.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

/* Chat Header */
.wt-chat-header {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    color: #ffffff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wt-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wt-chat-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.wt-chat-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.wt-chat-header-text p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #a8a8a8;
}

.wt-chat-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.wt-chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Chat Messages Container */
.wt-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(13, 17, 23, 0.8);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Individual Message */
.wt-chat-message {
    display: flex;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

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

.wt-chat-message.bot {
    align-items: flex-start;
}

.wt-chat-message.user {
    flex-direction: row-reverse;
}

.wt-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.wt-message-avatar.bot {
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
}

.wt-message-avatar.user {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wt-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.wt-message-content.bot {
    background: rgba(22, 27, 34, 0.9);
    color: #e8e8e8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.wt-message-content.user {
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    color: #0d1117;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.wt-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px;
}

.wt-typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    animation: typing 1.4s infinite;
}

.wt-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.wt-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

/* Chat Input Area */
.wt-chat-input-area {
    padding: 16px 20px;
    background: rgba(22, 27, 34, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 400px;
    overflow-y: auto;
}

.wt-chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wt-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    background: rgba(13, 17, 23, 0.8);
    color: #e8e8e8;
}

.wt-chat-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.wt-chat-input::placeholder {
    color: #a8a8a8;
}

.wt-chat-send-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    border: none;
    color: #0d1117;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.wt-chat-send-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.wt-chat-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Submit Button */
.wt-submit-button {
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    border: none;
    color: #0d1117;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.wt-submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.3);
}

.wt-submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .wt-chat-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .wt-chat-button {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }

    .wt-message-content {
        max-width: 85%;
    }
}

/* Scrollbar Styling */
.wt-chat-messages::-webkit-scrollbar,
.wt-chat-input-area::-webkit-scrollbar {
    width: 6px;
}

.wt-chat-messages::-webkit-scrollbar-track,
.wt-chat-input-area::-webkit-scrollbar-track {
    background: rgba(13, 17, 23, 0.5);
}

.wt-chat-messages::-webkit-scrollbar-thumb,
.wt-chat-input-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.wt-chat-messages::-webkit-scrollbar-thumb:hover,
.wt-chat-input-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
