
#tik-chatbot-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2147483647;

    width: 56px;
    height: 56px;

    border: 1.5px solid rgba(255, 0, 128, 0.8);
    cursor: pointer;

    background: #0b0614;
    color: #fff;
    font-size: 22px;

    box-shadow:
        0 12px 30px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255,0,128,0.45),
        0 0 18px rgba(255,0,128,0.28);

    transition: transform 160ms ease, box-shadow 160ms ease;
    
    display: flex;
    align-items: center;
    justify-content: center;

}

.tik-chatbot-icon{
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  
}

#tik-chatbot-toggle.is-open {
    transform: scale(0.94);
}

/* Chat window */
#tik-chatbot-window {
    position: fixed;
    right: 20px;
    bottom: 88px;
    z-index: 2147483647;

    width: 360px;
    height: 520px;
    max-height: calc(100vh - 120px);

    background: linear-gradient(
        180deg,
        rgba(30, 12, 60, 0.96),
        rgba(10, 5, 20, 0.96)
    );

    border: 1px solid rgba(0, 0, 0, 0.7);
    box-shadow: 0 30px 70px rgba(0,0,0,0.7);

    overflow: hidden;
    display: none;
}

#tik-chatbot-window.is-open {
    display: flex;
    flex-direction: column;
}

/* Header */
.tik-chatbot-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    font-weight: 600;
    letter-spacing: 0.3px;

    background: linear-gradient(
        90deg,
        #3b0a91,
        #5b21b6
    );

    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.tik-chatbot-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Status dot */
.tik-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.25);
}

/* Close button */
.tik-chatbot-close {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #fff;
    opacity: 0.75;
}

.tik-chatbot-close:hover {
    opacity: 1;
}

/* Messages */
.tik-chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;

    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: transparent;
}

.tik-msg {
    max-width: 85%;
    padding: 12px 14px;
    margin-bottom: 12px;

    font-size: 14px;
    line-height: 1.45;

    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #e9e7ff;
}

/* Otsikot valkoisiksi (teeman default saattaa tehdä mustaksi) */
.tik-msg h1,
.tik-msg h2,
.tik-msg h3,
.tik-msg h4,
.tik-msg h5,
.tik-msg h6 {
    color: #ffffff;
    margin: 0.45em 0;
}

/* Bot message */
.tik-bot {
    background: rgba(255,255,255,0.08);
    border-left: 3px solid #3b0a91;
}

/* Input */
.tik-chatbot-input {
    padding: 12px;
    display: flex;
    gap: 10px;

    background: rgba(10,5,20,0.9);
    border-top: 1px solid rgba(255,255,255,0.12);
}

.tik-chatbot-input input {
    flex: 1;
    padding: 10px 12px;

    background: #0b0614;
    border: 1px solid rgba(167,139,250,0.4);
    color: #fff;

    font-size: 14px;
}

.tik-chatbot-input input::placeholder {
    color: rgba(255,255,255,0.45);
}

.tik-chatbot-input button {
    padding: 10px 16px;
    border: 1px solid rgba(255, 0, 128, 0.8);

    background: #3b0a91;
    color: #fff;

    font-weight: 600;
    cursor: pointer;
}

.tik-chatbot-input button:hover {
    background: #4c1d95;
}

/* Mobile */
@media (max-width: 480px) {
    #tik-chatbot-toggle {
        right: 14px;
        bottom: 14px;
    }

    #tik-chatbot-window {
        right: 14px;
        bottom: 82px;
        width: calc(100vw - 28px);
        height: 70vh;
    }
}
