.ncai-assistant {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.ncai-assistant h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.ncai-assistant p {
    color: #555;
    margin-bottom: 20px;
}

.ncai-form {
    background: #f9f9f9;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin-bottom: 24px;
}

.ncai-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    resize: vertical;
    box-sizing: border-box;
}

.ncai-form textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.15);
}

.ncai-form .ncai-hint {
    font-size: 13px;
    color: #888;
    margin-top: 6px;
    margin-bottom: 16px;
}

.ncai-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ncai-btn:hover {
    background: #005a87;
}

.ncai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ncai-btn-whatsapp {
    background: #25D366;
}

.ncai-btn-whatsapp:hover {
    background: #1da851;
}

.ncai-btn-secondary {
    background: #6c757d;
}

.ncai-btn-secondary:hover {
    background: #5a6268;
}

.ncai-loading {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.ncai-loading .ncai-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: ncai-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes ncai-spin {
    to { transform: rotate(360deg); }
}

.ncai-loading p {
    color: #666;
    font-size: 14px;
}

.ncai-result {
    display: none;
}

.ncai-result-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.ncai-result-section h3 {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
    color: #1a1a1a;
}

.ncai-menu-table {
    width: 100%;
    border-collapse: collapse;
}

.ncai-menu-table th,
.ncai-menu-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.ncai-menu-table th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 14px;
}

.ncai-menu-table td {
    font-size: 14px;
}

.ncai-ingredient-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ncai-ingredient-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.ncai-ingredient-list li:last-child {
    border-bottom: none;
}

.ncai-ingredient-name {
    font-weight: 500;
}

.ncai-ingredient-qty {
    color: #666;
}

.ncai-ingredient-cat {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
}

.ncai-vendor-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.ncai-vendor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ncai-vendor-name {
    font-size: 16px;
    font-weight: 600;
}

.ncai-vendor-total {
    font-size: 16px;
    font-weight: 700;
    color: #007cba;
}

.ncai-vendor-products {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.ncai-vendor-products li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

.ncai-vendor-distance {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.ncai-observations {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    color: #8c6e00;
    margin-top: 16px;
}

.ncai-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
    padding: 16px;
    color: #cf1322;
    margin-bottom: 16px;
    display: none;
}

.ncai-success-msg {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 8px;
    padding: 16px;
    color: #389e0d;
    margin-bottom: 16px;
    display: none;
}

@media (max-width: 600px) {
    .ncai-form {
        padding: 16px;
    }

    .ncai-result-section {
        padding: 16px;
    }

    .ncai-menu-table th,
    .ncai-menu-table td {
        padding: 8px;
        font-size: 13px;
    }

    .ncai-vendor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

.ncai-chat {
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.ncai-chat-header {
    background: #007cba;
    color: #fff;
    padding: 20px 24px;
}

.ncai-chat-header h2 {
    margin: 0 0 4px;
    font-size: 1.2em;
    color: #fff;
}

.ncai-chat-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    color: #fff;
}

.ncai-chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f5f7fa;
}

.ncai-chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    clear: both;
}

.ncai-chat-user {
    background: #007cba;
    color: #fff;
    float: right;
    border-bottom-right-radius: 4px;
}

.ncai-chat-bot {
    background: #fff;
    color: #333;
    float: left;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ncai-chat-bot table {
    font-size: 13px;
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
}

.ncai-chat-bot th,
.ncai-chat-bot td {
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.ncai-chat-bot th {
    background: #f0f0f0;
    font-weight: 600;
}

.ncai-chat-bot h4 {
    margin: 12px 0 8px;
    font-size: 14px;
    color: #1a1a1a;
}

.ncai-chat-bot h4:first-child {
    margin-top: 4px;
}

.ncai-chat-bot ol {
    padding-left: 20px;
    margin: 8px 0;
}

.ncai-chat-bot ol li {
    margin-bottom: 4px;
}

.ncai-chat-card {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px;
    margin: 4px 0;
}

.ncai-chat-resumen {
    background: #e8f4fd;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 13px;
}

.ncai-chat-resumen-item {
    display: inline-block;
    margin-right: 12px;
}

.ncai-chat-typing {
    float: left;
    clear: both;
    padding: 12px 20px;
    background: #fff;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ncai-chat-typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 2px;
    animation: ncai-bounce 1.4s ease-in-out infinite;
}

.ncai-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.ncai-chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ncai-bounce {
    0%, 80%, 100% { transform: scale(0.6); }
    40% { transform: scale(1); }
}

.ncai-chat-input-area {
    border-top: 1px solid #e0e0e0;
    padding: 12px 16px;
    background: #fff;
}

.ncai-chat-error {
    color: #cf1322;
    font-size: 13px;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: #fff2f0;
    border-radius: 6px;
}

.ncai-chat-input-row {
    display: flex;
    gap: 8px;
}

.ncai-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.ncai-chat-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.15);
}

.ncai-chat-send {
    padding: 10px 24px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.ncai-chat-send:hover {
    background: #005a87;
}

.ncai-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ncai-vendors-results {
    margin-top: 12px;
}

.ncai-vendor-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
}

.ncai-vendor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ncai-vendor-name {
    font-weight: 600;
    font-size: 14px;
}

.ncai-vendor-total {
    font-weight: 700;
    color: #007cba;
}

.ncai-vendor-products {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
}

.ncai-vendor-products li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
}

.ncai-vendor-distance {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.ncai-btn-whatsapp {
    background: #25D366;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ncai-btn-whatsapp:hover {
    background: #1da851;
}

.ncai-observations {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    color: #8c6e00;
    margin-top: 8px;
}

.ncai-no-vendors {
    color: #888;
    font-size: 13px;
    text-align: center;
    padding: 16px;
}

.ncai-login-required {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    text-align: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
}

.ncai-login-required p {
    font-size: 16px;
    color: #555;
}

.ncai-login-required a {
    color: #007cba;
    font-weight: 600;
}

@media (max-width: 600px) {
    .ncai-chat-messages {
        height: 300px;
        padding: 12px;
    }

    .ncai-chat-bubble {
        max-width: 90%;
        font-size: 13px;
    }

    .ncai-chat-header {
        padding: 14px 16px;
    }

    .ncai-chat-header h2 {
        font-size: 1em;
    }

    .ncai-chat-input-area {
        padding: 8px 12px;
    }
}
