/* tykes-chatbot.css */

#tykes-chatbot-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: 'Poppins', sans-serif;
}

/* Bubble Icon */
.tc-bubble {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7C3AED, #EC4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tc-bubble:hover {
    transform: scale(1.08) translateY(-4px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5);
}

.tc-bubble svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Chat Window */
.tc-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 340px;
    height: 500px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tc-window.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.tc-header {
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tc-header-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.tc-header-info p {
    margin: 4px 0 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

.tc-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

/* Body / Screens */
.tc-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: #F9F7FF;
}

/* Choice Screen */
.tc-choice-screen {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    height: 100%;
}

.tc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.tc-btn-wa {
    background: #25D366;
    color: white;
    text-decoration: none;
}
.tc-btn-wa:hover {
    background: #20BA56;
}

.tc-btn-chat {
    background: white;
    color: #7C3AED;
    border: 2px solid #7C3AED;
}
.tc-btn-chat:hover {
    background: #F3E8FF;
}

/* Form Screen */
.tc-form-screen {
    display: none;
    flex-direction: column;
    gap: 12px;
}
.tc-form-screen.active {
    display: flex;
}

.tc-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-family: inherit;
    box-sizing: border-box;
}
.tc-input:focus {
    outline: none;
    border-color: #7C3AED;
}
.tc-submit {
    background: #7C3AED;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Chat Screen */
.tc-chat-screen {
    display: none;
    flex-direction: column;
    height: 100%;
}
.tc-chat-screen.active {
    display: flex;
}

.tc-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 10px;
}

.tc-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.tc-msg.bot {
    background: white;
    color: #1E1B4B;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tc-msg.user {
    background: #7C3AED;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Quick Replies */
.tc-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tc-qr-btn {
    background: white;
    border: 1px solid #D8B4FE;
    color: #7C3AED;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}
.tc-qr-btn:hover {
    background: #F3E8FF;
}

/* Input Area */
.tc-chat-input-area {
    display: flex;
    padding: 12px;
    background: white;
    border-top: 1px solid #F3F4F6;
    gap: 8px;
}

.tc-chat-input-area input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.9rem;
}
.tc-chat-input-area input:focus {
    outline: none;
    border-color: #A78BFA;
}

.tc-send-btn {
    background: #7C3AED;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.tc-send-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

@media (max-width: 480px) {
    .tc-window {
        width: calc(100vw - 32px);
        right: -8px;
        bottom: 70px;
    }
}
