/* ===================================
   Health-AI Table Demo - Specific Styles
   =================================== */

/* Input area */
.hat-input-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 80px; /* space for bottom float */
}

/* Dotted input box (cursor + dots) */
.hat-input-box {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    font-family: monospace;
    color: var(--text-tertiary);
    font-size: 13px;
    letter-spacing: 2px;
}

.hat-cursor {
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 4px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hat-dots {
    overflow: hidden;
    white-space: nowrap;
}

/* Transcript text */
.hat-transcript {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    padding: 8px 0;
}

/* Bottom float area */
.hat-bottom-float {
    position: absolute;
    bottom: 8px; /* closer to bottom, like the desktop layout */
    right: 12px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

/* Waveform inline spacing (desktop-like position inside content flow) */
.hat-waveform-inline {
    margin: 10px 0 8px;
}

/* HealthAI Table: speaker icon should look gray (not black) */
.hat-waveform-inline .waveform-speaker-btn {
    opacity: 0.35;
}

.hat-waveform-inline .waveform-speaker-btn:hover {
    opacity: 0.35;
}

/* Waveform bar */
.hat-waveform-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(69, 157, 220, 0.08);
    border-radius: 24px;
}

.hat-waveform-device {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.hat-waveform-lines {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
}

.hat-waveform-line {
    width: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: height 0.15s ease;
}

/* Robot icon */
.hat-robot {
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hat-robot.hiding {
    opacity: 0;
    transform: scale(0.8);
}

.hat-robot-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 右下角浮动图片 */
.hat-float-img {
    position: absolute;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
    max-width: calc(100% - 40px);
}

.hat-float-img.visible {
    opacity: 1;
    transform: scale(1);
}

.hat-float-img-inner {
    width: 100px;
    height: auto;
    display: block;
    max-width: 100%;
    transition: width 0.3s ease;
}

/* assistant.svg 阶段放大 */
.hat-float-img-inner.is-assistant {
    width: 320px;
}

/* ai-assistant.png 表单图片（更大） */
.hat-float-img-inner.is-form {
    width: 580px;
}

/* assistant-ai.png 最终表单 */
.hat-float-img-inner.is-form-final {
    width: 580px;
}

/* Output section needs relative for bubble positioning */
.output-section {
    position: relative;
}

/* Doc header adjustments for this page */
.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.doc-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.doc-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.doc-actions {
    display: flex;
    gap: 6px;
}

/* Primary icon buttons (blue background) */
.icon-btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    width: 32px;
    height: 32px;
}

.icon-btn-primary:hover {
    background: var(--primary-hover);
}

/* Input section relative for bottom float */
.input-section .pane-body {
    position: relative;
    min-height: 400px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hat-bottom-float {
        bottom: 12px;
        right: 12px;
        gap: 8px;
    }

    .hat-robot {
        width: 56px;
        height: 56px;
    }

    .hat-waveform-bar {
        padding: 4px 8px;
    }

    .hat-waveform-device {
        width: 28px;
        height: 28px;
    }

    .hat-device-bubble {
        width: 40px;
        height: 40px;
        bottom: 12px;
        right: 12px;
    }
}

