.panel-composer {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.composer-header {
  padding: 16px 20px 0;
  flex-shrink: 0;
}
.composer-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.type-tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.type-tab {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font);
  transition: all 0.15s;
  white-space: nowrap;
}
.type-tab:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.type-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 600;
}

.composer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.char-count { font-size: 11px; color: var(--text-muted); text-align: right; }

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  overflow: hidden;
  position: relative;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(0,168,132,0.05);
}
.drop-zone-content {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 13px;
}
.drop-icon { font-size: 32px; }
#image-preview {
  width: 100%; max-height: 240px; object-fit: cover;
  border-radius: 6px;
}
#video-preview {
  width: 100%; max-height: 240px;
  border-radius: 6px; display: block;
}

/* Link input */
.link-input-row {
  display: flex; gap: 8px;
}
.link-input-row input { flex: 1; }
.btn-fetch {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 9px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-fetch:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-fetch.loading { opacity: 0.6; pointer-events: none; }

/* OG Preview card */
.og-preview {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.og-img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}
.og-info { padding: 10px 12px; }
.og-domain { font-size: 10px; color: var(--green); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.og-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; line-height: 1.4; }
.og-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Recipient tags */
.tags-container {
  display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 36px; padding: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tags-empty { color: var(--text-muted); font-size: 12px; align-self: center; }
.recipient-tag {
  display: flex; align-items: center; gap: 5px;
  background: rgba(0,168,132,0.2);
  border: 1px solid rgba(0,168,132,0.4);
  color: var(--green-light);
  padding: 3px 8px 3px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
}
.tag-remove {
  cursor: pointer; font-size: 14px; line-height: 1;
  color: var(--text-secondary); transition: color 0.1s;
}
.tag-remove:hover { color: var(--red); }

/* WhatsApp preview */
.wa-preview-outer {
  background: #0b141a;
  border-radius: 12px;
  padding: 20px 16px 16px;
  min-height: 80px;
}

.wa-preview-bubble {
  background: #005c4b;
  border-radius: 7.5px 0 7.5px 7.5px;
  max-width: 88%;
  margin-left: auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.wa-preview-bubble::before {
  content: '';
  position: absolute;
  top: 0; right: -8px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 8px 0 0 8px;
  border-color: transparent transparent transparent #005c4b;
  z-index: 1;
}

/* image fills bubble edge-to-edge at the top */
.bubble-image-wrap { position: relative; }
.bubble-img {
  width: 100%;
  display: block;
  max-height: 220px;
  object-fit: cover;
}
.bubble-video-wrap { cursor: default; }
.bubble-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  pointer-events: none;
}

/* time overlaid on image when there's no caption */
.bubble-meta-overlay {
  position: absolute;
  bottom: 5px; right: 7px;
  background: rgba(0,0,0,0.42);
  border-radius: 8px;
  padding: 1px 6px;
  display: flex; align-items: center; gap: 3px;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  pointer-events: none;
}

.bubble-body { padding: 5px 8px 5px; }

.bubble-text {
  font-size: 13.5px;
  color: #e9edef;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}
.bubble-text.bold { font-weight: 700; }
.bubble-text.secondary { font-size: 12px; color: rgba(233,237,239,0.62); margin-top: 1px; }
.bubble-text + .bubble-text { margin-top: 5px; }

.bubble-link {
  font-size: 12px;
  color: #53bdeb;
  word-break: break-all;
  margin-top: 5px;
  display: block;
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 3px;
  font-size: 11px;
  color: rgba(233,237,239,0.55);
}
.bubble-ticks { color: #53bdeb; font-size: 12px; }

/* link preview card inside bubble */
.wa-link-card {
  display: flex;
  background: rgba(0,0,0,0.22);
  border-radius: 6px;
  overflow: hidden;
  margin: 4px 0 2px;
}
.wa-link-bar { width: 3px; background: #25d366; flex-shrink: 0; }
.wa-link-info { padding: 7px 9px; min-width: 0; flex: 1; }
.wa-link-domain { font-size: 11px; color: #25d366; font-weight: 600; margin-bottom: 2px; }
.wa-link-title { font-size: 13px; font-weight: 600; color: #e9edef; line-height: 1.35; }
.wa-link-desc {
  font-size: 12px; color: rgba(233,237,239,0.62); margin-top: 2px;
  line-height: 1.35;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* link preview card com imagem (tipo link com OG buscado) */
.wa-link-preview {
  background: rgba(0,0,0,0.22);
  border-radius: 6px;
  overflow: hidden;
  margin: 4px 0 2px;
}
.wa-link-preview-img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}
.wa-link-preview-info { padding: 8px 10px; }

.preview-placeholder {
  display: block; text-align: center;
  padding: 18px 10px;
  color: rgba(233,237,239,0.35);
  font-size: 12px;
}


.mention-toggle-row { padding: 4px 0; }
.mention-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  user-select: none;
}
.mention-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--accent, #25d366);
}
