#wp-tg-support-root {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wp-tg-chat-toggle {
    background: #0088cc;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,136,204,0.4);
    transition: all 0.3s ease;
}

.wp-tg-chat-toggle:hover:not(:disabled) {
    background: #006699;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,136,204,0.5);
}

.wp-tg-chat-toggle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wp-tg-chat-window {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wp-tg-chat-header {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    color: white;
    padding: 16px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wp-tg-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.wp-tg-chat-close:hover {
    opacity: 0.8;
}

.wp-tg-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.wp-tg-msg {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-tg-msg.client {
    background: #0088cc;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.wp-tg-msg.manager {
    background: white;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wp-tg-msg p {
    margin: 0;
    line-height: 1.4;
}

.wp-tg-msg img {
    max-width: 100%;
    border-radius: 8px;
    display: block;
}

.wp-tg-chat-email {
    padding: 16px 20px;
    background: #fffbea;
    border-bottom: 1px solid #e8e8e8;
}

.wp-tg-chat-email p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.wp-tg-chat-email input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.wp-tg-image-preview {
    padding: 12px 20px;
    background: #f9f9f9;
    border-top: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wp-tg-image-preview img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 6px;
    object-fit: cover;
}

.wp-tg-image-preview button {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.wp-tg-chat-input {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 8px;
    align-items: center;
}

.wp-tg-chat-input input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.wp-tg-chat-input input[type="text"]:focus {
    border-color: #0088cc;
}

.wp-tg-chat-input input[type="text"]:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.wp-tg-chat-input button {
    background: #0088cc;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.wp-tg-chat-input button:hover:not(:disabled) {
    background: #006699;
}

.wp-tg-chat-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wp-tg-chat-input button#wp-tg-image-btn {
    background: #f0f0f0;
}

.wp-tg-chat-input button#wp-tg-image-btn:hover:not(:disabled) {
    background: #e0e0e0;
}

@media (max-width: 480px) {
    .wp-tg-chat-window {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 70px;
    }
    
    #wp-tg-support-root {
        left: 10px;
        bottom: 10px;
    }
}
