/* Common styles for QuikChat examples */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
}

.example-container {
    width: 84%; /* 8% margin on each side */
    margin: 0 auto;
    padding: 20px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.example-header {
    background: white;
    padding: 24px 32px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.example-header h1 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

.example-header .version {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 12px;
}

.example-header .description {
    margin: 0;
    color: #495057;
    font-size: 16px;
    line-height: 1.5;
}

.example-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-wrapper h2 {
    margin: 0 0 16px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 500;
}

.chat-container {
    flex: 1;
    min-height: 400px;
    max-height: 600px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

/* Controls section for examples with buttons/inputs */
.controls {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.controls h3 {
    margin: 0 0 16px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 500;
}

.control-group {
    margin-bottom: 12px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: inline-block;
    min-width: 120px;
    color: #6c757d;
    font-size: 14px;
}

button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 8px;
    transition: background-color 0.2s;
}

button:hover {
    background: #0056b3;
}

button:last-child {
    margin-right: 0;
}

button.secondary {
    background: #6c757d;
}

button.secondary:hover {
    background: #5a6268;
}

button.danger {
    background: #dc3545;
}

button.danger:hover {
    background: #c82333;
}

button.success {
    background: #28a745;
}

button.success:hover {
    background: #218838;
}

/* Code blocks for examples showing code */
.code-example {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 16px;
    margin-top: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    overflow-x: auto;
}

/* Info boxes */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
}

.info-box.warning {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.info-box.success {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .example-container {
        width: 95%;
    }
    
    .example-header {
        padding: 16px 20px;
    }
    
    .example-header h1 {
        font-size: 24px;
    }
}