/* Two Pixels AI Chat Widget Styles */

#tp-ai-chat-root {
    position: fixed;
    bottom: 25px;
    right: 95px; /* Offset from WhatsApp float button */
    z-index: 99998;
    font-family: inherit;
}

/* Trigger Button */
.tp-ai-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #07111f 0%, #0d223a 100%);
    color: #ffffff;
    border: 1px solid rgba(0, 229, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 229, 255, 0.2);
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tp-ai-trigger:hover {
    transform: translateY(-3px);
    border-color: #00e5ff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 22px rgba(0, 229, 255, 0.35);
}

.tp-ai-trigger-icon {
    width: 32px;
    height: 32px;
    background: rgba(0, 229, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00e5ff;
    font-size: 15px;
}

.tp-ai-trigger-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
}

.tp-ai-status-pulse {
    width: 8px;
    height: 8px;
    background-color: #00e5ff;
    border-radius: 50%;
    box-shadow: 0 0 8px #00e5ff;
    animation: tpPulse 2s infinite;
}

@keyframes tpPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(0, 229, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

/* Chat Window */
.tp-ai-window {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 390px;
    height: 560px;
    max-height: calc(100vh - 120px);
    background: #07111f;
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 229, 255, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    animation: tpWindowSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tpWindowSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.tp-ai-header {
    background: #0a1728;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tp-ai-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tp-ai-avatar {
    width: 38px;
    height: 38px;
    background: rgba(0, 229, 255, 0.15);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00e5ff;
    font-size: 16px;
}

.tp-ai-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.tp-ai-subtitle {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.tp-ai-online-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
}

.tp-ai-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tp-ai-btn-icon {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.tp-ai-btn-icon:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* Messages */
.tp-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tp-ai-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.tp-ai-msg-assistant {
    align-self: flex-start;
    background: #0f2139;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom-left-radius: 4px;
}

.tp-ai-msg-assistant a {
    color: #00e5ff;
    text-decoration: underline;
}

.tp-ai-msg-user {
    align-self: flex-end;
    background: #0284c7;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

/* Quick Suggestions */
.tp-ai-suggestions {
    padding: 6px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: rgba(10, 23, 40, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.tp-ai-suggestion-chip {
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: #38bdf8;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tp-ai-suggestion-chip:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: #00e5ff;
    color: #ffffff;
}

/* Typing Indicator */
.tp-ai-typing {
    padding: 8px 16px;
    display: flex;
    gap: 4px;
    align-items: center;
}

.tp-ai-typing span {
    width: 6px;
    height: 6px;
    background: #00e5ff;
    border-radius: 50%;
    animation: tpTyping 1.4s infinite ease-in-out both;
}

.tp-ai-typing span:nth-child(1) { animation-delay: -0.32s; }
.tp-ai-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes tpTyping {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* Footer */
.tp-ai-footer {
    padding: 12px 14px;
    background: #0a1728;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tp-ai-input-wrap {
    display: flex;
    align-items: center;
    background: #050d18;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    padding: 4px 6px 4px 14px;
    transition: border-color 0.2s;
}

.tp-ai-input-wrap:focus-within {
    border-color: #00e5ff;
}

.tp-ai-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 13px;
    outline: none;
}

.tp-ai-input::placeholder {
    color: #64748b;
}

.tp-ai-send {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #00e5ff;
    color: #07111f;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: transform 0.2s, background 0.2s;
}

.tp-ai-send:hover {
    background: #38bdf8;
    transform: scale(1.05);
}

.tp-ai-disclaimer {
    font-size: 10px;
    color: #64748b;
    text-align: center;
    margin-top: 6px;
}

.tp-ai-disclaimer a {
    color: #94a3b8;
    text-decoration: underline;
}

/* Responsive Mobile */
@media (max-width: 576px) {
    #tp-ai-chat-root {
        right: 80px;
        bottom: 20px;
    }
    .tp-ai-trigger-label {
        display: none;
    }
    .tp-ai-trigger {
        padding: 10px;
        border-radius: 50%;
    }
    .tp-ai-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}
