/* Sikh Classroom — floating site chatbot */
.site-chatbot {
    --chatbot-primary: #E87511;
    --chatbot-primary-dark: #C25E0A;
    --chatbot-bg: #ffffff;
    --chatbot-text: #1a1a2e;
    --chatbot-muted: #64748b;
    --chatbot-bot-bg: #fff7ed;
    --chatbot-user-bg: linear-gradient(135deg, #E87511, #F4A524);
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.site-chatbot-fab {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chatbot-primary), #F4A524);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(232, 117, 17, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.site-chatbot-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 36px rgba(232, 117, 17, 0.5);
}

.site-chatbot-fab svg {
    width: 28px;
    height: 28px;
}

.site-chatbot-fab .fab-close {
    display: none;
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 300;
}

.site-chatbot.open .site-chatbot-fab .fab-icon {
    display: none;
}

.site-chatbot.open .site-chatbot-fab .fab-close {
    display: block;
}

.site-chatbot-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: min(380px, calc(100vw - 32px));
    height: min(520px, calc(100vh - 120px));
    background: var(--chatbot-bg);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(26, 26, 46, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(232, 117, 17, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}

.site-chatbot.open .site-chatbot-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.site-chatbot-header {
    background: linear-gradient(135deg, var(--chatbot-primary), #F4A524);
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.site-chatbot-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.site-chatbot-header-text h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 2px;
}

.site-chatbot-header-text p {
    font-size: 0.78rem;
    opacity: 0.92;
    margin: 0;
}

.site-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #faf9f7;
}

.site-chatbot-msg {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.55;
    word-wrap: break-word;
}

.site-chatbot-msg.bot {
    align-self: flex-start;
    background: var(--chatbot-bot-bg);
    color: var(--chatbot-text);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(232, 117, 17, 0.12);
}

.site-chatbot-msg.user {
    align-self: flex-end;
    background: var(--chatbot-user-bg);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.site-chatbot-msg a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.site-chatbot-msg.bot a {
    color: var(--chatbot-primary-dark);
}

.site-chatbot-msg.typing {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
}

.site-chatbot-msg.typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--chatbot-primary);
    opacity: 0.5;
    animation: chatbot-typing 1.2s infinite;
}

.site-chatbot-msg.typing span:nth-child(2) { animation-delay: 0.15s; }
.site-chatbot-msg.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatbot-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

.site-chatbot-suggestions {
    padding: 10px 14px 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.site-chatbot-suggestion {
    padding: 7px 12px;
    border: 1px solid rgba(232, 117, 17, 0.25);
    border-radius: 999px;
    background: #fff7ed;
    color: var(--chatbot-primary-dark);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: left;
    line-height: 1.35;
}

.site-chatbot-suggestion:hover {
    background: rgba(232, 117, 17, 0.15);
    border-color: var(--chatbot-primary);
}

.site-chatbot-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.site-chatbot-input-row input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.site-chatbot-input-row input:focus {
    border-color: var(--chatbot-primary);
    box-shadow: 0 0 0 3px rgba(232, 117, 17, 0.12);
}

.site-chatbot-input-row button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chatbot-primary), #F4A524);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s, opacity 0.2s;
}

.site-chatbot-input-row button:hover {
    transform: scale(1.05);
}

.site-chatbot-input-row button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.site-chatbot-input-row button svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 480px) {
    .site-chatbot {
        bottom: 16px;
        right: 16px;
    }

    .site-chatbot-panel {
        bottom: 72px;
        width: calc(100vw - 32px);
        height: min(480px, calc(100vh - 100px));
    }
}
