/* AI Admin — Custom Styles (extends Tailwind) */

/* Smooth scrolling for chat */
#chat-messages {
    scroll-behavior: smooth;
}

/* Auto-resize textarea */
#chat-input {
    overflow-y: hidden;
    transition: height 0.1s ease;
}

/* Progress log styling */
.log-phase { color: #60a5fa; font-weight: 600; }
.log-success { color: #34d399; }
.log-error { color: #f87171; }
.log-done { color: #a78bfa; font-weight: 700; }
.log-info { color: #9ca3af; }

/* Typing indicator */
.typing-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #6b7280;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0.32s; }

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

/* Message bubble fade in */
.chat-msg {
    animation: msg-in 0.2s ease-out;
}
@keyframes msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Setup step transitions */
.setup-step {
    transition: opacity 0.2s ease;
}

/* Markdown in chat messages */
.chat-content h1, .chat-content h2, .chat-content h3 {
    font-weight: 700;
    margin-top: 0.75em;
    margin-bottom: 0.25em;
}
.chat-content h1 { font-size: 1.25em; }
.chat-content h2 { font-size: 1.125em; }
.chat-content h3 { font-size: 1em; }
.chat-content p { margin-bottom: 0.5em; }
.chat-content ul, .chat-content ol { padding-left: 1.5em; margin-bottom: 0.5em; }
.chat-content li { margin-bottom: 0.25em; }
.chat-content code {
    background: rgba(255,255,255,0.06);
    padding: 0.1em 0.3em;
    border-radius: 4px;
    font-size: 0.9em;
}
.chat-content pre {
    background: rgba(0,0,0,0.3);
    padding: 0.75em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.5em 0;
}
.chat-content pre code {
    background: none;
    padding: 0;
}
.chat-content strong { font-weight: 700; }
.chat-content em { font-style: italic; }

/* Screenshot in chat */
.chat-screenshot {
    max-width: 400px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: transform 0.15s;
}
.chat-screenshot:hover {
    transform: scale(1.02);
}

/* Lightbox overlay */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.lightbox-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 4px;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* Step indicator dots */
.step-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #374151;
    transition: all 0.2s;
}
.step-dot.active {
    background: #3b82f6;
    width: 24px;
    border-radius: 4px;
}
.step-dot.completed {
    background: #22c55e;
}

/* Auto-cron loading slider */
.cron-slider {
    width: 0%;
    transition: width 0.3s ease;
}
.cron-slider.running {
    animation: cron-slide 3s ease-in-out infinite;
}
@keyframes cron-slide {
    0%   { width: 0%; margin-left: 0%; }
    50%  { width: 40%; margin-left: 30%; }
    100% { width: 0%; margin-left: 100%; }
}
.cron-slider.finishing {
    width: 100% !important;
    margin-left: 0 !important;
    animation: none;
    transition: width 0.4s ease;
}

/* Auto-cron active state */
#auto-cron-btn.active {
    background: #1e3a5f;
    border: 1px solid #3b82f6;
    color: #93c5fd;
}
#auto-cron-btn.active #auto-cron-dot {
    background: #3b82f6;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
