"""
ChatGPT DOM Selectors - Isolated for maintainability.

ChatGPT is a React SPA with dynamic class names. These selectors
target stable attributes where possible.

MAINTENANCE NOTE: When ChatGPT updates their UI, only this file needs changes.
"""

# Input area
PROMPT_TEXTAREA = 'textarea[data-id="prompt-textarea"], textarea[placeholder*="Message"], #prompt-textarea'
SEND_BUTTON = 'button[data-testid="send-button"], button[aria-label*="Send"]'

# Response area (streaming)
ASSISTANT_MESSAGES = '[data-message-author-role="assistant"]'
LAST_ASSISTANT_MESSAGE = f'{ASSISTANT_MESSAGES}:last-of-type'
MESSAGE_CONTENT = '.markdown, .prose, [class*="markdown"]'

# Streaming indicator (present while response is generating)
STREAMING_INDICATOR = '[data-testid="stop-button"], button[aria-label*="Stop"]'

# Model selector (if visible)
MODEL_SELECTOR = '[data-testid="model-selector"], .model-selector'

# Error indicators
RATE_LIMIT_BANNER = '[class*="rate-limit"], [data-testid="rate-limit"]'
ERROR_MESSAGE = '[class*="error"], [role="alert"]'

# Login/session indicators
LOGIN_REQUIRED = 'button[data-testid="login-button"], a[href*="auth"], button:has-text("Log in")'

# New conversation button
NEW_CHAT_BUTTON = 'a[href="/"], button:has-text("New chat")'
