/* School Math Chatbot */
.smb-floating-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999999;
    font-family: Arial, Helvetica, sans-serif;
}

.smb-toggle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    background: linear-gradient(145deg, #0f766e, #2563eb);
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 12px;
    font-weight: 700;
}

.smb-toggle strong {
    font-size: 18px;
    letter-spacing: .2px;
}

.smb-floating-panel {
    width: 410px;
    max-width: calc(100vw - 32px);
    margin-bottom: 12px;
}

.smb-bot {
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 14px 42px rgba(17, 24, 39, 0.22);
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

.smb-shortcode-wrap {
    max-width: 830px;
    margin: 24px auto;
    font-family: Arial, Helvetica, sans-serif;
}

.smb-embedded {
    box-shadow: 0 12px 36px rgba(20, 33, 61, 0.14);
}

.smb-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #0f172a, #0f766e);
    color: #ffffff;
}

.smb-logo {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    color: #0f766e;
    line-height: 1.05;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.smb-logo span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.smb-logo strong {
    font-size: 21px;
    color: #2563eb;
}

.smb-title-wrap strong {
    display: block;
    font-size: 19px;
    line-height: 1.2;
}

.smb-title-wrap span {
    display: block;
    font-size: 12px;
    color: #d1fae5;
    margin-top: 3px;
    line-height: 1.3;
}

.smb-chat {
    height: 405px;
    overflow-y: auto;
    padding: 15px;
    background: #f8fafc;
}

.smb-msg {
    max-width: 86%;
    padding: 11px 13px;
    margin: 8px 0;
    line-height: 1.5;
    border-radius: 17px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
}

.smb-msg-bot {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 5px;
}

.smb-msg-user {
    margin-left: auto;
    color: #ffffff;
    background: #2563eb;
    border-bottom-right-radius: 5px;
}

.smb-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.smb-suggestions button {
    border: 1px solid #99f6e4;
    color: #0f766e;
    background: #ecfdf5;
    border-radius: 999px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.smb-suggestions button:hover {
    background: #ccfbf1;
}

.smb-input-row {
    display: flex;
    gap: 8px;
    padding: 13px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.smb-input-row input {
    flex: 1;
    min-width: 0;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 11px 12px;
    font-size: 14px;
    outline: none;
}

.smb-input-row input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}

.smb-input-row button {
    border: 0;
    border-radius: 14px;
    background: #0f766e;
    color: white;
    padding: 0 16px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

.smb-input-row button:hover {
    background: #115e59;
}

@media (max-width: 640px) {
    .smb-floating-widget {
        right: 12px;
        bottom: 12px;
    }

    .smb-toggle {
        width: 68px;
        height: 68px;
    }

    .smb-floating-panel {
        width: calc(100vw - 24px);
    }

    .smb-chat {
        height: 365px;
    }

    .smb-msg {
        max-width: 92%;
    }
}
