/* Ingiliz Kultur Izmir Chatbot Widget */
#bc-chat-root, #bc-chat-root * { box-sizing: border-box; }

#bc-chat-root {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

#bc-chat-toggle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #A7281D;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}
#bc-chat-toggle:hover { background: #8a1f16; transform: scale(1.05); }
#bc-chat-toggle svg { width: 30px; height: 30px; }

#bc-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #fff;
    color: #A7281D;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    border: 2px solid #A7281D;
}

#bc-chat-panel {
    position: absolute;
    bottom: 78px;
    right: 0;
    width: 370px;
    max-width: calc(100vw - 40px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
#bc-chat-panel.bc-open { display: flex; }

#bc-chat-header {
    background: linear-gradient(135deg, #A7281D 0%, #7a1d14 100%);
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}
#bc-chat-header .bc-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: #fff; color: #A7281D;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px;
}
#bc-chat-header .bc-title { font-weight: 600; font-size: 15px; }
#bc-chat-header .bc-subtitle { font-size: 11px; opacity: 0.85; display: flex; align-items: center; gap: 5px; }
#bc-chat-header .bc-dot { width: 7px; height: 7px; background: #4ade80; border-radius: 50%; display: inline-block; }
#bc-chat-header .bc-header-text { flex: 1; }
#bc-chat-header .bc-reset,
#bc-chat-header .bc-close {
    background: none; border: none; color: #fff;
    cursor: pointer; opacity: 0.8; padding: 4px;
    display: flex; align-items: center; justify-content: center;
}
#bc-chat-header .bc-reset { margin-left: auto; }
#bc-chat-header .bc-reset svg { width: 18px; height: 18px; }
#bc-chat-header .bc-close { font-size: 22px; padding: 0 6px; }
#bc-chat-header .bc-reset:hover,
#bc-chat-header .bc-close:hover { opacity: 1; }

#bc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#bc-chat-messages::-webkit-scrollbar { width: 6px; }
#bc-chat-messages::-webkit-scrollbar-thumb { background: #cbd1d8; border-radius: 3px; }

.bc-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.bc-msg-bot {
    background: #fff;
    color: #1a1f2e;
    align-self: flex-start;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}
.bc-msg-user {
    background: #A7281D;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.bc-msg-error {
    background: #fee2e2;
    color: #991b1b;
    align-self: flex-start;
    border: 1px solid #fecaca;
    font-size: 13px;
}

.bc-msg-bot strong { font-weight: 700; color: #1a1f2e; }
.bc-msg-bot em { font-style: italic; }
.bc-msg-bot code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
    font-family: "SF Mono", Monaco, Consolas, monospace;
}
.bc-msg-bot a {
    color: #A7281D;
    text-decoration: underline;
    word-break: break-word;
}
.bc-msg-bot a:hover { color: #7a1d14; }
.bc-msg-bot ul {
    margin: 6px 0;
    padding-left: 20px;
    list-style: disc;
}
.bc-msg-bot ul li { margin: 2px 0; }
.bc-msg-bot br + br { display: none; }

.bc-typing {
    align-self: flex-start;
    background: #fff;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    display: flex;
    gap: 4px;
}
.bc-typing span {
    width: 7px; height: 7px; border-radius: 50%;
    background: #A7281D;
    opacity: 0.4;
    animation: bc-bounce 1.2s infinite;
}
.bc-typing span:nth-child(2) { animation-delay: 0.2s; }
.bc-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bc-bounce {
    0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

#bc-chat-suggestions {
    padding: 0 16px 12px;
    background: #f7f8fa;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.bc-suggestion {
    background: #fff;
    border: 1px solid #A7281D;
    color: #A7281D;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.bc-suggestion:hover { background: #A7281D; color: #fff; }

#bc-chat-input-wrap {
    padding: 12px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
#bc-chat-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 10px 14px;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    font-family: inherit;
    outline: none;
}
#bc-chat-input:focus { border-color: #A7281D; }
#bc-chat-send {
    background: #A7281D;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#bc-chat-send:hover { background: #8a1f16; }
#bc-chat-send:disabled { background: #cbd1d8; cursor: not-allowed; }
#bc-chat-send svg { width: 18px; height: 18px; }

#bc-chat-footer {
    text-align: center;
    padding: 6px;
    font-size: 10px;
    color: #9ca3af;
    background: #fff;
    border-top: 1px solid #f3f4f6;
}

@media (max-width: 480px) {
    #bc-chat-root { bottom: 12px; right: 12px; }
    #bc-chat-panel {
        width: calc(100vw - 24px);
        height: calc(100vh - 100px);
        bottom: 74px;
    }
    #bc-chat-toggle { width: 56px; height: 56px; }
}
