/* =========================================
   Cluely — Real-Time Meeting Intelligence
   style.css
   ========================================= */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0b;
  --surface: #111113;
  --surface2: #18181b;
  --surface3: #222226;
  --border: #2a2a30;
  --border2: #353540;
  --text: #f0f0f2;
  --text2: #a0a0b0;
  --text3: #606070;
  --accent: #7c6bff;
  --accent2: #5b4fe0;
  --green: #22d78c;
  --red: #ff5f5f;
  --amber: #f5a623;
  --blur-bg: rgba(12, 12, 15, 0.90);
  --overlay-w: 296px;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* =====================
   macOS Window
   ===================== */
.mac-window {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =====================
   Menu Bar
   ===================== */
.menu-bar {
  height: 28px;
  background: rgba(10, 10, 12, 0.97);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 0;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
  z-index: 200;
  user-select: none;
}

.apple {
  font-size: 14px;
  color: var(--text);
  margin-right: 10px;
}

.menu-items {
  display: flex;
  gap: 0;
}

.menu-items span {
  font-size: 12px;
  color: var(--text2);
  padding: 0 9px;
  height: 28px;
  display: flex;
  align-items: center;
  cursor: default;
  border-radius: 3px;
  transition: background 0.1s;
}

.menu-items span:first-child {
  color: var(--text);
  font-weight: 500;
}

.menu-items span:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  flex-shrink: 0;
}

.status-text {
  font-size: 11px;
  color: var(--green);
}

.menu-time {
  font-size: 12px;
  color: var(--text2);
  font-family: 'DM Mono', monospace;
}

/* =====================
   Workspace
   ===================== */
.workspace {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* =====================
   Zoom-like Background
   ===================== */
.zoom-bg {
  flex: 1;
  background: #0e0e12;
  display: flex;
  flex-direction: column;
}

.zoom-topbar {
  height: 52px;
  background: #1a1a1f;
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
}

.zoom-icon {
  font-size: 18px;
}

.zoom-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.rec-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 95, 95, 0.12);
  border: 0.5px solid rgba(255, 95, 95, 0.35);
  color: var(--red);
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  padding: 2px 8px;
  border-radius: 4px;
}

.rec-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.5s infinite;
}

.timer {
  font-size: 13px;
  color: var(--text2);
  font-family: 'DM Mono', monospace;
  margin-left: auto;
}

.participant-count {
  font-size: 12px;
  color: var(--text3);
}

/* =====================
   Participant Grid
   ===================== */
.participants-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  padding: 8px;
}

.participant {
  background: var(--surface2);
  border-radius: 10px;
  border: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}

.participant.speaking {
  border-color: rgba(124, 107, 255, 0.55);
  box-shadow: inset 0 0 0 1.5px rgba(124, 107, 255, 0.18);
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.5px;
}

.avatar.purple { background: rgba(124, 107, 255, 0.18); color: #a78bff; }
.avatar.green  { background: rgba(34, 215, 140, 0.15); color: #22d78c; }
.avatar.amber  { background: rgba(245, 166, 35, 0.15); color: #f5a623; }
.avatar.red    { background: rgba(255, 95, 95, 0.15);  color: #ff8080; }

.p-name {
  font-size: 12px;
  color: var(--text2);
  font-weight: 400;
}

.p-label {
  position: absolute;
  bottom: 9px;
  left: 9px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.65);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text2);
}

.mic-off {
  position: absolute;
  bottom: 9px;
  right: 9px;
  width: 22px;
  height: 22px;
  background: rgba(255, 95, 95, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* =====================
   Zoom Controls
   ===================== */
.zoom-controls {
  height: 64px;
  background: #1a1a1f;
  border-top: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
}

.z-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0.5px solid var(--border2);
  background: var(--surface3);
  color: var(--text2);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
}

.z-btn:hover { background: var(--border2); }
.z-btn:active { transform: scale(0.95); }

.z-btn.end {
  background: var(--red);
  color: #fff;
  border-color: transparent;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  width: auto;
  padding: 0 18px;
  border-radius: 22px;
}

.z-btn.end:hover { background: #e04444; }

/* =====================
   Cluely Overlay
   ===================== */
.cluely-overlay {
  position: absolute;
  top: 58px;
  right: 14px;
  width: var(--overlay-w);
  background: var(--blur-bg);
  border: 0.5px solid rgba(255, 255, 255, 0.10);
  border-radius: 15px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.85),
    0 0 0 0.5px rgba(255, 255, 255, 0.04);
  z-index: 100;
  overflow: hidden;
  transition: opacity 0.2s;
  cursor: default;
  user-select: none;
}

.drag-handle {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 2px;
  cursor: grab;
  z-index: 10;
}

.drag-handle:active { cursor: grabbing; }

/* =====================
   Overlay Header
   ===================== */
.cluely-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 9px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}

.cluely-logo {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.cluely-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.2px;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--green);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.6px;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.5s infinite;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.opacity-control {
  display: flex;
  align-items: center;
  gap: 5px;
  border-right: 0.5px solid rgba(255, 255, 255, 0.07);
  padding-right: 8px;
}

.opacity-icon {
  font-size: 13px;
  color: var(--text3);
}

.opacity-control input[type="range"] {
  width: 48px;
  height: 3px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.opacity-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.icon-btn {
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text3);
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }

/* =====================
   Tab Bar
   ===================== */
.tab-bar {
  display: flex;
  gap: 2px;
  padding: 8px 12px 0;
}

.tab {
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  transition: all 0.15s;
}

.tab:hover { color: var(--text2); background: rgba(255, 255, 255, 0.04); }
.tab.active { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.tab-view { display: none; }
.tab-view.active { display: block; }

/* =====================
   Transcript Section
   ===================== */
.transcript-section {
  padding: 10px 14px 9px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
}

.section-label {
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 7px;
  font-family: 'DM Mono', monospace;
}

.transcript-line {
  display: flex;
  gap: 7px;
  margin-bottom: 5px;
  align-items: flex-start;
}

.t-speaker {
  font-size: 10px;
  color: var(--accent);
  font-weight: 500;
  min-width: 22px;
  padding-top: 1px;
  font-family: 'DM Mono', monospace;
}

.t-text {
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.48;
}

.t-text.active { color: var(--text2); }

.cursor {
  display: inline-block;
  width: 1.5px;
  height: 11px;
  background: var(--accent);
  animation: blink 1s infinite;
  vertical-align: middle;
  margin-left: 1px;
}

/* =====================
   AI Section
   ===================== */
.ai-section {
  padding: 10px 14px 10px;
}

.ai-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.ai-icon {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--accent), #a78bff);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

.ai-label {
  font-size: 10px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.6px;
}

.suggestion-card {
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 7px;
}

.suggestion-card.objection {
  background: rgba(245, 166, 35, 0.07);
  border: 0.5px solid rgba(245, 166, 35, 0.22);
}

.suggestion-card.response {
  background: rgba(124, 107, 255, 0.08);
  border: 0.5px solid rgba(124, 107, 255, 0.22);
}

.card-tag {
  display: block;
  font-size: 9.5px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.suggestion-card.objection .card-tag { color: var(--amber); }
.suggestion-card.response .card-tag  { color: var(--accent); }

.card-text {
  font-size: 11.5px;
  color: var(--text);
  line-height: 1.5;
}

/* =====================
   Fact Chips
   ===================== */
.fact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid rgba(255, 255, 255, 0.10);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--text2);
  font-family: 'DM Mono', monospace;
}

/* =====================
   Notes Tab
   ===================== */
.notes-section {
  padding: 10px 14px;
}

.note-item {
  display: flex;
  gap: 9px;
  padding: 6px 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.05);
  align-items: flex-start;
}

.note-item.highlight {
  border-bottom: none;
}

.note-ts {
  font-size: 10px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
  min-width: 34px;
  padding-top: 1px;
}

.note-txt {
  font-size: 11.5px;
  color: var(--text2);
  line-height: 1.45;
}

.note-txt strong {
  color: var(--text);
  font-weight: 500;
}

.note-txt.live-note {
  color: var(--accent);
}

.export-row {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.export-btn {
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  color: var(--text2);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.export-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text);
}

/* =====================
   Prep Tab
   ===================== */
.prep-section {
  padding: 10px 14px;
}

.prep-block {
  margin-bottom: 12px;
}

.prep-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 5px;
}

.prep-bullet {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.prep-bullet.accent { background: var(--accent); }
.prep-bullet.green  { background: var(--green); }

.prep-text {
  font-size: 11.5px;
  color: var(--text2);
  line-height: 1.45;
}

/* =====================
   Footer Ask Bar
   ===================== */
.cluely-footer {
  padding: 9px 14px 11px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 7px;
}

.ask-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid rgba(255, 255, 255, 0.10);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}

.ask-input::placeholder { color: var(--text3); }
.ask-input:focus { border-color: rgba(124, 107, 255, 0.45); }

.ask-btn {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border: none;
  border-radius: 7px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

.ask-btn:hover { background: var(--accent2); }
.ask-btn:active { transform: scale(0.94); }

/* =====================
   Hidden Badge
   ===================== */
.hidden-badge {
  position: absolute;
  bottom: -1px;
  right: 16px;
  background: rgba(34, 215, 140, 0.09);
  border: 0.5px solid rgba(34, 215, 140, 0.25);
  border-radius: 5px 5px 0 0;
  padding: 2px 8px;
  font-size: 9px;
  color: var(--green);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =====================
   Typing Indicator
   ===================== */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.typing-dot:nth-child(1) { animation: typeBounce 1.2s 0.0s infinite; }
.typing-dot:nth-child(2) { animation: typeBounce 1.2s 0.2s infinite; }
.typing-dot:nth-child(3) { animation: typeBounce 1.2s 0.4s infinite; }

/* =====================
   End Call Modal
   ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  backdrop-filter: blur(6px);
}

.modal {
  background: var(--surface2);
  border: 0.5px solid var(--border2);
  border-radius: 14px;
  padding: 28px 32px;
  width: 300px;
  text-align: center;
}

.modal h2 {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 8px;
}

.modal p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-btns button {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: opacity 0.15s;
  border: none;
}

.modal-btns .cancel-btn {
  background: var(--surface3);
  color: var(--text2);
  border: 0.5px solid var(--border2);
}

.modal-btns .confirm-btn {
  background: var(--red);
  color: #fff;
  font-weight: 500;
}

.modal-btns button:hover { opacity: 0.8; }

/* =====================
   Animations
   ===================== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes typeBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.25s ease forwards;
}

/* =====================
   Scrollbar
   ===================== */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}
