/* ==========================================================================
   Claude AI Chatbot Widget
   ========================================================================== */

:root { --ccb-color: #000000; }

#ccb-chat-widget *,
#ccb-chat-widget *::before,
#ccb-chat-widget *::after {
    box-sizing: border-box;
    
    padding: 0;
}

#ccb-chat-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    position: fixed;
    z-index: 999999;
}

.ccb-position-bottom-right { bottom: 20px; right: 20px; }
.ccb-position-bottom-left  { bottom: 20px; left: 20px; }

/* ==========================================================================
   Toggle Button — 52×52px, solid black with filled icon
   ========================================================================== */
.ccb-toggle-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: #111111;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: scale(0.5);
    animation: ccb-entrance 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.8s forwards;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@keyframes ccb-entrance {
    to { opacity: 1; transform: scale(1); }
}

.ccb-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(0,0,0,0.5);
}

/* Solid filled chat icon */
.ccb-toggle-btn svg {
    width: 26px;
    height: 26px;
    transition: opacity 0.2s, transform 0.25s;
}

.ccb-icon-close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg);
}

.ccb-widget.ccb-open .ccb-icon-chat  { opacity: 0; transform: rotate(90deg); }
.ccb-widget.ccb-open .ccb-icon-close { opacity: 1; transform: rotate(0deg); }
.ccb-widget.ccb-open .ccb-toggle-btn { opacity: 1; transform: scale(1); animation: none; }





/* ==========================================================================
   Chat Window
   ========================================================================== */
.ccb-chat-window {
    position: absolute;
    bottom: 64px;
    width: 380px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.ccb-position-bottom-right .ccb-chat-window { right: 0; }
.ccb-position-bottom-left  .ccb-chat-window { left: 0; }

.ccb-widget.ccb-open .ccb-chat-window {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ---- Header ---- */
.ccb-chat-header {
    background: #111111;
    color: #fff;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.ccb-header-info { display: flex; align-items: center; gap: 13px; }

.ccb-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ccb-header-avatar svg { width: 22px; height: 22px; }

.ccb-header-text { display: flex; flex-direction: column; gap: 3px; }

.ccb-header-title {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.ccb-header-subtitle {
    font-size: 12px;
    opacity: 0.65;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
}

.ccb-header-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74,222,128,0.9);
    animation: ccb-dot 2.5s infinite;
    flex-shrink: 0;
}

@keyframes ccb-dot {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

.ccb-minimize-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    width: 32px; height: 32px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ccb-minimize-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ---- User Info Form ---- */
.ccb-user-info {
    padding: 24px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.ccb-user-info p { font-size: 13px; color: #64748b; margin-bottom: 14px; }
.ccb-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    background: #fff;
    color: #1e293b;
}
.ccb-input:focus { border-color: #334155; box-shadow: 0 0 0 3px rgba(51,65,85,0.08); }
.ccb-start-btn {
    width: 100%;
    padding: 13px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.2s;
}
.ccb-start-btn:hover { opacity: 0.82; }

/* ---- Messages Area ---- */
.ccb-messages {
    flex: 1;
    overflow-y: auto;
    padding: 22px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    
    max-height: 380px;
    scroll-behavior: smooth;
    background: #ffffff;
}
.ccb-messages::-webkit-scrollbar { width: 4px; }
.ccb-messages::-webkit-scrollbar-track { background: transparent; }
.ccb-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

/* ---- Message Bubbles ---- */
.ccb-message {
    max-width: 82%;
    padding: 12px 16px !important;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    animation: ccb-fadeIn 0.22s ease;
    word-wrap: break-word;
}
@keyframes ccb-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ccb-message-bot {
    align-self: flex-start;
    background: #e8e8ea;
    color: #18181b;
    border-radius: 4px 18px 18px 18px;
    border: 1px solid #d4d4d8;
}
.ccb-message-user {
    align-self: flex-end;
    background: #111111;
    color: #fff;
    border-radius: 18px 18px 4px 18px;
}

/* ---- Suggestion Chips (card style, full-width) ---- */
.ccb-suggestions {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 6px;
    align-self: stretch;
    width: 100%;
}

.ccb-suggestion-btn {
    background: #fff;
    border: 1.5px solid #e4e4e7;
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 13.5px;
    color: #18181b;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    width: 100%;
    font-weight: 500;
}
.ccb-suggestion-btn::after {
    content: '›';
    font-size: 18px;
    color: #9ca3af;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 8px;
}
.ccb-suggestion-btn:hover {
    background: #e8e8ea;
    border-color: #a1a1aa;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.ccb-suggestion-btn:active { transform: translateY(0); background: #e4e4e7; }

/* ---- Typing Indicator ---- */
.ccb-typing { padding: 0 18px 10px; background: #fff; }
.ccb-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8e8ea;
    border: 1px solid #d4d4d8;
    padding: 12px 16px;
    border-radius: 4px 18px 18px 18px;
}
.ccb-typing-dots span {
    width: 7px; height: 7px;
    background: #9ca3af;
    border-radius: 50%;
    animation: ccb-bounce 1.4s infinite ease-in-out;
}
.ccb-typing-dots span:nth-child(1) { animation-delay: 0s; }
.ccb-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ccb-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ccb-bounce {
    0%,60%,100% { transform: translateY(0); }
    30%          { transform: translateY(-5px); }
}

/* ---- Input Area ---- */
.ccb-input-area {
    padding: 14px 16px;
    border-top: 1.5px solid #f0f0f0;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    background: #fff;
    flex-shrink: 0;
}
.ccb-message-input {
    flex: 1;
    border: 1.5px solid #e4e4e7;
    border-radius: 14px;
    padding: 11px 15px;
    font-size: 14px;
    resize: none;
    outline: none;
    max-height: 100px;
    font-family: inherit;
    line-height: 1.45;
    background: #f9f9f9;
    color: #18181b;
    transition: border-color 0.2s, background 0.2s;
}
.ccb-message-input:focus { border-color: #71717a; background: #fff; }
.ccb-message-input::placeholder { color: #a1a1aa; }

.ccb-send-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: none;
    background: #111;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.15s;
}
.ccb-send-btn:hover   { opacity: 0.75; transform: scale(1.06); }
.ccb-send-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

/* ---- Footer ---- */
.ccb-powered-by {
    text-align: center;
    font-size: 11px;
    color: #a1a1aa;
    padding: 6px 0 10px;
    background: #fff;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 480px) {
    .ccb-position-bottom-right { bottom: 16px; right: 16px; }
    .ccb-position-bottom-left  { bottom: 16px; left: 16px; }

    .ccb-chat-window {
        position: fixed;
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 86px);
        bottom: 76px;
        right: 10px !important;
        left: auto !important;
        border-radius: 20px;
    }
    .ccb-position-bottom-left .ccb-chat-window {
        left: 10px !important;
        right: auto !important;
    }
    .ccb-messages {
        max-height: calc(100dvh - 310px);
        
        padding: 18px 14px 12px;
    }
    .ccb-suggestion-btn { font-size: 13px; padding: 11px 14px; }
    .ccb-message { font-size: 13.5px; }

}
