/* Demo page styles */

.demo-intro {
    background: white;
    padding: 35px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.demo-intro h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.demo-intro p {
    font-size: 1.15em;
    color: #5a6c7d;
    margin-bottom: 20px;
}

.demo-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.demo-tips .tip {
    background: #e8f4f8;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1em;
    color: #2c3e50;
    border: 2px solid #667eea33;
}

/* Chat container */
.chat-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
}

.ai-mode-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    border-radius: 28px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4caf50;
    border-color: #4caf50;
}

input:checked + .toggle-slider:before {
    transform: translateX(28px);
}

.toggle-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#modeLabel {
    font-weight: 600;
    font-size: 1em;
}

.mode-hint {
    font-size: 0.85em;
    opacity: 0.9;
    font-style: italic;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Chat messages */
.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 25px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 20px;
    display: flex;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 75%;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1.1em;
    line-height: 1.6;
}

.message.user .message-content {
    background: #667eea;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
    background: white;
    color: #2c3e50;
    border: 2px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.message-content p {
    margin-bottom: 10px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Example questions */
.example-questions {
    padding: 20px 25px;
    background: white;
    border-top: 2px solid #f0f0f0;
}

.examples-label {
    font-size: 1em;
    color: #7f8c8d;
    margin-bottom: 12px;
    font-weight: 600;
}

.example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.example-btn {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 1em;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.example-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

/* Chat input */
.chat-input-container {
    padding: 20px 25px;
    background: white;
    border-top: 2px solid #f0f0f0;
}

#chatForm {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

#userInput {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1em;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-family: inherit;
    transition: border-color 0.2s;
}

#userInput:focus {
    outline: none;
    border-color: #667eea;
}

#sendBtn {
    padding: 15px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#sendBtn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

#sendBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.send-icon {
    font-size: 1.2em;
}

.input-hint {
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
    margin: 0;
}

/* Disclaimer */
.demo-disclaimer {
    background: #fff9e6;
    padding: 30px;
    border-radius: 12px;
    border-left: 5px solid #ffd700;
    margin-bottom: 30px;
}

.demo-disclaimer h3 {
    color: #d4a017;
    margin-bottom: 15px;
}

.demo-disclaimer p {
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 15px;
}

.demo-disclaimer ul {
    margin-left: 25px;
}

.demo-disclaimer li {
    font-size: 1.05em;
    color: #5a6c7d;
    margin-bottom: 10px;
}

/* Next steps CTA */
.next-steps-cta {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #667eea33;
}

.next-steps-cta h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.next-steps-cta p {
    font-size: 1.2em;
    color: #5a6c7d;
    margin-bottom: 25px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 18px 35px;
    font-size: 1.2em;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.2s;
    border: 3px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .chat-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ai-mode-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .chat-messages {
        height: 350px;
    }

    .message-content {
        max-width: 85%;
        font-size: 1.05em;
    }

    .example-buttons {
        flex-direction: column;
    }

    .example-btn {
        width: 100%;
    }

    #chatForm {
        flex-direction: column;
    }

    #sendBtn {
        width: 100%;
        justify-content: center;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .demo-tips {
        flex-direction: column;
        align-items: center;
    }
}
