/* Chat Page Container */
.chat-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Chat Header */
.chat-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header-content h1 .icon {
    font-size: 3rem;
    display: inline-block;
    margin-right: 15px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin: 0;
}

/* Chat Content */
.chat-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* ChatKit Wrapper */
.chatkit-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    overflow: hidden;
    min-height: 600px;
    position: relative;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 600px;
    color: #667eea;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    font-size: 1.1rem;
    color: #666;
}

/* Error State */
.error-state {
    padding: 60px 40px;
    text-align: center;
    color: #666;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-state h3 {
    color: #dc3545;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.error-state p {
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.retry-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.error-help {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-help strong {
    color: #333;
}

.error-help ul {
    margin: 10px 0;
    padding-left: 20px;
}

.error-help li {
    margin: 5px 0;
    color: #666;
}

/* Info Panel */
.info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.info-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card ul li {
    padding: 8px 0;
    color: #666;
    position: relative;
    padding-left: 25px;
}

.info-card ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .chat-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .chat-page-container {
        padding: 10px;
    }

    .chat-header {
        padding: 30px 15px;
        margin-bottom: 20px;
    }

    .header-content h1 {
        font-size: 1.8rem;
    }

    .header-content h1 .icon {
        font-size: 2rem;
        display: block;
        margin: 0 0 10px 0;
    }

    .subtitle {
        font-size: 1rem;
    }

    .chatkit-wrapper {
        min-height: calc(100vh - 300px);
        border-radius: 12px;
    }

    .info-panel {
        grid-template-columns: 1fr;
    }

    .error-state {
        padding: 40px 20px;
    }
}

/* ChatKit Custom Styling (if supported) */
openai-chatkit {
    --chatkit-primary-color: #667eea;
    --chatkit-background-color: #ffffff;
    --chatkit-border-radius: 12px;
    --chatkit-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
