/* ── Tooltip ── */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%; transform: translateX(-50%);
  background: #333; color: #fff;
  font-size: 11px; white-space: nowrap;
  padding: 3px 7px; border-radius: 3px;
  pointer-events: none; z-index: 9999;
}

/* ── Color Picker Popup ── */
#color-picker-popup {
  position: fixed;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-popup);
  padding: 10px;
  z-index: 2000;
  width: 180px;
}
#color-swatches {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  margin-bottom: 8px;
}
.color-swatch {
  width: 14px; height: 14px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.1);
  transition: transform var(--tr);
}
.color-swatch:hover { transform: scale(1.25); border-color: #555; }
.color-custom-row {
  display: flex; align-items: center; gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
}
#color-custom-input { width: 24px; height: 20px; border: none; padding: 0; cursor: pointer; }

/* ── Font Size Dropdown ── */
#fontsize-dropdown {
  position: fixed;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow-popup);
  z-index: 2000;
  max-height: 200px;
  overflow-y: auto;
  min-width: 60px;
}
#fontsize-list li {
  padding: 5px 14px;
  cursor: pointer;
  font-size: 13px;
}
#fontsize-list li:hover { background: var(--accent-light); }

/* ── Paragraph style select ── */
#para-style {
  width: 120px; height: 24px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 12px;
  padding: 0 4px;
  background: #fff;
  cursor: pointer;
}
#para-style:focus { outline: none; border-color: var(--border-focus); }

/* ── Line height select ── */
#line-height-select {
  width: 60px; height: 24px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 12px;
  padding: 0 4px;
  background: #fff;
}

/* ── Separator in ribbon groups ── */
.rsep {
  width: 1px; height: 40px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}
