/* Chat container styling */
.hts-chat-container {
    display: flex;
    flex-direction: column;
    height: 600px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.hts-chat-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f5f7fa;
    border-bottom: 1px solid #e0e0e0;
}

.hts-ai-avatar {
    width: 32px;
    height: 32px;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.hts-pro-badge {
    background: #10b981;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.hts-usage-counter {
    margin-left: auto;
    font-size: 14px;
    color: #64748b;
}

.hts-fullscreen-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
    color: #64748b;
}

.hts-chat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.hts-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hts-message {
    display: flex;
    max-width: 90%;
}

.hts-message-inner {
    display: flex;
    gap: 12px;
}

.hts-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #e0e7ff;
    color: #4f46e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.hts-user-message .hts-avatar {
    background: #dbeafe;
    color: #2563eb;
}

.hts-message-content {
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    color: #334155;
}

.hts-user-message {
    align-self: flex-end;
}

.hts-user-message .hts-message-content {
    background: #dbeafe;
    border-bottom-right-radius: 4px;
}

.hts-ai-message {
    align-self: flex-start;
}

.hts-ai-message .hts-message-content {
    background: #f1f5f9;
    border-bottom-left-radius: 4px;
}

.hts-message-actions {
    display: flex;
    align-items: flex-start;
    padding: 8px 0 0 8px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.hts-message:hover .hts-message-actions {
    opacity: 1;
}

.hts-message-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    color: #64748b;
}

.hts-input-area {
    border-top: 1px solid #e0e0e0;
    padding: 16px;
    background: #fff;
}

.hts-input-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.hts-preview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    pointer-events: none;
    color: transparent;
    white-space: pre-wrap;
    word-break: break-word;
    z-index: 1;
    font-size: 15px;
    line-height: 1.5;
}

.hts-highlight-container {
    position: relative;
    z-index: 2;
}

.hts-input {
    min-height: 60px;
    max-height: 200px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    outline: none;
    overflow-y: auto;
    background: #fff;
}

.hts-placeholder-text {
    color: #94a3b8;
}

.hts-placeholder {
    background: #fef3c7;
    border-radius: 4px;
    padding: 0 2px;
}

.hts-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hts-placeholder-note {
    font-size: 13px;
    color: #64748b;
}

.hts-placeholder-example {
    background: #fef3c7;
    padding: 1px 4px;
    border-radius: 4px;
    font-family: monospace;
}

.hts-run {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hts-run:hover {
    background: #4338ca;
}

.hts-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: hts-spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes hts-spin {
    to { transform: rotate(360deg); }
}

.hts-response-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hts-response-content h3 {
    margin: 10px 0 5px 0;
    font-size: 1.2em;
}

.hts-response-content h4 {
    margin: 8px 0 4px 0;
    font-size: 1.1em;
}

.hts-response-content ul,
.hts-response-content ol {
    padding-left: 20px;
    margin: 8px 0;
}

.hts-response-content li {
    margin-bottom: 5px;
}

.hts-section-header {
    font-weight: bold;
    margin-top: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
}