/* Ana renk ayarı PHP dosyasından geliyor */
:root {
    --gcb-primary-color: #007BFF;
}

.gcb-container *, .gcb-container *::before, .gcb-container *::after {
    box-sizing: border-box;
}

.gcb-chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--gcb-primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 99998;
    transition: transform 0.2s ease;
}

.gcb-chat-icon:hover {
    transform: scale(1.1);
}

.gcb-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.gcb-chat-window.gcb-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.gcb-chat-header {
    background-color: var(--gcb-primary-color);
    color: white;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.gcb-close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

.gcb-chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gcb-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.4;
    word-wrap: break-word;
}

.gcb-user-message {
    background-color: #f0f0f0;
    color: #333;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.gcb-bot-message {
    background-color: #f0f0f0;
    /* Ana rengin şeffaf bir tonunu kullanmak yerine, daha iyi kontrast için açık gri kullanıldı. */
    /* background-color: color-mix(in srgb, var(--gcb-primary-color) 15%, transparent); */
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.gcb-chat-footer {
    border-top: 1px solid #eee;
    padding: 10px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.gcb-chat-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    margin-right: 10px;
    line-height: 1.5;
}

.gcb-chat-input:disabled {
    background-color: #f5f5f5;
}

.gcb-send-btn {
    background-color: var(--gcb-primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gcb-send-btn:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

.gcb-typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #aaa;
    margin: 0 2px;
    animation: gcb-typing 1.4s infinite both;
}

.gcb-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.gcb-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes gcb-typing {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}
