#aisc-chat-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    letter-spacing: normal;
    text-transform: none;
    word-spacing: normal;
    text-indent: 0;
    text-shadow: none;
    text-decoration: none;
    list-style: none;
    background: transparent;
    border: none;
    border-radius: 0;
    outline: none;
    box-shadow: none;
}
#aisc-chat-container {
    all: initial;
    position: fixed;
    z-index: 999999;
    font-size: 14px;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#aisc-chat-container.aisc-right {
    right: 20px;
    bottom: 20px;
}
#aisc-chat-container.aisc-left {
    left: 20px;
    bottom: 20px;
}

#aisc-chat-button {
    all: initial;
    position: absolute;
    bottom: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25) !important;
    transition: all 0.3s ease !important;
    z-index: 999999;
}
#aisc-chat-button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(0,0,0,0.35) !important;
}
.aisc-right #aisc-chat-button {
    right: 0;
}
.aisc-left #aisc-chat-button {
    left: 0;
}
#aisc-chat-button svg {
    all: initial;
    display: block;
    width: 28px;
    height: 28px;
}
#aisc-chat-button svg path {
    fill: #fff;
}

#aisc-greeting-bubble {
    all: initial;
    display: block;
    position: absolute;
    bottom: 70px;
    background: #fff;
    border-radius: 12px 12px 12px 0;
    padding: 12px 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
    max-width: 240px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    z-index: 999998;
    animation: aisc-bounce-in 0.5s ease;
    cursor: pointer;
}
.aisc-right #aisc-greeting-bubble {
    right: 0;
    border-radius: 12px 12px 0 12px;
}
.aisc-left #aisc-greeting-bubble {
    left: 0;
}
#aisc-greeting-close {
    all: initial;
    display: block;
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #999;
    border-radius: 50%;
    color: #fff;
    font-family: Arial, sans-serif !important;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
}

/* --- Chat Window --- */
#aisc-chat-window {
    all: initial;
    display: none;
    position: absolute;
    bottom: 75px;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18) !important;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    z-index: 999999;
}
.aisc-right #aisc-chat-window {
    right: 0;
}
.aisc-left #aisc-chat-window {
    left: 0;
}
#aisc-chat-window.aisc-open {
    display: flex;
}

/* Header */
#aisc-chat-header {
    all: initial;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#aisc-chat-header-title {
    all: initial;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#aisc-chat-header-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
}
#aisc-chat-close {
    all: initial;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-family: Arial, sans-serif !important;
    font-size: 16px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    display: block;
}

/* Messages area */
#aisc-chat-messages {
    all: initial;
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#aisc-chat-messages::-webkit-scrollbar {
    width: 5px;
}
#aisc-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
#aisc-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.aisc-msg {
    all: initial;
    display: block;
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    word-wrap: break-word;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    animation: aisc-fade-in 0.3s ease;
}
.aisc-msg.user {
    background: #e3f2fd;
    color: #1a1a2e;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.aisc-msg.bot {
    background: #fff;
    color: #1a1a2e;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}
.aisc-msg.bot .aisc-typing-dots {
    display: inline-flex;
    gap: 4px;
    padding: 4px 0;
}
.aisc-msg.bot .aisc-typing-dots span {
    width: 7px;
    height: 7px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    animation: aisc-typing 1.4s infinite ease-in-out;
}
.aisc-msg.bot .aisc-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.aisc-msg.bot .aisc-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Input area */
#aisc-chat-input-area {
    all: initial;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#aisc-chat-input {
    all: initial;
    flex: 1;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 0 16px;
    font-size: 13.5px;
    color: #333;
    background: #f9fafb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    outline: none;
}
#aisc-chat-input:focus {
    border-color: #2563eb;
    background: #fff;
}
#aisc-chat-send {
    all: initial;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
#aisc-chat-send svg {
    width: 18px;
    height: 18px;
    display: block;
}
#aisc-chat-send svg path {
    fill: #fff;
}
#aisc-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Contact form */
#aisc-contact-form {
    all: initial;
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#aisc-contact-form.aisc-show {
    display: flex;
}
#aisc-contact-form h4 {
    all: initial;
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#aisc-contact-form input,
#aisc-contact-form textarea {
    all: initial;
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #333;
    background: #f9fafb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: block;
}
#aisc-contact-form input:focus,
#aisc-contact-form textarea:focus {
    border-color: #2563eb;
    background: #fff;
}
#aisc-contact-form textarea {
    min-height: 60px;
    resize: vertical;
}
#aisc-contact-submit {
    all: initial;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    color: #fff;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: block;
}
#aisc-contact-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
#aisc-contact-error {
    all: initial;
    display: none;
    color: #dc2626;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Animations */
@keyframes aisc-bounce-in {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes aisc-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes aisc-typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}

@media (max-width: 480px) {
    #aisc-chat-window {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
        bottom: 10px;
    }
    .aisc-right #aisc-chat-window { right: 10px; }
    .aisc-left #aisc-chat-window { left: 10px; }
    #aisc-chat-container { right: 10px; bottom: 10px; }
    #aisc-greeting-bubble { max-width: 200px; font-size: 12px; }
}
