﻿@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap");

/* Base */
body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", sans-serif;
  background-color: #f2f2f2;
  color: #333;
}

.page {
  max-width: 760px; /* narrow + mobile friendly */
  margin: 0 auto;
  padding: 16px;
}

/* Header (match survey style) */
.header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.logo {
  height: 64px;
  flex-shrink: 0;
}

.header-copy h1 {
  margin: 0;
  color: #1b8f7a;
  font-size: 22px;
}

.header-copy p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #666;
}

/* Card */
.card {
  background: #ffffff;
  padding: 28px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  position: relative;
}

.card h2 {
  margin-top: 0;
}

/* Main copy — two sentences together */
.main-copy {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Assistant block */
.assistant {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-frame {
  width: 320px;
  aspect-ratio: 4 / 5;
  border: 2px solid #1b8f7a;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #121a1b;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.avatar-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assistant-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  background: #f6f6f6;
}

.avatar-audio {
  display: none;
}

/* Button directly under image */
.start-button {
  width: 320px;
  padding: 12px;
  font-size: 16px;
  background-color: #1b8f7a;
  color: #ffffff;
  border: none;
  cursor: pointer;
}

.start-button:hover {
  background-color: #157a68;
}

.start-button:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

.assistant-label {
  margin-top: 8px;
  font-size: 14px;
  font-weight: bold;
}

.assistant .ghost-button {
  margin-top: 8px;
  width: 320px;
}

/* Recording panel */
.recording-panel {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.listening-panel {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.listening-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1b8f7a;
  box-shadow: 0 0 0 rgba(27, 143, 122, 0.6);
  animation: pulse 1.4s infinite;
}

.listening-text {
  font-size: 13px;
  color: #1b8f7a;
  font-weight: 600;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(27, 143, 122, 0.6);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 10px rgba(27, 143, 122, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(27, 143, 122, 0);
  }
}

.recording-indicator {
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: #ffe7e7;
  color: #b3272d;
  padding: 4px 10px;
  border-radius: 999px;
}

.countdown {
  font-size: 18px;
  font-weight: 700;
  color: #1b8f7a;
}

/* Status text */
.status {
  margin-top: 16px;
  font-size: 14px;
  color: #1b8f7a;
  text-align: center;
}

/* Live transcript */
.live-transcript {
  margin-top: 16px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 12px;
  background: #fafafa;
}

.live-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #7a7a7a;
  margin-bottom: 6px;
}

.live-text {
  font-size: 14px;
  color: #333;
  min-height: 22px;
}

.conversation {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conversation-header h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #1b8f7a;
}

.conversation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: #444;
  display: grid;
  gap: 10px;
}

.conversation-list li {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f6f6;
  border: 1px solid #e2e8e7;
}

.message-header {
  font-size: 12px;
  font-weight: 700;
  color: #1b8f7a;
  margin-bottom: 6px;
}

.message.assistant {
  border-left: 4px solid #1b8f7a;
}

.message.patient {
  border-left: 4px solid #3b6ea7;
  background: #f2f6fb;
}

.ghost-button {
  background: transparent;
  border: 1px solid #cbd8d6;
  color: #1b8f7a;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
}

.ghost-button:hover {
  background: #eef7f5;
}

.transcript-panel {
  border-top: 1px solid #e5e5e5;
  padding-top: 12px;
}

.transcript-panel h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #1b8f7a;
}

.transcript-list {
  margin: 0;
  padding-left: 18px;
  color: #444;
}

/* Small disclaimer bottom-right */
.disclaimer {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 11px;
  color: #999;
}

/* Mobile */
@media (max-width: 480px) {
  .avatar-frame,
  .start-button {
    width: 100%;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.hidden {
  display: none;
}
